After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611050 - Calling gobject.threads_init() causes a lot of wakeups
Calling gobject.threads_init() causes a lot of wakeups
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
Git Master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-25 08:29 UTC by Philippe Normand
Modified: 2010-04-18 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (5.75 KB, patch)
2010-02-25 09:57 UTC, Philippe Normand
needs-work Details | Review
gtk_main: fixed use of Python's SetWakeupFD API (5.75 KB, patch)
2010-04-14 19:47 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2010-02-25 08:29:49 UTC
+++ This bug was initially created as a clone of Bug #481569 +++

Hi,

I'm the author of an audio player that uses PyGTK, and I have been notified that my player wakes up very frequently:

https://bugs.launchpad.net/decibel-audio-player/+bug/144034

After some tests using powertop, If found that the call to gobject.threads_init() is the culprit. Even without any threads, wakeups are there just because of this call.

So I'm not saying there's a bug in the way threads are managed in PyGTK, maybe these wakeups are needed, I just wanted to report that issue.
Comment 1 Philippe Normand 2010-02-25 09:57:01 UTC
Created attachment 154669 [details] [review]
proposed patch

Backport from Bug 481569
Comment 2 John Ehresman 2010-02-25 15:18:57 UTC
Are you saying the fix in bug 481569 doesn't work or you want the patch backported to an older version of pygobject / pygtk?
Comment 3 Philippe Normand 2010-02-25 15:28:48 UTC
(In reply to comment #2)
> Are you saying the fix in bug 481569 doesn't work or you want the patch
> backported to an older version of pygobject / pygtk?

The fix in bug 481569 works. The patch is that bug needs to be ported to pygtk with some little pygtk modifications that I did.
Comment 4 Philippe Normand 2010-04-06 08:09:08 UTC
I don't have commit rights, can some committer land this patch for me please?
Comment 5 Gian Mario Tagliaretti 2010-04-06 20:40:12 UTC
(In reply to comment #4)
> I don't have commit rights, can some committer land this patch for me please?

./gtk.override: In function ‘pygtk_main_watch_check’:
./gtk.override:1156: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result

would you please check the warning and update the patch?
Comment 6 Philippe Normand 2010-04-14 19:47:21 UTC
Created attachment 158751 [details] [review]
gtk_main: fixed use of Python's SetWakeupFD API

I backported the last patch from Bug 481569.
Comment 7 Gian Mario Tagliaretti 2010-04-18 16:24:09 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.