JDK-6404388 : VISTA: Socket setTcpNoDelay & setKeepAlive working incorrectly
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.3.1_18,1.4.2_11,5.0u7,5.0u8,6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: generic,x86
  • Submitted: 2006-03-27
  • Updated: 2012-03-23
  • Resolved: 2006-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_14Fixed 6 b85Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
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 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.
28-04-2006

EVALUATION see description
28-03-2006