After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 555876 - Memory leak while rotating backgrounds
Memory leak while rotating backgrounds
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.23.x
Other All
: Normal minor
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
: 464577 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-11 03:41 UTC by Blake Johnson
Modified: 2009-12-17 02:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Blake Johnson 2008-10-11 03:41:53 UTC
Please describe the problem:
I wrote a script a while back which rotates backgrounds every x amount of seconds.  See here ( http://www.simplescripts.net/?p=15 )  Recently, it's been causing Nautilus to use up 2GB of RAM, plus swap.  I can fix the issue by killing Nautilus and having it restart itself.

Steps to reproduce:
1. Run script.
2. Wait a few hours.
3. Open up Gnome System Monitor and notice the high amount of memory being used.


Actual results:
Background rotates as I would expect, but it starts to consume an unbearable amount of memory.

Expected results:
Background rotates with little or no memory difference.

Does this happen every time?
Yeah, if I leave it long enough.

Other information:
I'm pretty sure this is a memory leak.  Killing Nautilus is a quick solution to the problem, but then I lose all my open folders and whatnot.

/OpenSUSE 11.1 Beta 2.
//2GB RAM.
Comment 1 Nelson Benitez 2008-10-13 12:24:28 UTC
Yes, I remember to see strange things in the change background code when fixing other bugs... will have to look at it again..
Comment 2 Thomas Zajic 2008-10-14 17:00:01 UTC
Same problem here, even without rotating backgrounds. Output of 'top', ordered by swap space:

top - 18:49:10 up 21:57, 12 users,  load average: 0.18, 0.12, 0.03
Tasks: 181 total,   1 running, 180 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.0%us,  0.8%sy,  0.0%ni, 96.0%id,  0.0%wa,  0.2%hi,  0.0%si,  0.0%st
Mem:   2075972k total,  2012720k used,    63252k free,    39432k buffers
Swap:   996020k total,   435540k used,   560480k free,   209948k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND                                                                  
 3303 zlatko    20   0 1627m 1.2g  16m S    0 60.7   4:43.77 396m nautilus
 4603 zlatko    20   0  389m  81m  19m S    0  4.0   3:34.77 307m thunderbird-bin                                                         
 4551 zlatko    20   0  333m 121m  26m S    5  6.0  56:49.74 211m galeon                                                                  
 4583 zlatko    20   0  179m  46m  20m S    0  2.3   1:14.15 133m liferea-bin                                                             
 4559 zlatko    20   0  137m  12m 9096 S    0  0.6   0:56.92 124m urlgfe                                                                  
 3338 zlatko    20   0  118m 8192 7704 S    0  0.4   2:14.32 110m xpad                                                                    
 3309 zlatko     9 -11  114m 5096 4300 S    0  0.2  30:26.65 109m pulseaudio
[...]

This is after running for ~20+ hours, and it continues to gobble up memory and swap space unless I kill and restart it once a day.

[zlatko@disclosure]:~$ nautilus --version
GNOME nautilus 2.24.0
Comment 3 Blake Johnson 2008-10-14 17:19:31 UTC
I have not noticed this happening if I don't rotate backgrounds, but maybe this has something to do with the desktop refreshing or something.
Comment 4 Nelson Benitez 2008-10-14 17:44:17 UTC
(In reply to comment #3)
> I have not noticed this happening if I don't rotate backgrounds, but maybe this
> has something to do with the desktop refreshing or something.
> 

Yes, if it's not happening with rotating then comment 2 is about a different leak..
Comment 5 Blake Johnson 2008-10-14 17:53:10 UTC
Not necessarily from how I see it.  In my case, the desktop could be redrawn every x amount of seconds.  With comment #2, something else could be causing the desktop to be redrawn.

Point being, maybe it's not necessarily related to the backgrounds, but the backgrounds trigger it.

Of course, I could be completely wrong, as I don't have the slightest idea how Nautilus is written, or even really how it works.
Comment 7 Cosimo Cecchi 2009-02-22 21:03:29 UTC
-> gnome-desktop

This is very likely to be a leak in GnomeBG code (gnome-desktop module).
Moving there, but many leaks have been fixed there, and I think this is not an issue anymore, in 2.25.x.

@Blake: are you still able to reproduce this bug with a recent (>= 2.25.x) GNOME platform (Nautilus + libgnome-desktop)?
Comment 8 Cosimo Cecchi 2009-02-22 21:04:47 UTC
*** Bug 464577 has been marked as a duplicate of this bug. ***
Comment 9 scholnik 2009-02-22 21:46:21 UTC
I had filed a duplicate to this bug quite a while ago; I think it's been fixed for a while.  I'm not completely sure only because I don't change the background image filename anymore, but just copy the next image to a common filename.  (This didn't use to work when I filed my report but now does.)  So it's possible that it still happens if you use lots of different background filenames.
Comment 10 Blake Johnson 2009-02-23 00:24:53 UTC
At the moment, I could not tell you.  I'm using 2.24.1.  I don't really have an experimental machine at the moment to try 2.25.*, so until then, I'll assume it is, and if I find out it's not, I'll reopen the bug.

Having said that, if the script in the description can be ran for 24+ hours without an insane increase in memory usage, then it's probably fixed.
Comment 11 Vincent Untz 2009-03-03 16:32:53 UTC
Marking as NEEDINFO until someone can check this is still valid.
Comment 12 Akhil Laddha 2009-12-11 06:29:59 UTC
Blake, could you please try out in 2.26.x or 2.28.x and report back, thanks.
Comment 13 Blake Johnson 2009-12-17 02:43:00 UTC
I had it running for a while with 2.28.x (8+ hours?), and I did not notice any noticeable change in memory.  To that, I say good job to those that fixed it.