gwibber-service has a child that polls at 10Hz which is causing a lot of wakeup events

Bug #906916 reported by Colin Ian King
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gwibber (Ubuntu)
Fix Released
High
Unassigned

Bug Description

The gwibber-service forks off a child process that runs a polling loop constantly at 10Hz which causes a lot of wakeups on an idle system. On my Lenovo X220i this constitutes 7% of the wakeups on a cleanly installed system when running idle. Extraneous wakeups waste power and reduce battery life.

You can see the offending task using strace:

sudo strace -f /usr/bin/gwibber-service

and after about 8 or so seconds you can then observe the select(), wait() polling loop:
...
[pid 11711] select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
[pid 11711] wait4(11710, 0x7f3991defb8c, WNOHANG, NULL) = 0
[pid 11711] wait4(11709, 0x7f3991defb8c, WNOHANG, NULL) = 0
[pid 11711] select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
[pid 11711] wait4(11710, 0x7f3991defb8c, WNOHANG, NULL) = 0
[pid 11711] wait4(11709, 0x7f3991defb8c, WNOHANG, NULL) = 0
[pid 11711] select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)

This is overkill in my opinion and any code that sits in a tight polling loop like this need re-engineering to be more power friendly.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gwibber-service 3.2.1-0ubuntu1.3
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Tue Dec 20 14:40:04 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: gwibber
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in gwibber (Ubuntu):
milestone: none → ubuntu-12.04-beta-1
tags: added: battery-power-consumption
Omer Akram (om26er)
Changed in gwibber (Ubuntu):
importance: Undecided → High
Martin Pitt (pitti)
Changed in gwibber (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gwibber - 3.3.2-0ubuntu1

---------------
gwibber (3.3.2-0ubuntu1) precise; urgency=low

  * New upstream release
    - Drop the usage of threading.Thread and ensure the multiprocessing.Pool
      is closed after the job is complete, this greatly reduces the system
      load and stops the aggressive polling multiprocessing worker pools
      used (LP: #906916)
    - ported to libdee API changes
    - ported to libunity API changes
  * debian/gwibber-service.pyinstall, debian/gwibber-service.install
    - Use a .pyinstall file to handle instaling stuff so we don't have to
      copy custom.py
  * debian/rules
    - drop the copy of custom.py, it gets installed with .pyinstall file now
  * debian/control
    - bump build depends for libunity-dev and libdee-dev
    - renamed build dep to gtkspell-3-dev
 -- Ken VanDine <email address hidden> Fri, 13 Jan 2012 12:38:23 +0100

Changed in gwibber (Ubuntu):
status: Triaged → Fix Released
Changed in gwibber (Ubuntu):
assignee: Ken VanDine (ken-vandine) → nobody
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.