SRU: 100% CPU usage when calling a child process from a python script
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyGTK |
Unknown
|
Unknown
|
|||
pygtk (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned | ||
Natty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
== 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-
== 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.
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:/
The code in which I noticed this problem is in the videometadata.py module of Rapid Photo Downloader: http://
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: python-gtk2 2.21.0-0ubuntu1
ProcVersionSign
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
SourcePackage: pygtk
Changed in pygtk (Ubuntu): | |
status: | New → Confirmed |
summary: |
- 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 |
Changed in pygtk (Ubuntu): | |
assignee: | nobody → Chris Halse Rogers (raof) |
Changed in pygtk (Ubuntu Maverick): | |
status: | New → Confirmed |
tags: | added: testcase |
Changed in pygtk (Ubuntu Lucid): | |
status: | New → Won't Fix |
Changed in pygtk (Ubuntu Maverick): | |
status: | Fix Committed → Won't Fix |
Here is the upstream bug: /bugzilla. gnome.org/ show_bug. cgi?id= 640738
https:/
I have tested the fix and it works. I believe Debian has already merged a patch for pygtk 2.17, Ubuntu should probably fix all versions, not just natty, as this affects maverick at least (I can confirm) and probably also lucid (I have not tested).
It also affects virt-manager (and probably many other applications): /bugs.launchpad .net/ubuntu/ +source/ pygtk/+ bug/707313
https:/