[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Changed in: pygtk (Ubuntu Lucid) Status: New => Won't Fix ** Changed in: pygtk (Ubuntu Maverick) Status: Fix Committed => Won't Fix -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script To manage notifications about this bug go to: https://bugs.launchpad.net/pygtk/+bug/664920/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Tags added: testcase -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script To manage notifications about this bug go to: https://bugs.launchpad.net/pygtk/+bug/664920/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Branch linked: lp:ubuntu/maverick-proposed/pygtk -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Accepted pygtk into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance! ** Tags removed: verification-done ** Tags added: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
For lucid, you need a different patch. Probably one of those if it is using 2.17 rather than 2.2x: http://patch-tracker.debian.org/patch/series/view/pygtk/2.17.0-4/60_pygtk-wakeupfd-fix.patch https://bugzilla.redhat.com/attachment.cgi?id=477006&action=diff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
In testing with my own python scripts I never saw the bug under Lucid. It appeared only with Maverick. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
I had a quick look at lucid but gtk.override seems really different and so I couldn't get the patch to apply. We'd need someone with more pygtk knowledge to port the patch to lucid's ** Changed in: pygtk (Ubuntu Maverick) Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Uploaded to maverick-proposed, waiting for SRU team to review. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Will this get a fix released to maverick ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Changed in: pygtk (Ubuntu Maverick) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Copied to oneiric as well. ** Changed in: pygtk (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
This bug was fixed in the package pygtk - 2.22.0-0ubuntu1.1 --- pygtk (2.22.0-0ubuntu1.1) natty-proposed; urgency=low * debian/patches/04_fix_100%_cpu_in_signal_handling.patch: - Upstream patch to fix thinko in pygtk signal handler glib source. Without this, the source _check function would read 0 bytes from the fd, resulting in the fd always having input and hence a busy-loop. Fixes 100% CPU usage in a variety of pygtk-using apps (LP: #664920) -- Christopher James Halse RogersTue, 26 Apr 2011 17:56:56 +1000 ** Changed in: pygtk (Ubuntu Natty) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
SRU verification for Natty: I have reproduced the problem with pygtk 2.22.0-0ubuntu1 in natty and have verified that the version of pygtk 2.22.0-0ubuntu1.1 in -proposed fixes the issue. Marking as verification-done ** Tags added: verification-done ** Tags removed: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Branch linked: lp:ubuntu/natty-proposed/pygtk -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Please fix in oneiric so that this can proceed to -updates. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Accepted pygtk into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance! ** Changed in: pygtk (Ubuntu Natty) Status: Confirmed => Fix Committed ** Tags added: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Also affects: pygtk (Ubuntu Lucid) Importance: Undecided Status: New ** Also affects: pygtk (Ubuntu Maverick) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Patch verified to work for me in Natty. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Oops, never mind, it *is* reproducible. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
@Chris: the test case in comment #7 doesn't cause 100% cpu for me, so I'm not sure it's a proper test case for SRU. But the debdiff in comment #8 is obviously correct on the face of it, so it seems like a reasonable patch to apply. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
Great to see this will be fixed in Natty, thanks Chris. Could this patch could also be backported to Maverick/Lucid? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Also affects: pygtk (Ubuntu Natty) Importance: Undecided Status: Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
The attached debdiff cherry-picks the upstream commit which fixes this. ** Patch added: "Debdiff for SRU package." https://bugs.launchpad.net/ubuntu/+source/pygtk/+bug/664920/+attachment/2089711/+files/cherry-pick-cpu-usage-fix.debdiff ** Changed in: pygtk (Ubuntu) Assignee: Chris Halse Rogers (raof) => (unassigned) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Description changed: - When creating a child process from a python script that uses pygtk 2.21, - such subprocess.check_call(), 100% of the CPU is used (technically, - 100% of the core the python interpreter is using). + == Impact == + + pygtk apps which handle signals busy-loop in the glib main loop + dispatch, causing 100% CPU usage after a signal is received. This + commonly occurs when spawned child processes exit. + + == TEST CASE == + + A simple testcase (pygtk-signal-testcase.py) is attached. To trigger + the bug, run the testcase and send the process SIGCHLD. When run with + pygtk 2.22-0ubuntu1 the test process will now consume 100% CPU. + + == Regression Potential == + + PyGTK is core infrastructure, so the potential impact of a regression is + high. However, the patch is small and clearly correct, and the file + descriptor being read from is nonblocking, so it should not cause + application hangs even if it tries to read more bytes than are there. + + + Original bugreport follows: + When creating a child process from a python script that uses pygtk 2.21, such subprocess.check_call(), 100% of the CPU is used (technically, 100% of the core the python interpreter is using). If the creation of the child processes are removed, the script runs as expected. According to user exarkun on the #python IRC channel, the problem may be manifesting when the child process exits. It may be related to a bug that was fixed in 9.10, but broken in 9.04. If that is the case, this is the relevant bug report: https://bugzilla.gnome.org/show_bug.cgi?id=481569 The code in which I noticed this problem is in the videometadata.py module of Rapid Photo Downloader: http://bazaar.launchpad.net/~dlynch3/rapid/trunk/annotate/head%3A/rapid/videometadata.py#L189 ProblemType: Bug DistroRelease: Ubuntu 10.10 Package: python-gtk2 2.21.0-0ubuntu1 ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4 Uname: Linux 2.6.35-22-generic x86_64 Architecture: amd64 Date: Thu Oct 21 22:51:42 2010 InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007) ProcEnviron: - PATH=(custom, user) - LANG=en_US.utf8 - SHELL=/bin/bash + PATH=(custom, user) + LANG=en_US.utf8 + SHELL=/bin/bash SourcePackage: pygtk ** Attachment added: "Simple testcase" https://bugs.launchpad.net/ubuntu/+source/pygtk/+bug/664920/+attachment/2089709/+files/pygtk-signal-testcase.py -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Changed in: pygtk (Ubuntu) Assignee: (unassigned) => Chris Halse Rogers (raof) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 664920] Re: SRU: 100% CPU usage when calling a child process from a python script
** Summary changed: - 100% CPU usage when calling a child process from a python script + SRU: 100% CPU usage when calling a child process from a python script -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/664920 Title: SRU: 100% CPU usage when calling a child process from a python script -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs