gnome-power-manager using between 2% and 10% of cpu.

Bug #127868 reported by John Clemens
4
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\0\377\377\377\377\tb\245F\0\0\0\0\357?\240#\0\0"..., 128) = 32
[pid 6726] poll([{fd=22, events=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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\0\377\377\377\377\tb\245F\0\0\0\0\325\303\345$\0"..., 128) = 32
[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=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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\0\0\201\377\377\tb\245F\0\0\0\0\272G+&\0\0\0\0\1"..., 128) = 32
[pid 6726] poll([{fd=22, events=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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\0\377\377\377\377\tb\245F\0\0\0\0\242\343p\'\0\0"..., 128) = 32
[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=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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\0\377\377\377\377\tb\245F\0\0\0\0\211g\266(\0\0"..., 128) = 32
[pid 6726] poll([{fd=22, events=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
....

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.

Revision history for this message
Jarmo Ilonen (trewas) wrote :

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:

....
[pid 27866] ioctl(21, 0x4122, 0xb4b6ff88) = 0
[pid 27866] ioctl(21, 0x4122, 0xb4b6fe80) = 0
[pid 27866] read(20, "\1\0\0\0\361\37\247F\372%|4\1\0\0\0", 64) = 16
[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=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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\0\361\37\247Fe\243\3015\1\0\0\0", 64) = 16
[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=POLLIN|POLLERR|POLLNVAL, revents=POLLIN}], 1, -1) = 1
[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.

Revision history for this message
Richard Hughes (richard-hughes) wrote :

strace isn't that useful. What about the output of gnome-power-manager --verbose --no-daemon?

Revision history for this message
John Clemens (clemej) wrote :

I have not seen this in a long time, perhaps it was just some glitch in the gnome 2.19 timeframe? Either way, killing it and restarting it fixed it, so running with --verbose --no-daemon wasn't really an option. I'm OK with closing this bug as no longer reproducible, if you so choose.

Revision history for this message
Basilio Kublik (sourcercito) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at [WWW] https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

Changed in gnome-power-manager:
importance: Undecided → Low
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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