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 638780 - "Open" and "Open Folder" context menu items in Deluge cause 100% CPU usage
"Open" and "Open Folder" context menu items in Deluge cause 100% CPU usage
Status: RESOLVED DUPLICATE of bug 640738
Product: pygtk
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-05 22:46 UTC by zurih
Modified: 2011-02-03 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test case. (265 bytes, text/x-python)
2011-01-27 19:07 UTC, Juha Sahakangas
Details

Description zurih 2011-01-05 22:46:17 UTC
In Deluge, when using the "Open" or "Open Folder" context menu actions, the CPU usage of Deluge is 100%.

This has been reported by Deluge team as a Pygtk bug.

Details here: http://dev.deluge-torrent.org/ticket/1396
Comment 1 Simon van der Linden 2011-01-06 07:45:23 UTC
Thanks for taking the time to report this bug.
This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.
Comment 2 zurih 2011-01-06 08:36:48 UTC
Overview: Deluge CPU usage is 100% after using Open or Open Folder 

context menu actions

Steps to Reproduce:

    1) Start downloading a Torrent in Deluge.
    2) Check the CPU usage of Deluge in "top" (from terminal).
    2) After download has been started for about 2 minutes, right-click the 

torrent, and then click "Open Folder".
    3) Re-check the CPU usage of Deluge in "top".

Actual Results:

    The CPU usage of Deluge is 100% after using "Open Folder".

Expected Results: 

    The CPU usage shouldn't be affected by using "Open Folder" or 

"Open" context menu actions.

Build Date & Platform:

    gtk_version: (2, 22, 0)
    pygtk_version: (2, 21, 0)
    Platform: Ubuntu x86_64 2.6.35-24-generic
    Deluge Core version: 1.3.0
    libtorrent version: 0.15.4.0

Additional Builds and Platforms:

    It's been reported, but not confirmed, that it doesn't happen in 32bit platforms.
Comment 3 Simon van der Linden 2011-01-06 08:49:48 UTC
We are not going to debug whatever application written using PyGTK, sorry. Please identify the PyGTK bug and provide a test case.
Comment 4 Juha Sahakangas 2011-01-27 19:07:33 UTC
Created attachment 179462 [details]
Test case.

Adapted test case from bug 481569.

This seems to be caused by broken backporting of the last patch in that bug to pygtk. 

pygobject does this:
    unsigned char dummy;
    gssize ret;
    if (poll_fd->revents & G_IO_IN)
	ret = read(poll_fd->fd, &dummy, 1);

and pygtk does this:
    int data_size = 0;
    if (poll_fd->revents & G_IO_IN)
        data_size = read(poll_fd->fd, 0, 1);

Reading to null obviously fails, and bang.
Comment 5 Antoine Martin 2011-02-03 09:52:45 UTC
FYI, this patch fixes it (came to the same conclusion on the same day):

https://bugzilla.gnome.org/show_bug.cgi?id=640738#c3
Comment 6 John Stowers 2011-02-03 20:38:59 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.

*** This bug has been marked as a duplicate of bug 640738 ***