Eventlet crashes because of subprocess

Created by Soren Hansen
Keywords:
eventlet greenpipe subprocess

The current version of Eventlet has a bug in it related to its interaction with the `subprocess` module.

It will generate a stacktrace like:

(nova): TRACE: stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
(nova): TRACE: File "/usr/lib64/python2.6/site-packages/eventlet/green/subprocess.py", line 31, in __init__
(nova): TRACE: wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
(nova): TRACE: File "/usr/lib64/python2.6/site-packages/eventlet/greenio.py", line 376, in __init__
(nova): TRACE: raise TypeError('f(ile) should be int, str, unicode or file, not %r' % f)
(nova): TRACE: TypeError: f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0xf54ea8>

The issue is discussed here:

https://bitbucket.org/which_linden/eventlet/issue/77/subprocess-module-fails-if-os-module-is

You have two routes:

1. Use the ppa

2. Apply the patch included in the link. You can do something like:

pushd /usr/lib64/python2.6/site-packages/eventlet
curl https://bitbucket-assetroot.s3.amazonaws.com/which_linden/eventlet/20110214/77/greenpipe-wrap.patch | patch
popd