[SRU] os.waitpid() returns immediately

Bug #1078232 reported by Pádraig Brady
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
High
Unassigned
python-eventlet (Ubuntu)
Fix Released
High
Adam Gandelman
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

This was noticed in bug #1074257 against openstack-quantum

The fix is a trivial one liner:
https://bitbucket.org/which_linden/eventlet/pull-request/24/fix-waitpid-returning-0-0-and-add-test/diff

The proposed workarounds in quantum seem too invasive, and
a simple update to eventlet seems like the best and easiest course here.

Fedora / EPEL have already been updated with the fix

* SRU Justification *

[Impact]

When using eventlet to monkey patch the os module, os.waitpid
incorrectly returns immediately with rc 0 regardless of whether
or not the child has exited, even in cases where WNOHANG is specified.
set. See the upstream bug for more info [1].

This causes obviously incorrect behavior (as demonstrated by the attached
test case) and also more subtle and annoying bugs like Bug #1074257.

[1] https://bitbucket.org/which_linden/eventlet/issue/92/

[Test Case]

The following python code is a simple test case. The output should be
'1' (as is when there is no eventlet paching). Without the proposed fix
the subprocess module returns immediately with rc '0'.

#!/usr/bin/python
import subprocess
import eventlet

eventlet.monkey_patch(all=False, os=True)

process = subprocess.Popen("sleep 0.1 && false", shell=True)
print process.wait()

[Regression Potential]

Minimal. The fix is a trivial one-liner and is accompanied by a test case.

Changed in python-eventlet (Ubuntu):
assignee: nobody → Adam Gandelman (gandelman-a)
importance: Undecided → High
Changed in python-eventlet (Ubuntu):
status: New → Confirmed
Changed in python-eventlet (Ubuntu Precise):
status: New → Confirmed
Changed in python-eventlet (Ubuntu Quantal):
status: New → Confirmed
tags: added: rls-q-incoming rls-r-incoming
summary: - os.waitpid() returns immediately
+ [SRU] os.waitpid() returns immediately
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-eventlet - 0.9.17-0ubuntu2

---------------
python-eventlet (0.9.17-0ubuntu2) raring; urgency=low

  * debian/patches/fix_waitpid_rc.patch: Properly block on child processes
    and return correct return codes. Cherry-picked from upstream VCS.
    (LP: #1078232)
 -- Adam Gandelman <email address hidden> Mon, 26 Nov 2012 09:13:04 -0800

Changed in python-eventlet (Ubuntu):
status: Confirmed → Fix Released
Changed in cloud-archive:
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Pádraig, or anyone else affected,

Accepted python-eventlet into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-eventlet/0.9.17-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-eventlet (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in python-eventlet (Ubuntu Precise):
status: Confirmed → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Pádraig, or anyone else affected,

Accepted python-eventlet into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-eventlet/0.9.16-1ubuntu4.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Miklos Juhasz (mjuhasz) wrote :

I ran the python code in the testcase and I can confirm that the proposed package fixes this bug (Ubuntu 12.04 - Precise).

tags: added: verification-done
removed: verification-needed
James Page (james-page)
Changed in cloud-archive:
importance: Undecided → High
tags: removed: rls-q-incoming rls-r-incoming
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-eventlet - 0.9.17-0ubuntu1.1

---------------
python-eventlet (0.9.17-0ubuntu1.1) quantal-proposed; urgency=low

  * debian/patches/fix_waitpid_rc.patch: Properly block on child processes
    and return correct return codes. Cherry-picked from upstream VCS.
    (LP: #1078232)
 -- Adam Gandelman <email address hidden> Mon, 26 Nov 2012 09:49:34 -0800

Changed in python-eventlet (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-eventlet - 0.9.16-1ubuntu4.2

---------------
python-eventlet (0.9.16-1ubuntu4.2) precise-proposed; urgency=low

  * debian/patches/fix_waitpid_rc.patch: Properly block on child processes
    and return correct return codes. Cherry-picked from upstream VCS.
    (LP: #1078232)
 -- Adam Gandelman <email address hidden> Mon, 26 Nov 2012 10:40:29 -0800

Changed in python-eventlet (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in cloud-archive:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.