← Back to team overview

tiomap-dev team mailing list archive

[Bug 569273] Re: memory leak in gnome-power-manager

 

I am using 10.10 too and had a contact failure in the cable between my laptop and my charger which seemd like the AC adapter was disconnected and connected back very rapidly and very frequently. I've fixed the cable but still, every time I unplug and plug back the AC adapter gnome-power-manager's RSS goes up (about 200k), also the RSS goes upwhen the battery finishes charging.
I'm not sure what the normal memory usage of gnome-power-manager should be but before I fixed the cable gnome-power-manager consumed all my 4GB RAM in under 3 hours which was horrible. My workaround is that I restart gnome-power-manager every 15 minutes using a cronjob. The script is very simple, I copy here in case anyone needs a workaround until the bug is fixed:

--- CUT HERE ---
#!/bin/sh

export DISPLAY=:0
killall -q gnome-power-manager
gnome-power-manager >/dev/null 2>&1 &
--- CUT HERE ---

Save the text between the CUT HERE markers into a file, for example /usr/local/bin/gpmrestart, then type into a terminal
crontab -e
and enter this line:
*/15 * * * * /usr/local/bin/gpmrestart

This workaround seems not to have any sideeffect (except that the
battery icon flickers every 15 minutes), I've been using it for several
months.

One detail I forgot to mention: I have uninstalled indicator-applet
right after I installed/upgraded my linux (because I see no reason to
use it).

-- 
memory leak in gnome-power-manager
https://bugs.launchpad.net/bugs/569273
You received this bug notification because you are a member of TI OMAP
Developers, which is a direct subscriber.

Status in Application Indicators: Fix Released
Status in “gnome-power-manager” package in Ubuntu: Invalid
Status in “indicator-application” package in Ubuntu: Fix Released
Status in “gnome-power-manager” source package in Lucid: Invalid
Status in “indicator-application” source package in Lucid: Triaged
Status in “gnome-power-manager” source package in Maverick: Invalid
Status in “indicator-application” source package in Maverick: Confirmed

Bug description:
TEST CASE: (at the beginning because it's a long post):
1. Monitor the output of the command for a few hours 
  $ watch -n1 'grep heap -A11 /proc/$( pidof gnome-power-manager )/smaps'

VERIFICATION SUCCEEDED:
- Memory usage is stable over time


DESCRIPTION:
Binary package hint: gnome-power-manager

gnome-power-manager (2.30.0-0ubuntu1) seems to have a memory leak my machine running Lucid.  I witnessed it using up to 120MB in the RES column according to "top".  My machine is 64 bit and is connected to a APC uninterruptible power supply.  I haven't yet tried unplugging it to see if the UPS is somehow related to this problem.  Another person reported a similar problem in bug #196688 comment 25.  Opening a new bug seemed like a good idea since that bug was fixed 2 years ago.

Here is some information for what gnome-power-manager looks like after running for a long period of time (from  /proc/`pidof gnome-power-manager`/smaps):
0147b000-08810000 rw-p 00000000 00:00 0                                  [heap]
Size:             118356 kB
Rss:              118188 kB
Pss:              118188 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:    118188 kB
Referenced:       118020 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB

I rebooted my machine and let it sit at the login screen.  I logged via ssh and found that gnome-power-manager was using the following:
01f6e000-02075000 rw-p 00000000 00:00 0                                  [heap]
Size:               1052 kB
Rss:                 944 kB
Pss:                 944 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:       944 kB
Referenced:          944 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB

I logged out of my ssh session and didn't touch the machine until 5 and 1/2 hours later---and I logged in again remotely with ssh to check on gnome-power-manager and found:
01f6e000-02e5d000 rw-p 00000000 00:00 0                                  [heap]
Size:              15292 kB
Rss:               15280 kB
Pss:               15280 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:     15280 kB
Referenced:        15280 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-power-manager 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Apr 23 22:23:32 2010
GnomeSessionIdleInhibited: No
GnomeSessionInhibitors: None
GnomeSessionSuspendInhibited: No
MachineType: DELL Inc. XPS 730X
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic root=UUID=e3f32a1f-7be3-45c9-9096-fa696ad50df3 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-power-manager
dmi.bios.date: 07/16/2009
dmi.bios.vendor: DELL INC.
dmi.bios.version: 1.0.5
dmi.board.name: 0P270J
dmi.board.vendor: DELL Inc.
dmi.board.version: A00
dmi.chassis.type: 3
dmi.chassis.vendor: DELL Inc.
dmi.modalias: dmi:bvnDELLINC.:bvr1.0.5:bd07/16/2009:svnDELLInc.:pnXPS730X:pvr00:rvnDELLInc.:rn0P270J:rvrA00:cvnDELLInc.:ct3:cvr:
dmi.product.name: XPS 730X
dmi.product.version: 00
dmi.sys.vendor: DELL Inc.