Bug 364186 - Main menu leaks again
Summary: Main menu leaks again
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Alpha 3
Hardware: Other openSUSE 10.3
: P1 - Urgent : Major (vote)
Target Milestone: ---
Assignee: Federico Mena Quintero
QA Contact: E-mail List
URL:
Whiteboard: gnome-performance
Keywords:
Depends on:
Blocks: main-menu-perf
  Show dependency treegraph
 
Reported: 2008-02-22 20:29 UTC by Alberto Passalacqua
Modified: 2008-09-11 21:32 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Main menu leak (93.97 KB, image/png)
2008-02-22 20:29 UTC, Alberto Passalacqua
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Passalacqua 2008-02-22 20:29:09 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.
Comment 1 Alberto Passalacqua 2008-02-22 20:29:42 UTC
Created attachment 196692 [details]
Main menu leak
Comment 2 Hans Petter Jansson 2008-04-01 20:13:43 UTC
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.
Comment 3 Federico Mena Quintero 2008-04-05 05:02:58 UTC
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?
Comment 4 Alberto Passalacqua 2008-04-05 16:45:53 UTC
Thanks Federico!

Yes. I will test it in beta 1 and let you know.

Regards,
A.

Comment 5 Alberto Passalacqua 2008-04-05 16:47:56 UTC
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.
Comment 6 Federico Mena Quintero 2008-04-07 15:21:15 UTC
(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 :)
Comment 7 Federico Mena Quintero 2008-04-08 20:43:24 UTC
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.
Comment 8 Federico Mena Quintero 2008-04-08 20:53:09 UTC
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
Comment 9 Scott Reeves 2008-04-08 21:22:28 UTC
We patched 11.0 to eliminate "bad" things like leading colons, dups ... in the XDG_* env vars.  See bug #300678
Comment 10 Federico Mena Quintero 2008-04-19 02:29:39 UTC
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.
Comment 11 Federico Mena Quintero 2008-09-11 21:32:06 UTC
This is fixed in openSUSE 11.1  We won't release an update for 10.3 or 11.0, sorry.