Bug 335591 - [RFE] openoffice.org wakes up the CPU while doing nothing
[RFE] openoffice.org wakes up the CPU while doing nothing
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: libreoffice (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Caolan McNamara
Fedora Extras Quality Assurance
bzcl34nup
: FutureFeature
Depends On:
Blocks: wakeup
  Show dependency treegraph
 
Reported: 2007-10-16 23:55 EDT by William Lovaton
Modified: 2012-09-12 09:24 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-12 09:24:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 38837 None None None 2012-09-12 09:24:00 EDT
OpenOffice.org 106485 None None None Never
OpenOffice.org 106487 None None None Never
OpenOffice.org 106490 None None None Never
OpenOffice.org 106492 None None None Never
OpenOffice.org 106502 None None None Never
OpenOffice.org 82726 None None None Never
OpenOffice.org 83195 None None None Never

  None (edit)
Description William Lovaton 2007-10-16 23:55:09 EDT
Description of problem:
According to powertop openoffice.org is waking up the CPU 4 times per second
while there is no activity on the application, this way preventing the system
from saving power.

The test is done with a fresh start up, no file loaded and the window unfocused.
 This way openoffice (swriter.bin and scalc.bin too) shows up on the top of the
list as the worst offenders on a very quiet system.

Doing an "strace -tt -p <pid-of-OO.o>" reveals the following:

[william@localhost ~]$ strace -tt -p 31819
Process 31819 attached - interrupt to quit
22:34:44.435944 gettimeofday({1192592084, 436457}, NULL) = 0
22:34:44.436722 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:44.437152 gettimeofday({1192592084, 437357}, NULL) = 0
22:34:44.437523 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:44.437987 gettimeofday({1192592084, 438191}, NULL) = 0
22:34:44.438364 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:44.438753 gettimeofday({1192592084, 438956}, NULL) = 0
22:34:44.439119 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 53) = 0
22:34:44.492033 gettimeofday({1192592084, 492235}, NULL) = 0
22:34:44.492442 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:44.492849 gettimeofday({1192592084, 492985}, NULL) = 0
22:34:44.493221 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:44.493676 gettimeofday({1192592084, 493813}, NULL) = 0
22:34:44.494051 gettimeofday({1192592084, 494186}, NULL) = 0
22:34:44.494420 gettimeofday({1192592084, 494554}, NULL) = 0
22:34:44.494826 gettimeofday({1192592084, 494961}, NULL) = 0
22:34:44.495190 gettimeofday({1192592084, 495324}, NULL) = 0
22:34:44.495737 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:44.496129 gettimeofday({1192592084, 496261}, NULL) = 0
22:34:44.496497 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:44.496942 gettimeofday({1192592084, 497074}, NULL) = 0
22:34:44.497316 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:44.497625 gettimeofday({1192592084, 497756}, NULL) = 0
22:34:44.497846 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 597) = 0
22:34:45.095073 gettimeofday({1192592085, 95368}, NULL) = 0
22:34:45.095553 gettimeofday({1192592085, 95781}, NULL) = 0
22:34:45.095951 gettimeofday({1192592085, 96158}, NULL) = 0
22:34:45.096326 gettimeofday({1192592085, 96530}, NULL) = 0
22:34:45.096733 gettimeofday({1192592085, 96938}, NULL) = 0
22:34:45.097099 gettimeofday({1192592085, 97302}, NULL) = 0
22:34:45.097473 gettimeofday({1192592085, 97689}, NULL) = 0
22:34:45.097853 gettimeofday({1192592085, 98058}, NULL) = 0
22:34:45.098258 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.098656 gettimeofday({1192592085, 98862}, NULL) = 0
22:34:45.099030 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:45.099466 gettimeofday({1192592085, 99684}, NULL) = 0
22:34:45.099859 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.100231 gettimeofday({1192592085, 100435}, NULL) = 0
22:34:45.100609 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 344) = 0
22:34:45.445067 gettimeofday({1192592085, 445309}, NULL) = 0
22:34:45.445491 gettimeofday({1192592085, 445721}, NULL) = 0
22:34:45.445889 gettimeofday({1192592085, 446092}, NULL) = 0
22:34:45.446259 gettimeofday({1192592085, 446461}, NULL) = 0
22:34:45.446644 gettimeofday({1192592085, 446849}, NULL) = 0
22:34:45.447396 gettimeofday({1192592085, 447722}, NULL) = 0
22:34:45.447926 gettimeofday({1192592085, 448136}, NULL) = 0
22:34:45.448306 gettimeofday({1192592085, 448509}, NULL) = 0
22:34:45.448738 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.449124 gettimeofday({1192592085, 449329}, NULL) = 0
22:34:45.449496 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:45.449952 gettimeofday({1192592085, 450155}, NULL) = 0
22:34:45.450328 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.450709 gettimeofday({1192592085, 450913}, NULL) = 0
22:34:45.451078 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 246) = 0
22:34:45.697087 gettimeofday({1192592085, 697360}, NULL) = 0
22:34:45.697543 gettimeofday({1192592085, 697769}, NULL) = 0
22:34:45.697939 gettimeofday({1192592085, 698145}, NULL) = 0
22:34:45.698311 gettimeofday({1192592085, 698514}, NULL) = 0
22:34:45.698718 gettimeofday({1192592085, 698924}, NULL) = 0
22:34:45.699084 gettimeofday({1192592085, 699287}, NULL) = 0
22:34:45.699457 gettimeofday({1192592085, 699671}, NULL) = 0
22:34:45.699836 gettimeofday({1192592085, 700039}, NULL) = 0
22:34:45.700238 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.700635 gettimeofday({1192592085, 700841}, NULL) = 0
22:34:45.701007 poll([{fd=6, events=POLLIN}, {fd=5, events=POLLIN}, {fd=21,
events=POLLIN|POLLPRI}, {fd=23, events=POLLIN|POLLPRI}, {fd=24,
events=POLLIN|POLLPRI}, {fd=25, events=POLLIN|POLLPRI}], 6, 0) = 0
22:34:45.701440 gettimeofday({1192592085, 701662}, NULL) = 0
22:34:45.701839 read(5, 0x8c1ec80, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
22:34:45.702208 gettimeofday({1192592085, 702412}, NULL) = 0
22:34:45.702577 poll( <unfinished ...>
Process 31819 detached


If you start both, -writer and -calc, things gets a lot worse.  If you load a
file, wps stays the same.  And if you focus the window, the blinking cursor will
add 1 wps to the count.  So it would be a good idea to stop the blinking after
an amount of inactivity.

As a comparison Gnumeric doesn't do anything while inactive.  There is no
powertop activity and strace doesn't show any system call at all.

Is there something that could be done to solve this??
Comment 1 Caolan McNamara 2007-10-17 13:00:14 EDT
I see a good few problems already, so this looks like it is going to be
something of an umbrella task.

Firstly we've got what looks like a straight forward bug in the first idle timer
which waits until something is loaded into the frame before running some goo,
empty frame -> wake up continuously forever
Comment 2 William Lovaton 2007-10-17 18:59:08 EDT
Mmmhhh... you have me lost  =)  but thanks for the response.

Are you planning to report this bug upstream??
Comment 3 Caolan McNamara 2007-10-18 02:52:55 EDT
An umbrella task is a task that contains lots of other tasks in in. So there are
at least 5, probably lots more, wake-up bugs. The first one is linked to the
upstream report at the bottom of this issue in "external bugzilla references"
Comment 4 Caolan McNamara 2007-10-18 05:46:26 EDT
No 2 is NextJob_Impl in sfx2/source/control/bindings.cxx. Now, what on earth is
it trying to do, it's another never ending timer loop that "invalidates volatile
slots" on every execution. Totally disabling it shows no immediate obvious
ill-effects. Mail sent to sfx2 maintainer.
Comment 5 Caolan McNamara 2007-10-18 05:47:48 EDT
No 3 is in starmath, there we have a loop that constantly re-lays-out the
equation, we could probably fairly easily change that to only get triggered when
the equation content changes at SmDocShell::SetText
Comment 6 Caolan McNamara 2007-11-01 06:37:11 EDT
No 1 is fixable and now fixed upstream, moving to no 2. This is trickier we're
polling the state of stuff like "has the clipboard contents changed", we need to
move away from that and reseat it on an event on the initial state change. i.e.
http://www.openoffice.org/issues/show_bug.cgi?id=83195
Comment 7 Bug Zapper 2008-04-04 10:08:42 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 8 Caolan McNamara 2008-04-18 08:42:44 EDT
We're currently looking at using libXfixes to avoid polling for the selection
continously which removed the need for "volatile" sfx2 slots which removes the
first layer of wakeups
Comment 9 Jon Stanley 2008-04-23 16:29:36 EDT
Adding FutureFeature keyword to RFE's.
Comment 10 Caolan McNamara 2009-06-09 13:04:50 EDT
sub parts of this are upstream with 3.2 target, though there's loads of other bits which need to be taken care of after those ones are through (I shudder especially at impress/draw's etc spellchecking timers)
Comment 11 Caolan McNamara 2009-10-30 08:23:11 EDT
stage 1 framework complete, 
stage 2 simple apps timeouts in progress (e.g. starmath)
Comment 12 Caolan McNamara 2009-11-28 13:03:30 EST
stage 3, patches submitted to fix the drawing layer, i.e. draw and impress

Note You need to log in before you can comment on or make changes to this bug.