#4678 HIGH Future : The sugar_shell_service polls every 1 second

Zarro Boogs per Child bugtracker at laptop.org
Sat Aug 9 21:08:34 EDT 2008


#4678: The sugar_shell_service polls every 1 second
-----------------------+----------------------------------------------------
   Reporter:  gnu      |       Owner:  marco               
       Type:  defect   |      Status:  new                 
   Priority:  high     |   Milestone:  Future Release      
  Component:  sugar    |     Version:                      
 Resolution:           |    Keywords:  power, blocks?:8.2.0
Next_action:  package  |    Verified:  0                   
  Blockedby:           |    Blocking:                      
-----------------------+----------------------------------------------------
Changes (by gnu):

  * keywords:  power => power, blocks?:8.2.0
  * priority:  normal => high
  * next_action:  => package


Comment:

 This bug is still present in 8.2.0 candidate joyride-2263.

 The problem appears to be in pygobject2-2.14.2-1.fc9, source file
 pygmainloop.c, in the function pyg_signal_watch_prepare.  The problem is
 that the preprocessor variable HAVE_PYSIGNAL_SETWAKEUPFD is not set.  This
 results in pygobject thinking that it needs to do a timeout once a second
 to look for signals in the main loop.  Actually, the set_wakeup_fd call
 DOES exist -- but perhaps either the configure script's test for it is
 messed up, or perhaps the koji mock configuration that was used to build
 pygobject2 for Fedora didn't have the right Python2.5 (with the
 set_wakeup_fd method), even though the shipping Python 2.5 in F9 does have
 that fix.

 Since we're pulling this binary package in from Fedora, it's an upstream
 binary packaging problem; we might be able to fix it merely by rebuilding
 it ourselves.
 You can see the failure by running strace on the Sugar shell service
 process.  You can diagnose the problem by setting a breakpoint in
 pyg_signal_watch_prepare and stepping through it, noticing that it skips
 all the #ifdef'd code designed to avoid polling.  Or you can, under gdb,
 do: "disassemble pyg_signal_watch_prepare".  If it's only about 20
 instructions long, and doesn't include any calls to pipe(), then it's
 compiled wrong.

 The "sugar-shell" process also polls once a second (as well as the sugar-
 shell-service process).
 My guess is that with this bug, every multi-threaded PyGTK program is
 still polling.

-- 
Ticket URL: <http://dev.laptop.org/ticket/4678#comment:4>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list