[issue12650] Subprocess leaks fd upon kill()

2011-08-19 Thread Charles-François Natali
Charles-François Natali added the comment: The test now passes on the buildbots, closing. -- status: open -> closed ___ Python tracker ___ __

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Charles-François Natali
Charles-François Natali added the comment: > This means that the child process didn't get reaped by _cleanup(). The most likely cause is that when _cleanup() calls waitpid(pid, WNOHANG), the child process hasn't exited yet. Since I had already set a rather high timeout to avoid this problem an

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 122f952add3c by Charles-François Natali in branch '3.2': Issue #12650: fix failures on some buildbots, when a subprocess takes a long http://hg.python.org/cpython/rev/122f952add3c New changeset a32ae2749cd1 by Charles-François Natali in branch 'def

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Charles-François Natali
Charles-François Natali added the comment: Reopening. The new tests are failing on solaris and Debian parallel buildbots: http://www.python.org/dev/buildbot/all/builders/x86 debian parallel 3.x/builds/2734/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/sparc solaris10 gcc

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Charles-François Natali
Charles-François Natali added the comment: Patch committed. This should also fix the original problem. Gabriele, thanks for the report. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 148d75d106f1 by Charles-François Natali in branch 'default': Issue #12650: Fix a race condition where a subprocess.Popen could leak http://hg.python.org/cpython/rev/148d75d106f1 -- ___ Python tracker

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ca7f109ce79 by Charles-François Natali in branch '3.2': Issue #12650: Fix a race condition where a subprocess.Popen could leak http://hg.python.org/cpython/rev/8ca7f109ce79 -- ___ Python tracker

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d358379c5fb by Charles-François Natali in branch '2.7': Issue #12650: only run the tests on Unix. http://hg.python.org/cpython/rev/7d358379c5fb -- ___ Python tracker

[issue12650] Subprocess leaks fd upon kill()

2011-08-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9ee802642d86 by Charles-François Natali in branch '2.7': Issue #12650: Fix a race condition where a subprocess.Popen could leak http://hg.python.org/cpython/rev/9ee802642d86 -- nosy: +python-dev ___ Pyth

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Ross Lagerwall
Ross Lagerwall added the comment: The patches look good and seem to fix the issue. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Charles-François Natali
Charles-François Natali added the comment: Alright. I tested this on default, and couldn't reproduce the FD leak. It turned out to be due to another bug, affecting only the code path which calls pure C _posixsubprocess (which is the only implementation left in 3.3, but 3.2 still has the old pur

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Charles-François Natali
Charles-François Natali added the comment: There's indeed a leak in your code, because you don't close the stdout and stderr file descriptors. Try with: subp.terminate() subp.stdout.close() subp.stderr.close() return True And you'll be just fine. The reason why this works wi

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread R. David Murray
Changes by R. David Murray : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread gabriele.trombetti
New submission from gabriele.trombetti : There seems to be a file descriptor (fd) leak in subprocess upon call to kill() and then destroying the current subprocess object (e.g. by scope exit) if the pipe functionality is being used. This is a reproducer: (Linux 2.6.25, Python 2.7.1 (r271:8683