glib2reactor/gtk2reactor polls at 10 Hz even when unneeded

Bug #571648 reported by Paul Sladen
94
This bug affects 17 people
Affects Status Importance Assigned to Milestone
The Ubuntu Power Consumption Project
Fix Released
Low
Unassigned
Twisted
Fix Released
Unknown
twisted (Ubuntu)
Fix Released
High
Unassigned
Declined for Maverick by Martin Pitt
Precise
Fix Released
High
Unassigned

Bug Description

Binary package hint: ubuntuone-client

I do not use Ubuntu One, or have an account; however:

  sudo powertop

shows:

 Top causes for wakeups:
   1.1% ( 10.0) ubuntuone-syncd

Ideally -syncd should not being waking up 10 times per second for polling, and should definitely ideally not be doing so if it is not specifically activated in the first place

Paul Sladen (sladen)
summary: - -syncd polls at 10 Hz despite not even being enabled/signed up
+ -syncd polls at 10 Hz when not enabled/signed up
Changed in ubuntuone-client (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Lucio Torre (lucio.torre)
assignee: Lucio Torre (lucio.torre) → Ubuntu One Foundations+ team (ubuntuone-foundations+)
Revision history for this message
Guillermo Gonzalez (verterok) wrote : Re: -syncd polls at 10 Hz when not enabled/signed up

Hi Paul,

This is a know issue with the twisted glib2reactor, which uses the glib main loop (Syncdaemon requires glib in order to use DBus)

The fix would be to have a non-glib mainloop for python-dbus or fix glib(?) to avoid polling 10 times/second. The main issue with the first approach is that python-dbus doesn't not support other mainloops (yet)

Revision history for this message
dobey (dobey) wrote : Re: [Bug 571648] Re: -syncd polls at 10 Hz when not enabled/signed up

On Thu, 2010-04-29 at 17:08 +0000, Guillermo Gonzalez wrote:
> Hi Paul,
>
> This is a know issue with the twisted glib2reactor, which uses the glib
> main loop (Syncdaemon requires glib in order to use DBus)
>
> The fix would be to have a non-glib mainloop for python-dbus or fix
> glib(?) to avoid polling 10 times/second. The main issue with the first
> approach is that python-dbus doesn't not support other mainloops (yet)

Actually, the problem specifically here is the twisted glib mainloop
reactor integration. It plays with the timing internally and sets up a
timeout which causes the 10 times per second wakeups. If it were glib,
practically everything running in Ubuntu would be doing the same thing.

There is already a bug filed about this against ubuntuone-client,
though. And there was an attempt to fix the issue at one point, but it
wasn't working correctly and we had to back the change out.

Revision history for this message
Guillermo Gonzalez (verterok) wrote : Re: -syncd polls at 10 Hz when not enabled/signed up

yes, sorry. I meant glib-twisted reactor not glib itself.

Revision history for this message
Paul Sladen (sladen) wrote :

The Glib mainloop is an event-based message-passing loop, it is not going be the cause of polling. A client of the mainloop (eg. ubuntuone-syncd, or one of its libraries) is actively going out of its way to set up a timer and is _requesting_ to be called at 10Hz.

Whatever is _requesting_ to be called at 10 Hz is broken ...it should not be creating that repeating timer request, and instead should be redesigned to setup and listen for the true event it's actually after.

Revision history for this message
Sergey Nizovtsev (snizovtsev) wrote :

I think it shouldn't be marked as ubuntuone-client bug. This is twisted glib2 reacotor bug. "gm-notify" (gmail notifier) have this issue too.

Revision history for this message
Sergey Nizovtsev (snizovtsev) wrote :

This bug in the twisted bug tracker:
http://twistedmatrix.com/trac/ticket/4376

Changed in twisted:
status: Unknown → New
Changed in twisted:
status: New → Fix Released
Revision history for this message
Itamar Turner-Trauring (itamarst) wrote :

If anyone would like to test the fixed glib reactor with ubuntuone-syncd I'd appreciate it, that way if there's any problems we can fix them before the next Twisted release.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in twisted (Ubuntu):
status: New → Confirmed
dobey (dobey)
Changed in ubuntuone-client (Ubuntu):
assignee: Ubuntu One Foundations+ team (ubuntuone-foundations+) → nobody
status: Triaged → Invalid
Changed in twisted (Ubuntu):
importance: Undecided → High
dobey (dobey)
no longer affects: ubuntuone-client (Ubuntu)
no longer affects: ubuntuone-client (Ubuntu Lucid)
no longer affects: ubuntuone-client (Ubuntu Natty)
no longer affects: ubuntuone-client (Ubuntu Oneiric)
no longer affects: ubuntuone-client (Ubuntu Precise)
dobey (dobey)
summary: - -syncd polls at 10 Hz when not enabled/signed up
+ glib2reactor/gtk2reactor polls at 10 Hz even when unneeded
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in twisted (Ubuntu Lucid):
status: New → Confirmed
Changed in twisted (Ubuntu Natty):
status: New → Confirmed
Changed in twisted (Ubuntu Oneiric):
status: New → Confirmed
Revision history for this message
Glyph Lefkowitz (glyph) wrote :

Apparently the bug watch updater is a bit overzealous: the status in Twisted ought to be "fix committed", not "fix released".

Martin Pitt (pitti)
Changed in ubuntu-power-consumption:
status: New → Triaged
importance: Undecided → Low
no longer affects: twisted (Ubuntu Lucid)
no longer affects: twisted (Ubuntu Natty)
no longer affects: twisted (Ubuntu Oneiric)
Changed in twisted (Ubuntu Precise):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package twisted - 11.1.0-1ubuntu1

---------------
twisted (11.1.0-1ubuntu1) precise; urgency=low

  * debian/patches/00_gi_gtk3reactor.patch:
    - Backport gireactor/gtk3reactor and gtk2reactor refactor from svn
      (LP: #571648, LP: #851187)
 -- Rodney Dawes <email address hidden> Wed, 15 Feb 2012 21:39:07 -0500

Changed in twisted (Ubuntu Precise):
status: Triaged → Fix Released
Changed in ubuntu-power-consumption:
status: Triaged → 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.