Comment 37 for bug 569273

Revision history for this message
Simon B (simonbrewerau) wrote : Re: memory leak in gnome-power-manager on lucid

I have some new information (however I do need some help from developers, please).

The chain of events is this:

1. upowerd - wakes while monitoring kernel drivers (sysfs/procfs). This can be very infrequent or very often depending on the h/w
2. upowerd - sends resulting message via dbus
3. gnome-power-manager - regenerates the app indicator menu every when it gets certain dbus messages, using up more heap memory each time.

How I verified this:

1. upowerd - sudo strace -p `pidof upowerd`
2. monitored dbus messages using
3. used gdb and set breakpoints (after installing -dbgsym packages)

I am still a little unsure that the events getting from upowerd to gnome-power-manager are the same; but I can tell they happen at the same frequency. Also if i remove my battery the events stop.

Summary: gnome-power-manager should be 'freeing' the menu, or not creating a new one every time. Many users will not see the problem because of a variable frequency of messages from upowerd (depending on their hardware).