Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jdk17 Thread/UncaughtExceptionsTest.java simulateUncaughtExitEvent missing from stderr #11930

Closed
pshipton opened this issue Feb 9, 2021 · 30 comments

Comments

@pshipton
Copy link
Member

pshipton commented Feb 9, 2021

https://ci.eclipse.org/openj9/view/Test/job/Grinder/1503/
openjdk17 test java/lang/Thread/UncaughtExceptionsTest.java

12:35:21  STDOUT:
12:35:21  [TestNG] Running:
12:35:21    java/lang/Thread/UncaughtExceptionsTest.java
12:35:21  
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$ThreadIsDeadAfterJoin ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$ThreadIsDeadAfterJoin']
12:35:21  [2021-02-09T17:35:20.922998500Z] Gathering output for process 10052
12:35:21  [2021-02-09T17:35:21.344924800Z] Waiting for completion for process 10052
12:35:21  [2021-02-09T17:35:21.344924800Z] Waiting for completion finished for process 10052
12:35:21  Output and diagnostic info for process 10052 was saved into 'pid-10052-output.log'
12:35:21  OK
12:35:21  Exception in thread "Thread-3" java.lang.RuntimeException: simulateUncaughtExitEvent
12:35:21  	at UncaughtExitSimulator.throwRuntimeException(UncaughtExceptionsTest.java:94)
12:35:21  	at UncaughtExitSimulator.run(UncaughtExceptionsTest.java:96)
12:35:21  
12:35:21  [2021-02-09T17:35:21.344924800Z] Waiting for completion for process 10052
12:35:21  [2021-02-09T17:35:21.344924800Z] Waiting for completion finished for process 10052
12:35:21  [2021-02-09T17:35:21.360518200Z] Waiting for completion for process 10052
12:35:21  [2021-02-09T17:35:21.360518200Z] Waiting for completion finished for process 10052
12:35:21  test UncaughtExceptionsTest.test("ThreadIsDeadAfterJoin", 0, "OK", "Exception in thread "Thread-0".*simulateUncaughtExitEvent"): failure
12:35:21  java.lang.RuntimeException: 'Exception in thread "Thread-0".*simulateUncaughtExitEvent' missing from stderr 
12:35:21  
12:35:21  	at jdk.test.lib.process.OutputAnalyzer.stderrShouldMatch(OutputAnalyzer.java:361)
12:35:21  	at UncaughtExceptionsTest.test(UncaughtExceptionsTest.java:71)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
12:35:21  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:35:21  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:35:21  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
12:35:21  	at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
12:35:21  	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:821)
12:35:21  	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
12:35:21  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
12:35:21  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
12:35:21  	at org.testng.TestRunner.privateRun(TestRunner.java:773)
12:35:21  	at org.testng.TestRunner.run(TestRunner.java:623)
12:35:21  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
12:35:21  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
12:35:21  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
12:35:21  	at org.testng.SuiteRunner.run(SuiteRunner.java:259)
12:35:21  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
12:35:21  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
12:35:21  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
12:35:21  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
12:35:21  	at org.testng.TestNG.run(TestNG.java:1018)
12:35:21  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
12:35:21  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:35:21  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:35:21  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
12:35:21  	at java.base/java.lang.Thread.run(Thread.java:853)
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$MainThreadAbruptTermination ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$MainThreadAbruptTermination']
12:35:21  [2021-02-09T17:35:21.360518200Z] Gathering output for process 10852
12:35:21  [2021-02-09T17:35:21.797997500Z] Waiting for completion for process 10852
12:35:21  [2021-02-09T17:35:21.797997500Z] Waiting for completion finished for process 10852
12:35:21  Output and diagnostic info for process 10852 was saved into 'pid-10852-output.log'
12:35:21  OK
12:35:21  Exception in thread "main" java.lang.RuntimeException: simulateUncaughtExitEvent
12:35:21  	at UncaughtExitSimulator.throwRuntimeException(UncaughtExceptionsTest.java:94)
12:35:21  	at UncaughtExitSimulator$MainThreadAbruptTermination.main(UncaughtExceptionsTest.java:123)
12:35:21  
12:35:21  [2021-02-09T17:35:21.797997500Z] Waiting for completion for process 10852
12:35:21  [2021-02-09T17:35:21.797997500Z] Waiting for completion finished for process 10852
12:35:21  test UncaughtExceptionsTest.test("MainThreadAbruptTermination", 1, "OK", "Exception in thread "main".*simulateUncaughtExitEvent"): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$MainThreadNormalTermination ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$MainThreadNormalTermination']
12:35:21  [2021-02-09T17:35:21.813621600Z] Gathering output for process 5048
12:35:21  [2021-02-09T17:35:22.204322800Z] Waiting for completion for process 5048
12:35:21  [2021-02-09T17:35:22.204322800Z] Waiting for completion finished for process 5048
12:35:21  Output and diagnostic info for process 5048 was saved into 'pid-5048-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:22.204322800Z] Waiting for completion for process 5048
12:35:21  [2021-02-09T17:35:22.204322800Z] Waiting for completion finished for process 5048
12:35:21  test UncaughtExceptionsTest.test("MainThreadNormalTermination", 0, "OK", ""): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnMainThread ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnMainThread']
12:35:21  [2021-02-09T17:35:22.219882100Z] Gathering output for process 13504
12:35:21  [2021-02-09T17:35:22.626123800Z] Waiting for completion for process 13504
12:35:21  [2021-02-09T17:35:22.626123800Z] Waiting for completion finished for process 13504
12:35:21  Output and diagnostic info for process 13504 was saved into 'pid-13504-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:22.626123800Z] Waiting for completion for process 13504
12:35:21  [2021-02-09T17:35:22.626123800Z] Waiting for completion finished for process 13504
12:35:21  test UncaughtExceptionsTest.test("DefaultUncaughtExceptionHandlerOnMainThread", 1, "OK", ""): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnMainThreadOverride ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnMainThreadOverride']
12:35:21  [2021-02-09T17:35:22.626123800Z] Gathering output for process 3096
12:35:21  [2021-02-09T17:35:23.048001800Z] Waiting for completion for process 3096
12:35:21  [2021-02-09T17:35:23.048001800Z] Waiting for completion finished for process 3096
12:35:21  Output and diagnostic info for process 3096 was saved into 'pid-3096-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:23.048001800Z] Waiting for completion for process 3096
12:35:21  [2021-02-09T17:35:23.048001800Z] Waiting for completion finished for process 3096
12:35:21  test UncaughtExceptionsTest.test("DefaultUncaughtExceptionHandlerOnMainThreadOverride", 1, "OK", ""): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnNonMainThreadOverride ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnNonMainThreadOverride']
12:35:21  [2021-02-09T17:35:23.048001800Z] Gathering output for process 12712
12:35:21  [2021-02-09T17:35:23.485498700Z] Waiting for completion for process 12712
12:35:21  [2021-02-09T17:35:23.485498700Z] Waiting for completion finished for process 12712
12:35:21  Output and diagnostic info for process 12712 was saved into 'pid-12712-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:23.485498700Z] Waiting for completion for process 12712
12:35:21  [2021-02-09T17:35:23.485498700Z] Waiting for completion finished for process 12712
12:35:21  test UncaughtExceptionsTest.test("DefaultUncaughtExceptionHandlerOnNonMainThreadOverride", 0, "OK", ""): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnNonMainThread ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$DefaultUncaughtExceptionHandlerOnNonMainThread']
12:35:21  [2021-02-09T17:35:23.485498700Z] Gathering output for process 8816
12:35:21  [2021-02-09T17:35:23.907373400Z] Waiting for completion for process 8816
12:35:21  [2021-02-09T17:35:23.907373400Z] Waiting for completion finished for process 8816
12:35:21  Output and diagnostic info for process 8816 was saved into 'pid-8816-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:23.907373400Z] Waiting for completion for process 8816
12:35:21  [2021-02-09T17:35:23.907373400Z] Waiting for completion finished for process 8816
12:35:21  test UncaughtExceptionsTest.test("DefaultUncaughtExceptionHandlerOnNonMainThread", 0, "OK", ""): success
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar UncaughtExitSimulator$ThreadGroupUncaughtExceptionHandlerOnNonMainThread ]
12:35:21  Command line: [F:\Users\jenkins\workspace\Grinder\openjdkbinary\j2sdk-image\bin\java.exe -cp F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\java\lang\Thread\UncaughtExceptionsTest.d;F:\Users\jenkins\workspace\Grinder\openjdk-tests\openjdk\openjdk-jdk\test\jdk\java\lang\Thread;F:\Users\jenkins\workspace\Grinder\openjdk-tests\TKG\output_16128921023505\jdk_custom_0\work\classes\0\test\lib;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\javatest.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jtreg.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\junit.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\testng.jar;F:\Users\jenkins\workspace\Grinder\jvmtest\openjdk\jtreg\lib\jcommander.jar 'UncaughtExitSimulator$ThreadGroupUncaughtExceptionHandlerOnNonMainThread']
12:35:21  [2021-02-09T17:35:23.907373400Z] Gathering output for process 3840
12:35:21  [2021-02-09T17:35:24.329310500Z] Waiting for completion for process 3840
12:35:21  [2021-02-09T17:35:24.329310500Z] Waiting for completion finished for process 3840
12:35:21  Output and diagnostic info for process 3840 was saved into 'pid-3840-output.log'
12:35:21  OK
12:35:21  
12:35:21  [2021-02-09T17:35:24.329310500Z] Waiting for completion for process 3840
12:35:21  [2021-02-09T17:35:24.329310500Z] Waiting for completion finished for process 3840
12:35:21  test UncaughtExceptionsTest.test("ThreadGroupUncaughtExceptionHandlerOnNonMainThread", 0, "OK", ""): success
12:35:21  
12:35:21  ===============================================
12:35:21  java/lang/Thread/UncaughtExceptionsTest.java
12:35:21  Total tests run: 8, Failures: 1, Skips: 0
12:35:21  ===============================================
12:35:21  
12:35:21  STDERR:
12:35:21   stdout: [OK
12:35:21  ];
12:35:21   stderr: [Exception in thread "Thread-3" java.lang.RuntimeException: simulateUncaughtExitEvent
12:35:21  	at UncaughtExitSimulator.throwRuntimeException(UncaughtExceptionsTest.java:94)
12:35:21  	at UncaughtExitSimulator.run(UncaughtExceptionsTest.java:96)
12:35:21  ]
12:35:21   exitValue = 0
12:35:21  
12:35:21  java.lang.Exception: failures: 1
12:35:21  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:35:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
12:35:21  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:35:21  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
12:35:21  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
12:35:21  	at java.base/java.lang.Thread.run(Thread.java:853)
12:35:21  
12:35:21  JavaTest Message: Test threw exception: java.lang.Exception
12:35:21  JavaTest Message: shutting down test
12:35:21  
12:35:21  
12:35:21  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1
@pshipton pshipton added this to the Release 0.28 (Java 17) milestone Feb 9, 2021
@pshipton pshipton changed the title jdk17 https://ci.eclipse.org/openj9/view/Test/job/Grinder/1503/ jdk17 Thread/UncaughtExceptionsTest.java simulateUncaughtExitEvent missing from stderr Feb 9, 2021
@pshipton
Copy link
Member Author

pshipton commented Feb 9, 2021

Seems the test is expecting Thread-0 but OpenJ9 created Thread-3. We should check why that is and see if the difference in behavior can be resolved.

@JasonFengJ9
Copy link
Member

Also seen in internal builds.

23:01:37  ===============================================
23:01:37  java/lang/Thread/UncaughtExceptionsTest.java
23:01:37  Total tests run: 8, Failures: 1, Skips: 0
23:01:37  ===============================================
23:01:37  
23:01:37  STDERR:
23:01:37   stdout: [OK
23:01:37  ];
23:01:37   stderr: [Exception in thread "Thread-2" java.lang.RuntimeException: simulateUncaughtExitEvent
23:01:37  	at UncaughtExitSimulator.throwRuntimeException(UncaughtExceptionsTest.java:94)
23:01:37  	at UncaughtExitSimulator.run(UncaughtExceptionsTest.java:96)
23:01:37  ]
23:01:37   exitValue = 0
23:01:37  
23:01:37  java.lang.Exception: failures: 1
23:01:37  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
23:01:37  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:01:37  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
23:01:37  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
23:01:37  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
23:01:37  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
23:01:37  	at java.base/java.lang.Thread.run(Thread.java:853)
23:01:37  
23:01:37  JavaTest Message: Test threw exception: java.lang.Exception
23:01:37  JavaTest Message: shutting down test
23:01:37  
23:01:37  
23:01:37  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: failures: 1
23:01:37  --------------------------------------------------
23:02:48  Test results: passed: 752; failed: 1
23:02:59  Report written to /home/jenkins/workspace/Test_openjdk17_j9_sanity.openjdk_s390x_linux/jvmtest/openjdk/report/html/report.html
23:02:59  Results written to /home/jenkins/workspace/Test_openjdk17_j9_sanity.openjdk_s390x_linux/openjdk-tests/TKG/output_16143113132589/jdk_lang_0/work
23:02:59  Error: Some tests failed or other problems occurred.
23:02:59  
23:02:59  jdk_lang_0_FAILED

@JasonFengJ9
Copy link
Member

Seems the test is expecting Thread-0 but OpenJ9 created Thread-3. We should check why that is and see if the difference in behavior can be resolved.

Considering the popularity of this failure across streams, it can be excluded before a fix is developed.

@pshipton
Copy link
Member Author

pshipton commented Mar 3, 2021

Considering the popularity of this failure across streams, it can be excluded before a fix is developed.

Are you doing this or asking for me to do it?

@JasonFengJ9
Copy link
Member

@llxia can the auto exclude feature exclude an individual test like test java/lang/Thread/UncaughtExceptionsTest.java?

@pshipton
Copy link
Member Author

pshipton commented Mar 3, 2021

The auto exclude feature on OpenJ9 issues can only be used to exclude functionality tests, since these are the only tests hosted from the openj9 repo.

@pshipton
Copy link
Member Author

pshipton commented Mar 3, 2021

Or to put it another way - No. This test is an OpenJDK test.

@llxia
Copy link
Contributor

llxia commented Mar 3, 2021

Currently, auto exclude feature only checks the playlist files in the same repo of the auto exclude comment. That is, to exclude functional test in openj9 repo, use the auto exclude comment in openj9 issue. For openjdk or system tests, the auto exclude comment should be used at Adopt test repo.

In this case, you want to exclude in the openjdk problem list, not the playlist file. This feature is not implemented yet.

babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 12, 2022
- eclipse-openj9/openj9#14079 is a duplicate of adoptium/temurin-build#248.
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14079
Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

The java.util.Timer constructor used there calls thread.setName(name); so changing TimerThread won't help the situation

I was referring to TimerThread which doesn't call setName(). Hopefully the PR cleared it up.

@keithc-ca
Copy link
Contributor

In my comment, thread is the field of type TimerThread. Changing the constructor of TimerThread would give that thread a different name for a very short period before the Timer constructor changes it to the supplied name.

@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

It's the fact there is no name set in the constructor which is the problem, it doesn't matter how short the period is. The name isn't set in the TimerThread constructor, it calls Thread.newName() which consumes the "Thread-0" name. This causes the test to fail because it expects this name.It could have an impact on / confuse users which expect consistent thread names. Depending on the timing of the Attach API AttachHandler / FilelockTimer creation, an application can get different thread names from run to run.

pshipton added a commit to pshipton/openj9-openjdk-jdk that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@keithc-ca
Copy link
Contributor

which consumes the "Thread-0" name

Ok, that makes sense.

Are there potentially multiple TimerThread objects created? If there's just one, it doesn't (fully) explain how the test sometimes fails because it ran on thread "Thread-2" or "Thread-3".

pshipton added a commit to pshipton/openj9-openjdk-jdk that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.genThreadName() which consumes the "Thread-0" name. This causes
the test to fail because it expects this name. This could have an impact
on / confuse users which expect consistent thread names. Depending on
the timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@keithc-ca
Copy link
Contributor

Or we at the point (since #16624) where the one TimerThread is the only thing that might interfere with the test seeing "Thread-0"?

@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

The test only failed on "Thread-2" or "Thread-3" before I fixed the OpenJ9 code in #16624

@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

Or we at the point (since #16624) where the one TimerThread is the only thing that might interfere with the test seeing "Thread-0"?

Yes, exactly.

@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

Well, TimerThread is the only thing I know of, it's possible something else will be exposed, but I haven't seen a failure due to anything other than Thread-1 in a while.

@keithc-ca
Copy link
Contributor

Will you be creating changes similar to ibmruntimes/openj9-openjdk-jdk#640 for earlier versions?

@pshipton
Copy link
Member Author

pshipton commented Aug 9, 2023

Yes, I'll create some now and the rest later.

pshipton added a commit to pshipton/openj9-openjdk-jdk21 that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.genThreadName() which consumes the "Thread-0" name. This causes
the test to fail because it expects this name. This could have an impact
on / confuse users which expect consistent thread names. Depending on
the timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk21 that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.genThreadName() which consumes the "Thread-0" name. This causes
the test to fail because it expects this name. This could have an impact
on / confuse users which expect consistent thread names. Depending on
the timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk17 that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk11 that referenced this issue Aug 9, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk21 that referenced this issue Aug 10, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.genThreadName() which consumes the "Thread-0" name. This causes
the test to fail because it expects this name. This could have an impact
on / confuse users which expect consistent thread names. Depending on
the timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk17 that referenced this issue Aug 10, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk11 that referenced this issue Aug 10, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9-openjdk-jdk8 that referenced this issue Aug 10, 2023
Issue eclipse-openj9/openj9#11930

The name isn't set in the TimerThread constructor, it calls
Thread.newName() which consumes the "Thread-0" name. This causes the
test to fail because it expects this name. This could have an impact on
/ confuse users which expect consistent thread names. Depending on the
timing of the Attach API AttachHandler / FilelockTimer creation, an
application can get different default thread names from run to run.

Backport of ibmruntimes/openj9-openjdk-jdk#640

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openjdk-tests that referenced this issue Aug 10, 2023
Remove the OpenJ9 exclude for
java/lang/Thread/UncaughtExceptionsTest.java now the problems have been
resolved.

Issue eclipse-openj9/openj9#11930

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@pshipton
Copy link
Member Author

Unexclude the test via adoptium/aqa-tests#4699

LongyuZhang pushed a commit to adoptium/aqa-tests that referenced this issue Aug 11, 2023
Remove the OpenJ9 exclude for
java/lang/Thread/UncaughtExceptionsTest.java now the problems have been
resolved.

Issue eclipse-openj9/openj9#11930

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants