GNOME Bugzilla – Bug 638780
"Open" and "Open Folder" context menu items in Deluge cause 100% CPU usage
Last modified: 2011-02-03 20:38:59 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
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.
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.
We are not going to debug whatever application written using PyGTK, sorry. Please identify the PyGTK bug and provide a test case.
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.
FYI, this patch fixes it (came to the same conclusion on the same day): https://bugzilla.gnome.org/show_bug.cgi?id=640738#c3
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 ***