Created attachment 901129 [details] test_double_close.py 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): python-libs-2.7.5-11.fc20.x86_64 How reproducible: always Steps to Reproduce: 1. Install eventlet 2. Run the attached program. Actual results: [Errno 22] Invalid argument Bug triggered Expected results: $ python test_double_close.py OK Please backport http://hg.python.org/cpython/rev/43749cb6bdbd or upgrade python 2.7.x to >= 2.7.6 Additional info: Python 3.3.2 also affected.
BTW I've run the test in [1] (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. [1] http://hg.python.org/cpython/rev/c11754defe1c
python-2.7.5-12.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-2.7.5-12.fc20
Package python-2.7.5-12.fc20: * 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: https://admin.fedoraproject.org/updates/FEDORA-2014-7538/python-2.7.5-12.fc20 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. ***