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 618952 - Leak in gnome-power-manager on Ubuntu 10.04
Leak in gnome-power-manager on Ubuntu 10.04
Status: RESOLVED NOTGNOME
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
unspecified
Other Linux
: Low minor
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-05-18 03:10 UTC by Justin Lebar
Modified: 2010-05-19 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Abbreviated memcheck output (50.96 KB, text/plain)
2010-05-18 03:10 UTC, Justin Lebar
Details

Description Justin Lebar 2010-05-18 03:10:18 UTC
Created attachment 161303 [details]
Abbreviated memcheck output

See https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/569273

I have a Valgrind trace, although it's not particularly revealing without debug symbols.
Comment 1 Richard Hughes 2010-05-18 08:42:43 UTC
Your log does indeed show 220 bytes being lost, although without debugging symbols the trace is worthless.
Comment 2 Justin Lebar 2010-05-18 16:05:44 UTC
I'll try and get debug symbols.

But to be clear, the observed behavior of GPM outside valgrind is a *huge* memory leak -- much more than 220 bytes.

It's possible that I didn't run valgrind for long enough to see more than one instance of the leak.  But I suspect that the blocks being reported as "possibly lost" are actually responsible for the leak I've observed.  The full log, from a run of about 2 min, is 1.5mb long, and all of it is blocks possibly lost.  Perhaps someone else could confirm whether it's normal to have so many blocks possibly lost, or if that's indicative of a problem.
Comment 3 Richard Hughes 2010-05-18 17:28:31 UTC
If you're looking at possibly lost too, you'll need to install a *ton* of debug symbols.
Comment 4 Justin Lebar 2010-05-18 17:36:55 UTC
(In reply to comment #3)
> If you're looking at possibly lost too, you'll need to install a *ton* of debug
> symbols.
I was just going to build and run GPM with -g.  Do you think that won't be sufficient?
Comment 5 Justin Lebar 2010-05-18 23:05:24 UTC
Here's a Valgrind trace with debug symbols from the Launchpad bug: http://launchpadlibrarian.net/48685406/gpm.log
Comment 6 Richard Hughes 2010-05-19 10:20:04 UTC
I still can only see 236 bytes lost. Also, the code where most of those is lost is not present in gnome-power-manager git master. Maybe try with --show-reachable=yes -- although I'm not sure what's going to show anything much more interesting.
Comment 7 Justin Lebar 2010-05-19 16:07:44 UTC
Trace with --show-reachable=yes
http://launchpadlibrarian.net/48727458/gpm-reachable.log
Comment 8 Richard Hughes 2010-05-19 16:57:46 UTC
You're hemorrhaging memory from app_indicator_set_menu(), which is an Ubuntu Specific "value added" feature that gnome-power-manager has been patched with, as they didn't work with other people to get libappindicator upstream into the toolkit where it belongs.

I'm quite angry now. My time has been wasted on this bug. File it on launchpad.
Comment 9 Justin Lebar 2010-05-19 21:37:47 UTC
Very sorry for wasting your time, Richard.  Thanks for identifying the problem.