JDK-8006560 : java/net/ipv6tests/B6521014.java fails intermittently
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-18
  • Updated: 2013-12-17
  • Resolved: 2013-01-20
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.
JDK 7 JDK 8
7u21Fixed 8 b75Fixed
Description
The test can be seen to fail intermittently on a very busy system. The test tries to bind to a "hardcoded" (relative to another) port number. I see no reason for specify the port number in this testcase. The socket needs to be bound to a specific address, but we should be able to specify a port of 0 (ephemeral port).

#section:main
----------messages:(3/115)----------
command: main B6521014
reason: Assumed action based on file name: run main B6521014 
elapsed time (seconds): 0.026
----------System.err:(19/935)----------
java.lang.RuntimeException: Test failed: cannot create socket.
	at B6521014.main(B6521014.java:125)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:477)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:706)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.BindException: Address already in use
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
	at java.net.Socket.bind(Socket.java:626)
	at B6521014.test2(B6521014.java:105)
	at B6521014.main(B6521014.java:123)
	... 6 more

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed: cannot create socket.


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed: cannot create socket.