JDK-8163348 : java/lang/ThreadGroup/Stop.java fails intermittently
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P5
  • Status: Closed
  • Resolution: Other
  • Submitted: 2016-08-08
  • Updated: 2017-01-20
  • Resolved: 2017-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.
Other
tbd_minorResolved
Related Reports
Relates :  
Description
java/lang/ThreadGroup/Stop.java fails intermittently, even after JDK-8132548
But now looks like not test issue anymore.

----------System.err:(15/874)----------
java.lang.InterruptedException
	at java.lang.Object.wait(java.base@9-ea/Native Method)
	at java.lang.Thread.join(java.base@9-ea/Thread.java:1352)
	at java.lang.Thread.join(java.base@9-ea/Thread.java:1426)
	at Stop.main(Stop.java:65)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:843)


The exception is from Thread.join(), from line 65:
        // Launch two threads as part of the same thread group
        first.start();
        second.start();

        // Check that the second thread is terminated when the
        // first thread terminates the thread group.
65:   second.join();
        // Test passed - if never get here the test times out and fails.


Also note that .jtr log shows the "main" elapsed 120 seconds:

...
#section:main
----------messages:(4/123)----------
command: main Stop
reason: Assumed action based on file name: run main Stop 
Mode: agentvm
elapsed time (seconds): 120.005

...

Is the "main" (and all) thread be Interrupted by jtreg? (120 seconds is the jtreg "default timeout" )
Comments
Failure is not reproducible after JDK-8163553, closing.
20-01-2017

If run in samevm I would guess that jtreg may interrupt all other threads.
08-08-2016