Bugzilla – Bug 364186
Main menu leaks again
Last modified: 2008-09-11 21:32:06 UTC
Look at the attached screenshot. Main menu on 10.3 is leaking again, using 139.7 MB of RAM after some hours of usage.
Created attachment 196692 [details] Main menu leak
That leak could be anything - for instance, the code that generates thumbnails for recently used documents has been known to blow up now and then. Of course, it could just be a plain incremental leak. We need better debug output to know. You can generate a leak log thusly: 1) killall main-menu 2) G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full --trace-children=yes /usr/lib/gnome-main-menu/main-menu >out 2>&1 3) Right-click the panel and add the main menu. You need to have valgrind installed, as well as debug symbols for the main menu, glib2 and gtk2. The log will go to the file "out" when you kill the main menu again.
I fixed a rather important leak along with bug #230478 for openSUSE 11.0 (see that bug for the patch). I'll mark this as fixed; can you please check if main-menu still leaks there?
Thanks Federico! Yes. I will test it in beta 1 and let you know. Regards, A.
Just a quick note. On 10.3 there is a 1kb leak at each click on a launcher in the menu. It's very easy to notice simply using the task manager. Is it still present in factory? Regards, A.
(In reply to comment #5 from Alberto Passalacqua) > Just a quick note. On 10.3 there is a 1kb leak at each click on a launcher in > the menu. It's very easy to notice simply using the task manager. > > Is it still present in factory? I just spent a few minutes watching 'top' and 'xrestop', while launching stuff from main-menu, and I couldn't see any increase. So I'll leave this as fixed :)
Reopening. I can't see a leak in 11.0, but the code in gnome-vfs/libgnomevfs/xdgmime* doesn't seem to be any different from what we have in 10.3. And in 10.3's version of xdgmime, there is this bug: https://bugs.freedesktop.org/show_bug.cgi?id=12512 The symptom is that the MIME cache gets reloaded and memory gets leaked. The cause is two bugs in xdgmime; one about trashing its cache, and one about reloading the cache more than needed when $XDG_DATA_DIRS has duplicate entries.
Oh, I know why the leak is not present in openSUSE 11.0. It is triggered by having duplicate entries in XDG_DATA_DIRS, and 11.0 doesn't have any duplicates there. However, in openSUSE 10.3 I have XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/:/usr/share:/etc/opt/kde3/share:/opt/kde3/share Notice the duplicate of "/usr/share". So the buggy code still exists in 11.0, but it's not triggered because the environment variable is different. I'll poke upstream about updating xdgmime with the patch from https://bugs.freedesktop.org/show_bug.cgi?id=12512
We patched 11.0 to eliminate "bad" things like leading colons, dups ... in the XDG_* env vars. See bug #300678
The patch made it into gnome-vfs upstream. This is a reminder to myself to bring this patch into openSUSE 11.0, or to wait until we update our gnome-vfs2.
This is fixed in openSUSE 11.1 We won't release an update for 10.3 or 11.0, sorry.