GPM in Hardy seems to have a memory leak

Bug #196688 reported by QuentinHartman
58
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-power
Fix Released
Medium
gnome-power-manager (Debian)
Fix Released
Unknown
gnome-power-manager (Ubuntu)
Fix Released
High
Unassigned

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.

Revision history for this message
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
Revision history for this message
QuentinHartman (qhartman) wrote :

I think this bug may be related to #194719.

Revision history for this message
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
Revision history for this message
Daniel T Chen (crimsun) wrote :
Revision history for this message
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
Revision history for this message
daugustine (daugustine) wrote :

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

Revision history for this message
fouck (aurelien-foucret) wrote :

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

Revision history for this message
fouck (aurelien-foucret) wrote :

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

Revision history for this message
fouck (aurelien-foucret) wrote :

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

Revision history for this message
Pedro Villavicencio (pedro) wrote :

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

Revision history for this message
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.

Revision history for this message
Bodinux (bodinux) wrote :

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

Revision history for this message
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.

Revision history for this message
James Troup (elmo) wrote :

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

Revision history for this message
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.

Revision history for this message
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)

Dave

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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.

--%<-----------
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
30528 barteq 20 0 1098m 1.0g 9296 R 141 34.2 1:05.60 gnome-power-man

Revision history for this message
James Westby (james-w) wrote :

Hi,

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

http://svn.gnome.org/viewvc/gnome-power-manager?view=revision&revision=2743

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

The upstream bug report for the second issue is

http://bugzilla.gnome.org/show_bug.cgi?id=522336

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

Thanks,

James

Revision history for this message
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
Revision history for this message
Victor Osadci (victor-os) wrote :

Fixed for me.
Thanks

Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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 ...

Revision history for this message
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  
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.