Issue1508

classification
Title: Subprocess with stdout throws Exception
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: Bruce, fwierzbicki, gsnedders, pjenvey, seanogie
Priority: low Keywords:

Created on 2009-11-26.18:05:01 by gsnedders, last changed 2013-02-25.19:15:55 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
foo gsnedders, 2009-11-26.18:05:00 Testcase
Messages
msg5325 (view) Author: (gsnedders) Date: 2009-11-26.18:05:00
Running the attached file in Jython 2.5.1 causes the following to be 
thrown:

Exception in thread "_CouplerThread-1 (stdout)" Traceback (most recent 
call last):
  File "/usr/local/jython-2.5.1/Lib/subprocess.py", line 679, in run
    self.write_func(buf)
  File "/usr/local/jython-2.5.1/Lib/subprocess.py", line 679, in run
    self.write_func(buf)
ValueError: I/O operation on closed file
msg5326 (view) Author: Philip Jenvey (pjenvey) Date: 2009-11-28.20:42:05
I can't reproduce this on OS X. What platform are you running on?
msg5336 (view) Author: (gsnedders) Date: 2009-12-01.13:38:12
GNU/Linux x86, specifically Ubuntu 9.10.

Also, FWIW: $ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK Client VM (build 14.0-b16, mixed mode)
msg5338 (view) Author: Philip Jenvey (pjenvey) Date: 2009-12-03.01:36:27
I can't reproduce this on the Linux boxes I have access to, one running 
Sun Java x86_64, the other running OpenJDK x86

I don't see how this error could be triggered by this piece of code, 
that ValueError is only raised when calling a method on a closed Python 
file object. The subprocess module doesn't call close() on the files 
passed into it.

The stack trace is also odd, it suggests that write_func somehow ended 
up calling itself, which doesn't make any sense

Am I missing something here?
msg7359 (view) Author: Chih-Jung Chen (Bruce) Date: 2012-08-09.08:22:23
I get this exception in Win XP.

Exception in thread "_CouplerThread-2 (stdout)" Traceback (most recent call last):
  File "C:\jython2.7a2\Lib\subprocess.py", line 754, in run
    self.write_func(buf)
  File "C:\jython2.7a2\Lib\subprocess.py", line 754, in run
    self.write_func(buf)
ValueError: I/O operation on closed file
msg7475 (view) Author: Sean (seanogie) Date: 2012-10-12.10:56:51
I also get the below error using Robotframework on Linux and Windows.

Exception in thread "_CouplerThread-5 (stdout)" Traceback (most recent call last):
  File "/home/seanog.oconaire/jython2.5.2/Lib/subprocess.py", line 675, in run
    self.write_func(buf)
  File "/home/seanog.oconaire/jython2.5.2/Lib/subprocess.py", line 675, in run
    self.write_func(buf)
ValueError: I/O operation on closed file
History
Date User Action Args
2013-02-25 19:15:55fwierzbickisetversions: + Jython 2.5, - 2.5.2
2012-10-12 10:56:51seanogiesetnosy: + seanogie
messages: + msg7475
versions: + 2.5.2, - 2.7a2
2012-08-10 17:48:04fwierzbickisetnosy: + fwierzbicki
2012-08-09 08:22:24Brucesetnosy: + Bruce
messages: + msg7359
versions: + 2.7a2, - 2.5.1
2009-12-03 01:36:29pjenveysetpriority: low
messages: + msg5338
2009-12-01 13:38:13gsnedderssetmessages: + msg5336
2009-11-28 20:42:06pjenveysetmessages: + msg5326
2009-11-26 20:36:58pjenveysetassignee: pjenvey
nosy: + pjenvey
2009-11-26 18:05:01gsnedderscreate