JDK-8031661 : java/net/Authenticator/B4769350.java failed intermittently
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • Submitted: 2014-01-13
  • Updated: 2018-02-15
  • Resolved: 2014-02-17
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 JDK 9
7u181Fixed 8u162Fixed 9 b04Fixed
Related Reports
Relates :  
Description
TESTFAIL:java/net/Authenticator/B4769350.java
This test failed once in jdk8/b120 Solaris same-binaries run:

----------System.err:(16/909)----------
java.lang.RuntimeException: Authenticator was called 3 times. Should be 2
	at B4769350.except(B4769350.java:493)
	at B4769350.doServerTests(B4769350.java:416)
	at B4769350.runTest(B4769350.java:485)
	at B4769350.main(B4769350.java:468)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Authenticator was called 3 times. Should be 2
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Authenticator was called 3 times. Should be 2

Comments
Webrev: http://cr.openjdk.java.net/~tyan/amandaj/JDK-8031661/webrev.01/ Review Request : http://mail.openjdk.java.net/pipermail/net-dev/2014-February/008222.html
10-02-2014

Root Cause: In line 195 and 196, the two actions can be ordered by a happens-before relationship, which will cause synchronization fail. t1cond1latch.countDown(); t1cond2latch.await(); Suggested Fixes: Using only one CyclicBarrier ("t1Cond1") sync c1,c2 and main thread
10-02-2014