JDK-8282133 : TcpTest and UdpTest from java/net/ipv6tests fail on Windows 11
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 19
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows
  • CPU: x86_64
  • Submitted: 2022-02-18
  • Updated: 2024-06-10
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
Couple of tests started to fail on my machine recently.
TcpTest

----------System.out:(10/306)----------
Local Addresses
/192.168.1.27
/fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0
Test1: OK
server bound to /192.168.1.27:0
connecting to /fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0
binding to /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:0
connecting to /192.168.1.27
Test2: OK
checkTime: got = 7522 start = 5000 end = 5000
----------System.err:(13/668)----------
java.lang.RuntimeException: checkTime failed: got 7522, expected between 5000 and 5000
	at Tests.checkTime(Tests.java:164)
	at Tests.checkTime(Tests.java:155)
	at TcpTest.test3(TcpTest.java:202)
	at TcpTest.main(TcpTest.java:76)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:828)


UdpTest

----------System.out:(17/600)----------
Local Addresses
/192.168.1.27
/fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0
Test1 starting
dest1 = /192.168.1.27:54924
dest2 = /192.168.1.27:54925
dest1 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54926
dest2 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54927
dest1 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54928
dest2 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54929
dest1 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54930
dest2 = /192.168.1.27:54931
dest2 = /[fe80:0:0:0:18a8:119d:4bf9:d1ae%eth0]:54932
dest2 = /192.168.1.27:54932
Test1: OK
Test2 starting
checkTime: got = 6006 start = 4000 end = 4000
----------System.err:(13/668)----------
java.lang.RuntimeException: checkTime failed: got 6006, expected between 4000 and 4000
	at Tests.checkTime(Tests.java:164)
	at Tests.checkTime(Tests.java:155)
	at UdpTest.test2(UdpTest.java:147)
	at UdpTest.main(UdpTest.java:88)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:828)
Comments
It is the checkTime method and the quasi realtime constraint in the test -- this can't be always satisfied and a number of factors in the execution environment can affect the elapsed time calculation. The actual time recorded in the test after the timeout can only be assumed to be >= 4000 msecs of the timeout. We've seen UdpTest fail for this reason previously as per https://bugs.openjdk.java.net/browse/JDK-8281511
19-02-2022