Bug 562825 - 100% CPU usage with Python 2.6 + twisted framework using glib2 or gtk2 reactors
Summary: 100% CPU usage with Python 2.6 + twisted framework using glib2 or gtk2 reactors
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: pygobject2
Version: 12
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-08 14:07 UTC by Andrew Bird
Modified: 2011-01-27 11:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 660137 (view as bug list)
Environment:
Last Closed: 2010-12-03 23:08:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test Program that shows the problem (510 bytes, text/x-python)
2010-02-08 14:07 UTC, Andrew Bird
no flags Details
another test case that causes pygtk/twisted to get into a spin (939 bytes, text/x-python)
2010-11-21 17:54 UTC, Antoine Martin
no flags Details

Description Andrew Bird 2010-02-08 14:07:19 UTC
Created attachment 389517 [details]
Test Program that shows the problem

The Vodafone mobile connect application
http://forge.betavine.net/projects/vodafonemobilec/
uses Python twisted for async operations. When run on some python 2.6 based machines after launching a subprocess the twisted reactor consumes 100% of cpu. 
We (Betavine) have reports of the problem with OpenSuse, Fedora and Moblin, but not Ubuntu. It seems that the problem has been fixed on Ubuntu machines because a test program(attached) does not exhibit the problem on there. Here's a link to the twisted bug report, where the finger is pointed at glib2
http://twistedmatrix.com/trac/ticket/3981

Thanks

Andrew

Comment 1 Matthias Clasen 2010-02-13 03:43:37 UTC
I know very little about python and nothing about twisted, so the chances of me fixing this with no more information than 'this is a bug in glib' in the bug is very slim.

I would recommend to encourage the twisted guys to file an bug against glib upstream, and include relevant information. They should have some. How would they determine that this is a glib problem, otherwise ?

Comment 2 Andrew Bird 2010-02-13 10:29:39 UTC
I reopened the ticket on the twisted bugtracker and asked.
   http://twistedmatrix.com/trac/ticket/3981
Thanks

Comment 3 Matthias Clasen 2010-02-14 04:27:19 UTC
Ah, so this is actually a pygobject2 issue.

Comment 4 Gianluca Sforna 2010-03-14 17:55:13 UTC
so the ticket says it's solved upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=481569#c82

not sure if it went into any release though

Comment 5 Andrew Bird 2010-03-15 09:23:17 UTC
Well I figure it can't have made it upstream. Since it's been working for ages in Ubuntu, but not in Fedora or Suse I suspect that Ubuntu must be carrying a local patch.

Comment 6 Gianluca Sforna 2010-03-16 10:13:06 UTC
This should be the one:
http://git.gnome.org/browse/pygobject/commit/?id=a9c168c58cc6a449b51653417bf3f58bdd41457c

Which is probably a revision of patch 61 here:
http://patch-tracker.debian.org/package/pygobject/2.20.0-1

Comment 7 Andrew Bird 2010-03-25 07:40:38 UTC
Is is possible to get this patch applied to a Fedora package, I'd be happy to test on both Fedora 11 and 12?

Comment 8 Bug Zapper 2010-11-03 22:43:49 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Antoine Martin 2010-11-21 17:54:50 UTC
Created attachment 461848 [details]
another test case that causes pygtk/twisted to get into a spin

The test case included in this bug did not trigger the problem for me on Fedora 14 x86_64 fully up to date. This one does.

Comment 10 Antoine Martin 2010-11-21 17:56:38 UTC
The example test case I just posted is a simplified version of this one:
http://stackoverflow.com/questions/3617772/how-to-spawn-a-browser

This page also says:
"This was fixed in pygobject-2.21,0 and pygtk-2.17.0"
Which is clearly not the case...

I've gathered a few links on my own bug tracker:
http://winswitch.org/trac/ticket/90

Comment 11 Bug Zapper 2010-12-03 23:08:21 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Antoine Martin 2010-12-04 07:33:40 UTC
Please see comment no 9 and re-assign to Fedora 14.
This easily testable bug affects all versions of Fedora since Fedora 12, not just Fedora 12.

Comment 13 Antoine Martin 2011-01-27 11:07:23 UTC
I have since created a new bug for it, hoping it would get some attention, to no avail..

https://bugzilla.redhat.com/show_bug.cgi?id=660137


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