Here is the problem description from the customer reporting the bug.
I have verified that on solaris with jdk1.4 the test program works as
they expected so this does appear to be a w2k issue. I have attacted
the java sources mentioned in the report.
--
Steve
I have attached two Java source files that should reveal the JDK 1.4
ServerSocket timeout bug that we are seeing. The bug is that sockets
spawned by a ServerSocket seem to inherit the ServerSocket's timeout
value. This behavior differs from that in previous (JDK 1.3.1 and
earlier) releases where the spawned sockets had no initial socket
timeout value. Note that we are seeing this bug on a Windows 2000
machine running JDK 1.4 beta 3. We have not tested it on a Solaris box
yet.
To test, start the receiver client first ("java Recv") and then start
the sender client on the same machine with the desired timeout ("java
Send <timeout in seconds>"). Using a 1.4 VM, a timeout value of 6 or
greater will cause a socket timeout exception on the receiver client
while a timeout of 5 or less will work normally. On a 1.3.1 VM the code
should work with no timeout exceptions regardless of the sender timeout
value specified.
Other items of note:
1) A call to getSoTimeout() on a spawned socket in a 1.4 VM will return
the expected value of zero (0) even though the socket's behavior
indicates it is using a timeout.
2) A call to setSoTimeout() with a value of zero (0) on a spawned socket
in a 1.4 VM will deactivate the erroneously inherited timeout.
Note that the information above is contained in a comment block at the
beginning of each of the source modules.
Ben Ryan
Alerts, Inc.
Senior Java Developer
I have verified that on solaris with jdk1.4 the test program works as
they expected so this does appear to be a w2k issue. I have attacted
the java sources mentioned in the report.
--
Steve
I have attached two Java source files that should reveal the JDK 1.4
ServerSocket timeout bug that we are seeing. The bug is that sockets
spawned by a ServerSocket seem to inherit the ServerSocket's timeout
value. This behavior differs from that in previous (JDK 1.3.1 and
earlier) releases where the spawned sockets had no initial socket
timeout value. Note that we are seeing this bug on a Windows 2000
machine running JDK 1.4 beta 3. We have not tested it on a Solaris box
yet.
To test, start the receiver client first ("java Recv") and then start
the sender client on the same machine with the desired timeout ("java
Send <timeout in seconds>"). Using a 1.4 VM, a timeout value of 6 or
greater will cause a socket timeout exception on the receiver client
while a timeout of 5 or less will work normally. On a 1.3.1 VM the code
should work with no timeout exceptions regardless of the sender timeout
value specified.
Other items of note:
1) A call to getSoTimeout() on a spawned socket in a 1.4 VM will return
the expected value of zero (0) even though the socket's behavior
indicates it is using a timeout.
2) A call to setSoTimeout() with a value of zero (0) on a spawned socket
in a 1.4 VM will deactivate the erroneously inherited timeout.
Note that the information above is contained in a comment block at the
beginning of each of the source modules.
Ben Ryan
Alerts, Inc.
Senior Java Developer
- duplicates
-
JDK-4508149 connected Socket is inheriting ServerSocket timeout
-
- Resolved
-