huge desktop memory leak
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg (Ubuntu) |
Invalid
|
Undecided
|
Kubuntu Bugs |
Bug Description
This is an odd one, but it is some sort of interaction between changing the background wallpaper in kubuntu and gtk.
To recreate it is simple:
1. Using kubuntu and running KDE as your desktop, launch several gtk based programs. In my case, I was running gkrellm and the gimp and firefox. Within firefox I created four tabs, each of them pointing to the ubuntu home page.
2. Using the KDE wallpaper configuration tool (right click on the desktop, select "Configure Desktop...") setup a slide show with several images. I set the timeout to one minute to make the leak showup quicker.
3. Let it run for awhile.
The result is that the amount of memory leaked is directly related to the number of gtk windows running, and (somehow) the number of tabs open in your firefox web browser. Here is an annotated PS trace of the X server:
These values are before having any gtk programs running, except for gkrellm:
19614 tty7 RLs+ 0:03 31 1655 87944 36624 3.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19828 pts/2 S+ 0:00 0 92 3863 912 0.0 grep -E X
19614 tty7 SLs+ 0:15 31 1655 93284 36632 3.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19846 pts/2 S+ 0:00 0 92 3863 912 0.0 grep -E X
19614 tty7 SLs+ 0:31 31 1655 88124 36632 3.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19861 pts/2 R+ 0:00 0 92 3643 692 0.0 grep -E X
19614 tty7 RLs+ 0:47 31 1655 93280 41752 4.0 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19876 pts/2 R+ 0:00 0 728 5103 920 0.0 /bin/sh /bin/egrep X
19614 tty7 SLs+ 1:03 31 1655 88232 36632 3.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19891 pts/2 S+ 0:00 0 92 3859 912 0.0 grep -E X
19614 tty7 SLs+ 1:19 31 1655 93352 41752 4.0 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19906 pts/2 S+ 0:00 0 92 3859 912 0.0 grep -E X
19614 tty7 RLs+ 1:34 31 1655 88196 36632 3.5 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19921 pts/2 S+ 0:00 0 92 3859 908 0.0 grep -E X
At this point I launch the GIMP:
19614 tty7 SLs+ 1:50 31 1655 89240 37504 3.6 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19942 pts/2 R+ 0:00 0 92 2479 380 0.0 grep -E X
19614 tty7 SLs+ 2:06 31 1655 94396 42624 4.1 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19957 pts/2 S+ 0:00 0 92 3863 912 0.0 grep -E X
19614 tty7 RLs+ 2:21 31 1655 99588 47744 4.6 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
19972 pts/2 S+ 0:00 0 92 3863 912 0.0 grep -E X
At this point I launch firefox and create four tabs, each pointing to the ubuntu home page:
19614 tty7 RLs+ 2:39 31 1655 129208 77100 7.4 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
20001 pts/2 S+ 0:00 0 92 3859 908 0.0 grep -E X
19614 tty7 SLs+ 2:55 31 1655 161164 109020 10.6 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
20016 pts/2 R+ 0:00 0 92 2579 280 0.0 grep -E X
19614 tty7 SLs+ 3:13 31 1655 192972 140828 13.6 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
20031 pts/2 S+ 0:00 0 92 3859 908 0.0 grep -E X
19614 tty7 RLs+ 3:29 31 1655 224832 172652 16.7 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/
20046 pts/2 S+ 0:00 0 92 3859 912 0.0 grep -E X
Notice that once I've started the gimp, the leak becomes more pronounced. And starting up firefox is disastrous in that every time there is a wallpaper change, the system eats 30+ MB at a time!
I did run xrestop (unfortunately not in batch mode) while this was occuring, and it handily showed each of the gtk based applications creaping up in resource usage.
that's no leak.. X shows the usage of pixmap-memory, which is shared.