FULL PRODUCT VERSION :
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 :
The main program will not hang.
This bug can be reproduced always.