Why is gnome-shell
writing 17783 lines per second of these errors to my /var/log/syslog
file?:
gnome-shell: ERROR:broker_posix.cc(46)] Received unexpected number of handles
gnome-shell: ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Details:
My computer gave me a warning of running out of disk space this morning, so I cleared up 20 GB with rm -rf ~/.local/share/Trash/*
. Running df -h
showed that I had 20 GB free on the root drive.
I then left the computer alone for a few hours.
To my surprise, when I got back on it recently, it was right back down to 0 MB free again! What happened?
Running sudo ncdu /
allowed me to scan around and look at disk usage, and I saw that /var/log/syslog
file is 43.5 GiB. Could this be it? Did this log suddenly grow really fast, filling up the 20 GB of space I had just freed? What writes to this log file? Why? Does it normally auto-rotate, or self-limit to some max size? Should it?
Running less /var/log/syslog
shows this:
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711106:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711119:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711219:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711232:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711331:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711344:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711445:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711459:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711560:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711573:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711673:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711687:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711787:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711801:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711902:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711917:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712018:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712031:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712131:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712144:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712246:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712260:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712361:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.712374:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
As you can see, there are lots of lines of this:
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711106:ERROR:broker_posix.cc(46)] Received unexpected number of handles
Jul 16 00:06:09 gabriel-Latitude-7490 gnome-shell[503208]: [503636:1:0100/000000.711119:ERROR:command_buffer_proxy_impl.cc(96)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
Why?
I then ran:
head -n 100000 /var/log/syslog > ~/sysloghead.txt
which created a 17.2 MB file I could open in a text editor like Sublime Text. Scanning the file shows that it was writing 17783 lines per second! The 2 lines above are 344 bytes + newlines = 346 bytes, so that equates to 17783/2*346 = 3076459 bytes/sec = 3.076459 MB/sec.
20 GB = 20000 MB / 3.076459 Mb/sec = 6500 sec / 3600 sec/hr = 1.8 hrs. It would take 1.8 hrs to use up my 20 GB I freed, at that rate.
So, what's going on? What is this error? Is this what filled up my disk space suddenly or is it possible I have a virus or something? To my knowledge, I've never had a virus in Linux before and I've been using Ubuntu as my primary OS at both home and work since 2018.
I need my space back. Can I delete /var/log/syslog
to free up 44 GB of space?
I'm not sure if this is a gnome-shell bug or not, but I just reported it here: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5662