eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 721 forks source link

jdk23 VarHandles/VarHandleTestMethodTypeBoolean ClassNotFoundException: org.testng.IMethodInstance #19373

Open pshipton opened 4 months ago

pshipton commented 4 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdknext_j9_sanity.openjdk_x86-64_mac_Nightly_testList_0/2 jdk_lang_0 java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java

00:07:37  command: testng -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=false -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true VarHandleTestMethodTypeBoolean
00:07:37  reason: User specified action: run testng/othervm -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=false -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true VarHandleTestMethodTypeBoolean 
00:07:37  started: Wed Apr 24 00:07:32 EDT 2024
00:07:37  Mode: othervm [/othervm specified]
00:07:37  finished: Wed Apr 24 00:07:33 EDT 2024
00:07:37  elapsed time (seconds): 0.901
00:07:37  configuration:
00:07:37  STDOUT:
00:07:37  STDERR:
00:07:37  java.lang.NoClassDefFoundError: org.testng.IMethodInstance
00:07:37    at org.testng.internal.Invoker.<init>(Invoker.java:42)
00:07:37    at org.testng.TestRunner.init(TestRunner.java:276)
00:07:37    at org.testng.TestRunner.<init>(TestRunner.java:180)
00:07:37    at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:613)
00:07:37    at org.testng.SuiteRunner.init(SuiteRunner.java:178)
00:07:37    at org.testng.SuiteRunner.<init>(SuiteRunner.java:112)
00:07:37    at org.testng.TestNG.createSuiteRunner(TestNG.java:1306)
00:07:37    at org.testng.TestNG.createSuiteRunners(TestNG.java:1282)
00:07:37    at org.testng.TestNG.runSuitesLocally(TestNG.java:1131)
00:07:37    at org.testng.TestNG.runSuites(TestNG.java:1069)
00:07:37    at org.testng.TestNG.run(TestNG.java:1037)
00:07:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
00:07:37    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
00:07:37    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
00:07:37    at java.base/java.lang.reflect.Method.invoke(Method.java:586)
00:07:37    at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
00:07:37    at java.base/java.lang.Thread.run(Thread.java:1587)
00:07:37  Caused by: java.lang.ClassNotFoundException: org.testng.IMethodInstance
00:07:37    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
00:07:37    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
00:07:37    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1099)
00:07:37    ... 17 more
tajila commented 4 months ago

FYI @babsingh

babsingh commented 4 months ago

A similar failure is seen with java/foreign/TestFree, which is reported in https://github.com/eclipse-openj9/openj9/issues/19364 (closed as a duplicate). The ClassNotFoundException is intermittently seen; trying to reproduce the failure to generate diagnostic files.

ThanHenderson commented 3 months ago

Testing a more recent build for many iterations locally, on the runtimes jenkins machines, and the OpenJ9 jenkins machine from which the failure was reported, I've been unable to reproduce neither this failure nor #19364.

I have a final run of 500 iterations from the machine that the failure reported pending completion: https://openj9-jenkins.osuosl.org/job/Grinder/3650/, but from what I have seen, this is either extremely intermittent or it was specific to the nightly builds and/or machines on April 22 and 23.

pshipton commented 3 months ago

One failure which is different

16:01:59  == ITERATION 436 ==
16:01:59  
16:01:59  TEST SETUP:
16:01:59  JVMSHRC005I No shared class caches available
16:01:59  JVMSHRC005I No shared class caches available
16:01:59  cache cleanup done
16:01:59  
16:01:59  TESTING:
16:01:59  Directory "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_17175200977683/jdk_custom_0_ITER_436/work" not found: creating
16:01:59  Directory "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_17175200977683/jdk_custom_0_ITER_436/report" not found: creating
16:01:59  XML output with verification to /Users/jenkins/workspace/Grinder/aqa-tests/TKG/output_17175200977683/jdk_custom_0_ITER_436/work
16:01:59  Test results: passed: 1
16:01:59  Error: Unexpected exception occurred! java.lang.NullPointerException
16:01:59  java.lang.NullPointerException
16:01:59    at java.base/java.lang.String.indexOf(String.java)
16:01:59    at com.sun.javatest.finder.TagTestFinder.findTagStart(TagTestFinder.java:412)
16:01:59    at com.sun.javatest.finder.TagTestFinder.parseComment(TagTestFinder.java:367)
16:01:59    at com.sun.javatest.regtest.config.RegressionTestFinder.modifiedScanFile(RegressionTestFinder.java:209)
16:01:59    at com.sun.javatest.regtest.config.RegressionTestFinder.scanFile(RegressionTestFinder.java:145)
16:01:59    at com.sun.javatest.finder.TagTestFinder.scan(TagTestFinder.java:114)
16:01:59    at com.sun.javatest.TestFinder.read(TestFinder.java:432)
16:01:59    at com.sun.javatest.TRT_TreeNode.processFile(TRT_TreeNode.java:1259)
16:01:59    at com.sun.javatest.TRT_TreeNode.scanIfNeeded(TRT_TreeNode.java:807)
16:01:59    at com.sun.javatest.TRT_TreeNode.getChildCount(TRT_TreeNode.java:292)
16:01:59    at com.sun.javatest.TRT_Iterator$PseudoFrame.nextIndex(TRT_Iterator.java:998)
16:01:59    at com.sun.javatest.TRT_Iterator.findNext(TRT_Iterator.java:727)
16:01:59    at com.sun.javatest.TRT_Iterator.init(TRT_Iterator.java:697)
16:01:59    at com.sun.javatest.TRT_Iterator.<init>(TRT_Iterator.java:133)
16:01:59    at com.sun.javatest.TestResultTable.getIterator(TestResultTable.java:320)
16:01:59    at com.sun.javatest.TestResultTable.getIterator(TestResultTable.java:1049)
16:01:59    at com.sun.javatest.report.ReportSettings.setupSortedResults(ReportSettings.java:523)
16:01:59    at com.sun.javatest.report.Report.writeReports(Report.java:177)
16:01:59    at com.sun.javatest.regtest.report.RegressionReporter.report(RegressionReporter.java:106)
16:01:59    at com.sun.javatest.regtest.tool.Tool.batchHarness(Tool.java:1995)
16:01:59    at com.sun.javatest.regtest.tool.Tool.run(Tool.java:1331)
16:01:59    at com.sun.javatest.regtest.tool.Tool.run(Tool.java:1092)
16:01:59    at com.sun.javatest.regtest.tool.Tool.main(Tool.java:148)
16:01:59    at com.sun.javatest.regtest.Main.main(Main.java:46)
16:01:59  
16:01:59  jdk_custom_0_FAILED(ITER_436)
pshipton commented 4 weeks ago

https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder_iteration_2/3911 for https://github.com/eclipse-openj9/openj9/issues/19082

jdk_util_0 java/util/zip/ZipFile/ZipEntryTimeBounds.java

00:03:56  java.lang.NoClassDefFoundError: org.testng.IMethodInstance
00:03:56    at org.testng.internal.Invoker.<init>(Invoker.java:42)
00:03:56    at org.testng.TestRunner.init(TestRunner.java:276)
00:03:56    at org.testng.TestRunner.<init>(TestRunner.java:180)
00:03:56    at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:613)
00:03:56    at org.testng.SuiteRunner.init(SuiteRunner.java:178)
00:03:56    at org.testng.SuiteRunner.<init>(SuiteRunner.java:112)
00:03:56    at org.testng.TestNG.createSuiteRunner(TestNG.java:1306)
00:03:56    at org.testng.TestNG.createSuiteRunners(TestNG.java:1282)
00:03:56    at org.testng.TestNG.runSuitesLocally(TestNG.java:1131)
00:03:56    at org.testng.TestNG.runSuites(TestNG.java:1069)
00:03:56    at org.testng.TestNG.run(TestNG.java:1037)
00:03:56    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
00:03:56    at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
00:03:56    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
00:03:56    at java.base/java.lang.reflect.Method.invoke(Method.java:586)
00:03:56    at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
00:03:56    at java.base/java.lang.Thread.run(Thread.java:1587)
00:03:56  Caused by: java.lang.ClassNotFoundException: org.testng.IMethodInstance
00:03:56    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
00:03:56    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
00:03:56    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1099)
00:03:56    ... 17 more
pshipton commented 3 weeks ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk23_j9_sanity.functional_x86-64_linux_Nightly_testList_0/41 testInvokeSpecialInsideInterface_0

07:55:01  Exception in thread "main" java.lang.NoClassDefFoundError: org.testng.IMethodInstance
07:55:01    at org.testng.TestRunner.init(TestRunner.java:231)
07:55:01    at org.testng.TestRunner.<init>(TestRunner.java:167)
07:55:01    at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:663)
07:55:01    at org.testng.SuiteRunner.init(SuiteRunner.java:260)
07:55:01    at org.testng.SuiteRunner.<init>(SuiteRunner.java:198)
07:55:01    at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
07:55:01    at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
07:55:01    at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
07:55:01    at org.testng.TestNG.runSuites(TestNG.java:1049)
07:55:01    at org.testng.TestNG.run(TestNG.java:1017)
07:55:01    at org.testng.TestNG.privateMain(TestNG.java:1354)
07:55:01    at org.testng.TestNG.main(TestNG.java:1323)
07:55:01  Caused by: java.lang.ClassNotFoundException: org.testng.IMethodInstance
07:55:01    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
07:55:01    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
07:55:01    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1099)
07:55:01    ... 12 more
babsingh commented 2 days ago

@ThanHenderson For 0.48, this issue will need to be resolved by the end of this week. What's the current state of this issue? Based on this issue's impact, do we need it to be fixed in 0.48 or can it be pushed to 0.49?

ThanHenderson commented 2 days ago

I still haven't been able to reproduce this at all, despite running many iterations of each of the tests here. Given that it is so intermittent I think we could push it to 0.49. But the next time it fails, we need to ensure that proper diagnostic files are saved.

hangshao0 commented 2 days ago

Moved to 0.49 based on comment.