gnome-power-manager using between 2% and 10% of cpu.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-power-manager (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: gnome-power-manager
Running Gutsy 64-bit on a dual-core AMD 64-bit laptop (Compaq V3000z). for the past 2 days my gnome-power-manager has been using between 2 and 10% of my cpu. Beagle was also showing up on the top list at about the same usage, but after killing beagle, g-p-m still showed up.
I 'strace -f -p 'd gnome-power-manager and at least one thread seemed to be stuck in a poll loop... i don't know if this is normal or not:
...
[pid 6726] read(22, "\1\0\0\
[pid 6726] poll([{fd=22, events=
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00ec50) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00f000) = 0
[pid 6726] ioctl(24, USBDEVFS_IOCTL, 0x2aaaac009300) = 0
[pid 6726] ioctl(23, 0x4122, 0x4800000000000000) = 0
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00ec50) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00f000) = 0
[pid 6726] ioctl(24, USBDEVFS_IOCTL, 0x2aaaac009300) = 0
[pid 6726] ioctl(23, 0x4122, 0x4800000000000000) = 0
[pid 6726] read(22, "\1\0\0\
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] poll([{fd=22, events=
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] read(22, "\1\0\0\
[pid 6726] poll([{fd=22, events=
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00ec50) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00f000) = 0
[pid 6726] ioctl(24, USBDEVFS_IOCTL, 0x2aaaac009300) = 0
[pid 6726] ioctl(23, 0x4122, 0x4800000000000000) = 0
[pid 6726] read(22, "\1\0\0\
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00ec50) = 0
[pid 6726] ioctl(23, 0x4122, 0x2aaaac00f000) = 0
[pid 6726] ioctl(24, USBDEVFS_IOCTL, 0x2aaaac009300) = 0
[pid 6726] ioctl(23, 0x4122, 0x4800000000000000) = 0
[pid 6726] read(22, 0x41801bf0, 128) = -1 EAGAIN (Resource temporarily unavailable)
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] poll([{fd=22, events=
[pid 6726] ioctl(23, 0x4122, 0x3) = 0
[pid 6726] ioctl(23, 0x4122, 0x45b82) = 0
[pid 6726] ioctl(23, 0x4122, 0) = 0
[pid 6726] read(22, "\1\0\0\
[pid 6726] poll([{fd=22, events=
....
It was spinning in this poll loop at a -very- fast rate...i.e., there was no waiting in the 'poll()' call in strace.... The even weirder part? PID 6726 didn't exist on my system.
I 'kill -15'd gnome-power-manager and restarted it by hand and it seems to be ok now. and strace of that process shows the much more expected scenario of poll actually pausing a few seconds each through.
Given the strace output of the badly behaving process shows several -EAGAIN returns (only one posted here, but there are several in the full screen dump..sorry, didn't save it to a file, i'm cutting from my xterm back buffer), I'm guessing something wasn't getting cleared from the poll loop.. but that's just wild speculation.
I know it's not much to go on, but it was keeping my cpu from running completely idle and thus made my cpu run hot all day.
If it happens again, I'll run some more straces and post those. Sorry I can't give any more info now.
I saw the same bug on 32bit x86, gnome-power-manager (2.19.5-0ubuntu1 from gutsy) wasting 1-10% of CPU. Strace was very similar:
.... 0\361\37\ 247F\372% |4\1\0\ 0\0", 64) = 16 POLLIN| POLLERR| POLLNVAL, revents=POLLIN}], 1, -1) = 1 0\361\37\ 247Fe\243\ 3015\1\ 0\0\0", 64) = 16 POLLIN| POLLERR| POLLNVAL, revents=POLLIN}], 1, -1) = 1
[pid 27866] ioctl(21, 0x4122, 0xb4b6ff88) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6fe80) = 0
[pid 27866] read(20, "\1\0\0\
[pid 27866] ioctl(21, 0x4122, 0x824bc40) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b700b8) = 0
[pid 27866] ioctl(21, 0x4122, 0x1800) = 0
[pid 27866] poll([{fd=20, events=
[pid 27866] ioctl(21, 0x4122, 0xb4b70068) = 0
[pid 27866] ioctl(21, 0x4122, 0x400) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6ffe8) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b70138) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b70088) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b70068) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b70048) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6ff88) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6fe80) = 0
[pid 27866] read(20, "\1\0\0\
[pid 27866] ioctl(21, 0x4122, 0x824bc40) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b700b8) = 0
[pid 27866] ioctl(21, 0x4122, 0x1c00) = 0
[pid 27866] poll([{fd=20, events=
[pid 27866] ioctl(21, 0x4122, 0xb4b70068) = 0
[pid 27866] ioctl(21, 0x4122, 0x400) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6ffe8) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b70138) = 0
....
And this was spinning as fast as possible. Killing gnome-power-manager and restarting returned sanity.