** Summary changed:

- os.waitpid() returns immediately
+ [SRU] os.waitpid() returns immediately

** Description changed:

  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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1078232

Title:
  [SRU] os.waitpid() returns immediately

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-eventlet/+bug/1078232/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to