GNOME Bugzilla – Bug 555876
Memory leak while rotating backgrounds
Last modified: 2009-12-17 02:43:00 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.
Yes, I remember to see strange things in the change background code when fixing other bugs... will have to look at it again..
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
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.
(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..
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.
might be fixed http://blogs.gnome.org/alexl/2009/02/17/eternal-vigilance/ http://svn.gnome.org/viewvc/nautilus?view=revision&revision=14963
-> 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)?
*** Bug 464577 has been marked as a duplicate of this bug. ***
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.
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.
Marking as NEEDINFO until someone can check this is still valid.
Blake, could you please try out in 2.26.x or 2.28.x and report back, thanks.
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.