Related to testing socket channel sc.socket().getInputStream,
using this construct: new InputStreamReader(sc.socket().getInputStream() );
in non-blocking mode, win 98, win2000 throw the following exception
after reading 156 lines of a web-server response:
java.net.SocketException: Resource temporarily unavailable: JVM_recv in socket i
nput stream read
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:119)
at java.io.InputStreamReader$CharsetFiller.readBytes(InputStreamReader.j
ava:339)
at java.io.InputStreamReader$CharsetFiller.fill(InputStreamReader.java:3
74)
at java.io.InputStreamReader.read(InputStreamReader.java:511)
at java.io.BufferedReader.fill(BufferedReader.java:139)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at JVM.<init>(JVM.java:90)
at JVM.main(JVM.java:213)
In actuality, the test was used in bug 4430139 and should throw an Illegal
BlockingMode exception, but since the behavior is now divergent on windows,
from solaris and linux where no exception is thrown, a new bug was created.
If the test file JVM.java is set non-blocking true, or if all socket channel
calls are replace with socket calls, no exception is thrown. (Note: the
attached test case will report error for legacy bug 4430139).
Send test file to any webserver which uses port 8080:
java JVM -webServer polomski.eng.sun.com -v //solaris webserver
java JVM -webServer 129.144.250.222 -v //win98
Where an exception is thrown, only a zero-byte size .tmp file is
output.
(seen on build63 and forward)