United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6404388 : VISTA: Socket setTcpNoDelay & setKeepAlive working incorrectly

Details
Type:
Bug
Submit Date:
2006-03-27
Status:
Resolved
Updated Date:
2012-03-23
Project Name:
JDK
Resolved Date:
2006-05-13
Component:
core-libs
OS:
windows_vista
Sub-Component:
java.net
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.3.1_18,1.4.2_11,5.0u7,5.0u8,6
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Duplicate:
Duplicate:
Relates:

Sub Tasks

Description
Socket.setTcpNoDelay & Socket.setKeepAlive are no working as expected on Windows Vista  beta 2 (build 5308). 

You can test this easily by calling Socket.setTcpNoDelay() followed by Socket.getTcpNoDelay(). The value returned from the get will not match that passed to the set, e.g
   ..\bin\java TestTcpNoDelay
	Get TCP_NODELAY = true
	Set TCP_NODELAY to false
	Get TCP_NODELAY = true

This is a native vista issue and can be reproduced by a simple native testcase (attached, TestSOKEEPALIVE.c, TestTCPNODELAY). This needs to be fixed in the vista platform.
 Native Tests show:
   T:\6358574>TestTCPNODELAY
	Get TCP_NODELAY = 4198656
	Set TCP_NODELAY = 1
	Get TCP_NODELAY = 4198657
  
   T:\6358574>TestSOKEEPALIVE
        Get SO_KEEPALIVE = 5120
        Set SO_KEEPALIVE = 1
        Get SO_KEEPALIVE = 5121

This is causing the following jck failures (7):
  api/java_net/Socket/descriptions.html#setTcpNoDelay
  api/java_net/Socket/descriptions.html#setKeepAlive
  api/javax_net/SocketFactory/index.html#SocketFactory001[SocketFactory001]
  api/javax_net/SocketFactory/index.html#SocketFactory002[SocketFactory002]
  api/javax_net/SocketFactory/index.html#SocketFactory003[SocketFactory003]
  api/javax_net/SocketFactory/index.html#SocketFactory004[SocketFactory004]
  api/javax_net/SocketFactory/index.html#SocketFactory005[SocketFactory005]

                                    

Comments
EVALUATION

see description
                                     
2006-03-28
EVALUATION

initialize the int being sent passed to getsockopt. For some reason vista requires this memory to be initialized. It was not required in previous windows platforms.
                                     
2006-04-28



Hardware and Software, Engineered to Work Together