GPM in Hardy seems to have a memory leak

Bug #196688 reported by QuentinHartman on 2008-02-28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released
gnome-power-manager (Debian)
Fix Released
gnome-power-manager (Ubuntu)

Bug Description

Binary package hint: gnome-power-manager

I've been using Hardy on a new laptop for a few days and have run into a few bugs related to GPM. See #194719 for those details. Twice now I've also had GPM eat up RAM, to the point that the process was consuming all available (2GB) physical memory and was forcing stuff into swap. I don't know if this is related to the other bug I posted, but I'd call this critical, once it spirals out of control, it is quite difficult to recover from.

Any pointers on how to debug this or provide useful information to the devs would be appreciated, I don't really know how to approach something like this.

Mirco (mircotischler) wrote :

I can confirm this bug. GPM ate up all available physical memory except 16M and all swap too. This happened while playing the game pingus. I don't know yet how to reproduce it, though.

Changed in gnome-power-manager:
status: New → Confirmed
QuentinHartman (qhartman) wrote :

I think this bug may be related to #194719.

Daniel T Chen (crimsun) wrote :

@Quentin: No, it's unrelated to 194719 (which is hal, not g-p-m). Instead, this is a valid bug and has been fixed in upstream SVN commit 2680.

Changed in gnome-power-manager:
importance: Undecided → Low
status: Confirmed → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-power-manager - 2.21.92-0ubuntu2

gnome-power-manager (2.21.92-0ubuntu2) hardy; urgency=low

  * Add debian/patches/75-fix-memleak-brightness-applet.patch:
    Don't leak references in the brightness applet (LP: #196688).
    Fix picked from upstream SVN trunk (commit 2680).

 -- Daniel T Chen <email address hidden> Mon, 03 Mar 2008 15:49:23 -0500

Changed in gnome-power-manager:
status: Triaged → Fix Released
Changed in gnome-power:
status: Unknown → Fix Released
daugustine (daugustine) wrote :

still getting g-p-m eating all memory in fully updated Hardy 64-bit...

fouck (aurelien-foucret) wrote :

Seems to be not yet fixed for me. Fully upgraded hardy (32-bit)

fouck (aurelien-foucret) wrote :

Updated again yesterday (a few hours after my precedent post). I can test it now.

fouck (aurelien-foucret) wrote :

Not fixed. More than 600Mb consumed by gnome-power-manager today.

Pedro Villavicencio (pedro) wrote :

fouck can you get a valgrind log and report a new bug?, thanks.

mishoo (mihai-bazon) wrote :

I'm seeing this too in Debian/unstable (I dist-upgraded yesterday). It happened twice after resuming from suspend. GPM was using a lot of RAM and 122% of CPU :)

An additional problem I noticed was that I couldn't use my sound card (e.g. XMMS said it's "busy") until I killed GPM.

Bodinux (bodinux) wrote :

Happened yesterday after installing the beta release from scratch on my laptop.

Roberto Cássio Jr. (rcsdnj) wrote :

The same still happens to me here, too. I saw gnome-power-mananger process yesterday using 1.6GiB of RAM. I had the same problem with the sound, but I've killed pulseaudio and started it again, which made the sound work again, so I'm not sure about the sound problem relationship.

Coincidence or not, this happened some time after resuming from suspend state.

I'm using Hardy Beta and the latest avaliable upgrades, I can provide any additional info needed, just tell me what.

James Troup (elmo) wrote :

I just had gnome-power-manager run up to 900Mb resident and run the machine into swap with current hardy.

Victor Osadci (victor-os) wrote :

Seems to be related to bug #202089 - After suspend, audio stops working; killing pulseaudio makes g-p-m eat all the RAM and use a lot of CPU time.

PS: It seems this bug is not fixed, please reopen.

Dave Gilbert (ubuntu-treblig) wrote :

Agreed; not fixed - I have 2.22.0-0ubuntu2 gpm package and it just took 5GB

Again, I think this might be audio related somehow - at the time I was killing and reloading my snd-hda-intel module to try and get it to work
after a resume; it might just be coincidence but given #202089 and #209155 I think not.

(64 bit, Toshiba Equium A100-306; upgrade from Gutsy)


Emilio Pozuelo Monfort (pochu) wrote :

Milestoning to Hardy.

2.22.1 fixes a leak caused by not closing a GStreamer pipeline. See Debian #472637.

Changed in gnome-power-manager:
importance: Low → High
milestone: none → ubuntu-8.04
status: Fix Released → Confirmed
Mario Limonciello (superm1) wrote :

Indeed i'd say this is related to a gstreamer pipeline issue. I killed pulseaudio so that my VMWare Workstation could use /dev/dsp, and gpm decided to slowly complain. It grabbed 1.7 GB of physical RAM until I killed it.

Barteq (barteqpl) wrote :

Good to know. Couse I've got same thing here. After killing pulseaudio g-p-m started to eat ram and CPU up to 140% ;-)
So waiting for the patch.

30528 barteq 20 0 1098m 1.0g 9296 R 141 34.2 1:05.60 gnome-power-man

James Westby (james-w) wrote :


Here's the diff that was committed upstream and
referenced from the Debian bug report.



James Westby (james-w) wrote :


The upstream bug report for the second issue is

I can't open a second bug watch for the same product
to record this properly unfortunately.



Emilio Pozuelo Monfort (pochu) wrote :

GPM 2.22.1 is now in the repositories... could you please confirm this is fixed?

Changed in gnome-power-manager:
status: Confirmed → Fix Committed
Victor Osadci (victor-os) wrote :

Fixed for me.

James Westby (james-w) wrote :

Setting to Fix Released as there is confirmation.

Changed in gnome-power-manager:
status: Fix Committed → Fix Released
Changed in gnome-power-manager:
status: Unknown → Fix Released
knarf (launchpad-ubuntu-f) wrote :

I just got bitten by this bug on Lucid. Currently gnome-power-manager uses ~120 MB resident memory after running for about two weeks:

$ ps auxw|grep gnome-power-manager|grep -v grep
frank 2735 0.0 16.1 186140 123588 ? S Apr03 8:09 gnome-power-manager

Most of that memory is used on the heap as can be seen in /proc/[pid]/smaps:

08ea5000-11d9e000 rw-p 00000000 00:00 0 [heap]
Size: 146404 kB
Rss: 116416 kB
Pss: 116416 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 82896 kB
Private_Dirty: 33520 kB
Referenced: 47516 kB
Swap: 29968 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB

A 146 MB heap seems a bit overdone for a trivial program like gnome-power-manager.

This machine has gone through some updates without being rebooted. That should not be a problem - this is not Windows after all - but maybe gnome-power-manager should have been restarted after one of those updates?

Jörn Dreyer (j.dreyer) wrote :

same here on lucid:
$ uptime
 14:04:12 up 12 days, 2:01, 2 users, load average: 2.81, 2.56, 1.88
$ ps auxw|grep gnome-power-manager|grep -v grep
jfd 3035 0.0 4.0 531200 326860 ? S May27 2:06 gnome-power-manager
$ cat /proc/[pid]/smaps
025e6000-151c8000 rw-p 00000000 00:00 0 [heap]
Size: 307080 kB
Rss: 305264 kB
Pss: 305264 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 305264 kB
Referenced: 284996 kB
Swap: 1700 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB

anything else I should try? will leave it running a few more days ...

scottku (scottku) wrote :

knarf and Jörn: See bug #569273

Changed in gnome-power:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.