Created attachment 901129 [details]
Description of problem:
The subprocess module double closes the file pipefds on error.
The above issue when the subprocess used with eventlet and probably by using regular threads can lead to fatal issue,
when one thread closes another treads file descriptor.
In the attached program, the subprocess closes the epoll fd of the evenentlet.
Eventlet tries to handle the network socket as epollfd, by adding the newly created connection (fd=3) to the closed epfd (fd=3), which causes EINVAL.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install eventlet
2. Run the attached program.
[Errno 22] Invalid argument
$ python test_double_close.py
Please backport http://hg.python.org/cpython/rev/43749cb6bdbd
or upgrade python 2.7.x to >= 2.7.6
Python 3.3.2 also affected.
BTW I've run the test in  (upstream test for this feature for Python 3) on current F20 build of python3 and it doesn't fail - also, judging from the comments in the upstream bug, I think this is fixed in 3.3.2.
python-2.7.5-12.fc20 has been submitted as an update for Fedora 20.
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-2.7.5-12.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
python-2.7.5-12.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1110147 has been marked as a duplicate of this bug. ***
*** Bug 1044336 has been marked as a duplicate of this bug. ***
*** Bug 1129239 has been marked as a duplicate of this bug. ***
*** Bug 963267 has been marked as a duplicate of this bug. ***
*** Bug 1047050 has been marked as a duplicate of this bug. ***
*** Bug 1178319 has been marked as a duplicate of this bug. ***
*** Bug 1204320 has been marked as a duplicate of this bug. ***