GNOME Bugzilla – Bug 709451
gnome-shell memory leaks
Last modified: 2021-07-05 14:41:50 UTC
$ ps -eo rss,command | sort -rn 1939464 /usr/bin/gnome-shell [truncated] Video drivers: i915 (leaks to 500-600 MiB) nouveau (leaks to 2 GiB)
I can confirm this bug. Also for radeon: 114428 gnome-shell - day begin 509280 gnome-shell - day ended After I have restarted gnome-shell ~100-140 Mb.
See "Debugging GNOME Shell with valgrind" on https://wiki.gnome.org/GnomeShell/Debugging for how to provide information.
[alex@alex-mini ~]$ env G_SLICE=always-malloc gnome-shell --replace -g --debug-command="libtool --mode=execute valgrind --log-file=/tmp/gnome-shell.valgrind" gnome-shell: Unknown option -g [alex@alex-mini ~]$ env G_SLICE=always-malloc gnome-shell --replace --debug-command="libtool --mode=execute valgrind --log-file=/tmp/gnome-shell.valgrind" gnome-shell: Unknown option --debug-command=libtool --mode=execute valgrind --log-file=/tmp/gnome-shell.valgrind
Yes, use this command: env G_SLICE=always-malloc libtool --mode=execute valgrind --leak-check=full --show-leak-kinds=all --log-file=gnome-shell.valgrind ./gnome-shell --replace
A leak can be trivially reproduced for me by just mashing the "Super" key as fast as possible for 20-30 seconds. Memory usage goes linearly up by 1mb in the gnome system monitor, and never back down. Also, this has been going on since quite a few major versions of gnome shell already, on multiple different thinkpad laptops I own. (all of them with intel graphics)
This is definitely still a problem with Gnome 3.20 on Fedora 24: $ rpm -qa|egrep "mutter|gnome-shell" mutter-3.20.3-2.fc24.x86_64 gnome-shell-3.20.4-2.fc24.x86_64 ... I can also confirm that pressing the "Super" key triggers memory usage increase by about 1mb. I have Intel hardware. I will attempt to produce a valgrind log.
Created attachment 339406 [details] (compressed) Valgrind output while pressing "Super" key repeatedly Looks like the debug symbols would probably help the output a bit. If someone could hint at which packages would be the most useful to add debug symbols, I'll be happy to try this again.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.