Issue1351
Created on 2009-05-20.09:29:36 by otmarhumbel, last changed 2009-05-22.02:43:37 by pjenvey.
msg4701 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2009-05-20.09:29:35 |
|
The following could be reproduced both on Windows XP and Windows Vista,
using Jython 2.5rc2:
C:\stuff\jython\jython-2.5rc2>jython
Jython 2.5rc2 (Release_2_5rc2:6341, May 11 2009, 17:07:28)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_13
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> import sys
>>> cmd_line = [ sys.executable, '-m', 'runpy', 'fnordl9203828xyz' ]
>>> subprocess.call(cmd_line)
Traceback (most recent call last):
#snipped
ImportError: No module named fnordl9203828xyz
>>> subprocess.call(cmd_line, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
#running for ever
|
msg4705 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-05-22.02:43:35 |
|
Turns out this is just an abuse of subprocess.call. The code is
originally from test_cmd_line, doh
call just wait()s, it doesn't consume the PIPEs we specify. With nothing
consuming those pipes, the child can deadlock after writing enough
output to fill the pipe's buffer
The -m runpy fnordXXX was the only trigger because it wrote enough
output (a traceback) to fill the buffer, and it only happened on Windows
because Windows has a pretty small pipe buf
The author of subprocess confirms that this is indeed a bad idea here:
http://mail.python.org/pipermail/python-dev/2006-June/066111.html
fixed in r6363
|
|
Date |
User |
Action |
Args |
2009-05-22 02:43:37 | pjenvey | set | status: open -> closed keywords:
+ test failure causes resolution: fixed messages:
+ msg4705 |
2009-05-21 05:20:44 | pjenvey | set | assignee: pjenvey nosy:
+ pjenvey |
2009-05-20 09:29:36 | otmarhumbel | create | |
|