FS#24033 - [gnome-shell] leaks memory

Attached to Project: Arch Linux
Opened by John (FireX) - Sunday, 01 May 2011, 21:00 GMT
Last edited by Ionut Biru (wonder) - Saturday, 28 May 2011, 11:10 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ionut Biru (wonder)
Jan Alexander Steffens (heftig)
Architecture x86_64
Severity High
Priority High
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:
It was leaking memory very badly form 20 MB to over 200 MB in a few hours.
Could be Archlinux? https://bugzilla.gnome.org/show_bug.cgi?id=642652

Additional info:
intel-dri 7.10.2-2
gnome-shell 3.0.1-1

JS ERROR: !!! Exception was: Error: Requiring NetworkManager, version none: Typelib file for namespace 'NetworkManager' (any version) not found
JS ERROR: !!! lineNumber = '0'
JS ERROR: !!! fileName = 'gjs_throw'
JS ERROR: !!! stack = '("Requiring NetworkManager, version none: Typelib file for namespace 'NetworkManager' (any version) not found")@gjs_throw:0
@/usr/share/gnome-shell/js/ui/status/network.js:8
'
JS ERROR: !!! message = 'Requiring NetworkManager, version none: Typelib file for namespace 'NetworkManager' (any version) not found'
JS LOG: NMApplet is not supported. It is possible that your NetworkManager version is too old
JS LOG: GNOME Shell started at Sun May 01 2011 13:37:01 GMT-0700 (PDT)
Window manager warning: Log level 16: STACK_OP_REMOVE: window 0x5a not in stack
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x2000774 (brosnan@LX); these messages lack timestamps and therefore suck.
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x1800004 (System Mon); these messages lack timestamps and therefore suck.
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x1400073 (Reporting ); these messages lack timestamps and therefore suck.
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x1400073 (Reporting ); these messages lack timestamps and therefore suck.
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x1400073 (How to Rep); these messages lack timestamps and therefore suck.
Window manager warning: Received a _NET_WM_MOVERESIZE message for 0x1400073 (YouTube - ); these messages lack timestamps and therefore suck.


Steps to reproduce:
Login
Open a few applications
   x.png (246.3 KiB)
This task depends upon

Closed by  Ionut Biru (wonder)
Saturday, 28 May 2011, 11:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  gnome-shell 3.0.2-1

report any leaks upstream
Comment by Ionut Biru (wonder) - Sunday, 01 May 2011, 21:16 GMT
you can try to upgrade to testing where a mesa 7.11 snapshot exists
Comment by John (FireX) - Sunday, 01 May 2011, 22:11 GMT
@ wonder Umm.. Installed libgl-7.10.99.git20110429-1 intel-dri-7.10.99.git20110429-1 mesa-7.10.99.git20110429-1 python2-cairo-1.10.0-1 . Same result
Comment by simon (sausageandeggs) - Sunday, 01 May 2011, 22:13 GMT
I to am experiencing this, seems to be going up at about 1mb a second
Using Nvidia 270.41.06-1
Comment by siriusb (siriusb) - Monday, 02 May 2011, 10:27 GMT
nvidia 270.41.06-1 on x64, gnome-shell memory usage goes to ~360MB in some hours.
Comment by Den (Rdf) - Tuesday, 03 May 2011, 09:35 GMT
Сonfirm: nvidia 270.41.06-1 (x86), memory usage goes from 70M to 300M and more
Comment by Lucas Hermann Negri (kknd) - Tuesday, 03 May 2011, 23:41 GMT
I am also experiencing the same problem, with intel-dri 7.10.2-2 and gnome-shell 3.0.1-1.
After 5 hours, the memory usage is above 500mb. Restarting the shell (alt+f2, 'r') resets the memory to 27mb.
Comment by John (graysky) - Wednesday, 04 May 2011, 08:36 GMT
I can confirm this behavior as well: 88 M to 176 M in 7 h. Using nvidia 270.41.06-1 here.
Comment by Ionut Biru (wonder) - Wednesday, 04 May 2011, 08:39 GMT
maybe this is related to  FS#23946 
Comment by gls (MilosD) - Wednesday, 04 May 2011, 09:51 GMT
Confirm: i'm using xf86-video-ati, i686, gnome-shell goes up to ~170MB in few hours.
Comment by Rémy Oudompheng (remyoudompheng) - Wednesday, 04 May 2011, 18:34 GMT
Someone should run gnome-shell under valgrind to get proper information.
Comment by simon (sausageandeggs) - Wednesday, 04 May 2011, 22:57 GMT
I've ran Gnome-shell through Valgrind. Let me know if you want it done differently or anything else.
Comment by Rémy Oudompheng (remyoudompheng) - Thursday, 05 May 2011, 19:08 GMT
OK, it would be very useful that you do the same thing after recompiling gnome-shell with debugging symbols (CFLAGS="-ggdb3" and add options=(!strip) to PKGBUILD).
Comment by Rémy Oudompheng (remyoudompheng) - Thursday, 05 May 2011, 19:15 GMT
Oh, never mind, the bug is from wrong usage of XFixesGetCursorImage and a patch is already available: http://bugzilla-attachments.gnome.org/attachment.cgi?id=187268
Comment by simon (sausageandeggs) - Thursday, 05 May 2011, 19:20 GMT
Yeah I've just already applied that patch and rebuilt, I'm testing it at the minute. So far it seems to be to be a better than it was but mem usage is still rising, just slower than it was. I'll report back after a decent test.
Comment by John (FireX) - Thursday, 05 May 2011, 22:50 GMT
gnome-shell 3.0.1-2
Less leaks but it is still happening.
is the XFixesGetCursorImage patch there?
Comment by Ionut Biru (wonder) - Thursday, 05 May 2011, 22:53 GMT
no. nobody said in here that is applied. i'll do that tomorrow
Comment by simon (sausageandeggs) - Friday, 06 May 2011, 04:52 GMT
This patch is definitely worth applying until gnomes release the next version. After running GS for about 8 hours memory usage seems to be holding pretty steady at about 130 mb
Comment by Ionut Biru (wonder) - Friday, 06 May 2011, 07:19 GMT
gnome-shell 3.0.1-3 contains the two memory fix fixes:

shell-xfixes-cursor: missing XFree
st-private: Fix memory leak

let me know if is fixed
Comment by siriusb (siriusb) - Friday, 06 May 2011, 07:47 GMT
I've never applied a patch in my life. Would somebody be kind enough to provide a link for me how to do this? As I see 3.0.1-3 hasn't hit even testing yet. Thank you.

Edit: upgraded to gnome-shell 3.0.1-3. It's the same :(
Comment by John (graysky) - Friday, 06 May 2011, 19:58 GMT
@siriusb - it's in [extra] not [testing].
Comment by Ionut Biru (wonder) - Friday, 06 May 2011, 20:09 GMT
@siriusb see remy comments and provide a new valgrind log.
Comment by simon (sausageandeggs) - Friday, 06 May 2011, 22:21 GMT
3.0.1-3 runs better haven't seen mem usage go much above 150mb. Nice one Ionut.
Comment by John (graysky) - Friday, 06 May 2011, 22:54 GMT
gnome-shell for me is 88 MB on a login and after about 4 h using 3.0.1-3 has moved up to 150
Comment by siriusb (siriusb) - Saturday, 07 May 2011, 06:29 GMT
@wonder As I see 3.0.1-3 includes the patch mentioned by remy so I did no patching (however it seems I've found out how to do :P). Log attached.
Comment by Ionut Biru (wonder) - Saturday, 07 May 2011, 08:27 GMT
@siriusb now do it on the bug link in description saying that you still have memory leaks even after applying:
shell-xfixes-cursor: missing XFree
st-private: Fix memory leak

Comment by siriusb (siriusb) - Saturday, 07 May 2011, 09:07 GMT
@wonder Very well, sir! :) Done, as you requested.
Comment by Ionut Biru (wonder) - Saturday, 07 May 2011, 09:22 GMT
i wonder if is because i didn't apply http://git.gnome.org/browse/gtk+/commit/?id=703af0fb4892be060bd9d105d9debdc36539aaf1 to gtk3. Care to test?
Comment by simon (sausageandeggs) - Saturday, 07 May 2011, 09:46 GMT
All that patch does is add a couple of comments
Comment by Ionut Biru (wonder) - Saturday, 07 May 2011, 09:47 GMT
not on the first hunk. that is the important one
Comment by siriusb (siriusb) - Saturday, 07 May 2011, 10:32 GMT
Sure, wonder. Just let me know what to do.
Comment by Ionut Biru (wonder) - Saturday, 07 May 2011, 10:39 GMT
recompile gtk3 and add that patch
Comment by John (graysky) - Saturday, 07 May 2011, 11:37 GMT
@wonder - I applied the patch and all is running just fine. Memory usage on gnome-shell started at 88 MB and is now up to 108 but I have only been in this session after a reboot for about 1/2 h. I'll report back later today.
Comment by siriusb (siriusb) - Saturday, 07 May 2011, 12:11 GMT
Wow, my very first patching. :) Unfortunately no avail. After 10 min gnome-shell is up to 94 MB from 45 MB. :(
Comment by John (graysky) - Saturday, 07 May 2011, 14:12 GMT
Been about 3 h of uptime and memusage for gnome-shell is 152 MB :(
Comment by siriusb (siriusb) - Saturday, 07 May 2011, 16:57 GMT
After 7 hours I'm over 160 MB with the gtk3 patch. So gnome-shell 3.0.1-3 brought improvement since mem usage dropped under half of the earlier, but gtk3 patch did nothing.
Comment by John (graysky) - Saturday, 07 May 2011, 17:39 GMT
+1 - the gtk3 patch does nothing. I'm 6 h of login time and gnome-shell has ballooned from 88 MB to 202 MB.
Comment by Ionut Biru (wonder) - Wednesday, 11 May 2011, 18:23 GMT
st-private: Fix memory leak was redone and is available in 3.0.1-5
Comment by Ionut Biru (wonder) - Wednesday, 11 May 2011, 18:36 GMT
add to that mutter 3.0.1-2
Comment by John (FireX) - Thursday, 12 May 2011, 03:06 GMT
gnome-shell 3.0.1-5 still leaks.Attached valgrind log
Comment by Rémy Oudompheng (remyoudompheng) - Thursday, 12 May 2011, 06:43 GMT
FireX: your log doesn't look like a leak. You need to use the option "show-reachable" to understand where the memory usage comes from. Don't forget to recompile gnome-shell with debugging symbols... as usual.
Comment by John (graysky) - Thursday, 12 May 2011, 08:35 GMT
My gnome-shell still balloons from 88 MB to over 200 MB :(
Comment by Den (Rdf) - Thursday, 12 May 2011, 15:49 GMT
gnome-shell 3.0.1-5, still memory leaks
Comment by John (FireX) - Thursday, 26 May 2011, 04:25 GMT
gnome-shell-3.0.2-1 libgl-7.10.99.git20110429-1 intel-dri-7.10.99.git20110429-1 mesa-7.10.99.git20110429-1

Memory slowly creeps up but falls back down again .. and so on but its still leaks much slower
Comment by Ionut Biru (wonder) - Saturday, 28 May 2011, 11:09 GMT
there isn't anything we can do here. for gnome-shell 3.0.2-1 the memory usage is fine

Loading...