-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b105
-
x86
-
windows_7
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8034657 | 7u65 | Ivan Gerasimov | P4 | Resolved | Fixed | b01 |
JDK-8023348 | 7u60 | Ivan Gerasimov | P4 | Closed | Fixed | b01 |
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
There are three Java applications, processB just starts processC which would run forever. main program starts processB and read its output. But if I use InputStream.read, it hangs at FileInputStream.readBytes.
private native int readBytes(byte b[], int off, int len) throws IOException;
If I use BufferedReader.readLine, it hangs at BufferedReader.read(),
public int read(char cbuf[], int offset, int length) throws IOException
Which calls StreamDecoder.read(char[], int, int) ===> hangs here.
I have tested this in JDK7, JDK6 and JDK1.5.
The code is as below - you will find that the main program never exits.
(EDITED BY uta: the code is in attachment)
REGRESSION. Last worked in version 6u29
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The main program will not hang.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8034657 (process) appA hangs when read output stream of appB which starts appC that runs forever
- Resolved
-
JDK-8023348 (process) appA hangs when read output stream of appB which starts appC that runs forever
- Closed
- duplicates
-
JDK-5069989 (process) Runtime.exec unnecessarily inherits open files (win)
- Closed
- relates to
-
JDK-8024660 TEST_BUG: java/lang/ProcessBuilder/*IOHandle.java leaving hotspot.log open in fastdebug builds
- Closed
-
JDK-6921885 (process) Multi-threaded re-entrance into Runtime.exec() affects child process's streams
- Resolved
-
JDK-8044321 (process) EOF does not occur reading input from spawned cmd.exe process
- Closed