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

defineModuleAsClassTest_0 - ClassFormatError: JVMCFRE152 module-info is not a class because access_flag ACC_MODULE is set; class=module-info, offset=27 #12629

Closed
JasonFengJ9 opened this issue May 5, 2021 · 8 comments

Comments

@JasonFengJ9
Copy link
Member

Failure link

From an internal build Test_openjdk11_j9_extended.functional_ppc64le_linux_testList_0/36/:

java version "11.0.11" 2021-04-20
Java(TM) SE Runtime Environment 11.0.10.0-IBM (build 11.0.11+9-202105050106)
Eclipse OpenJ9 VM 11.0.10.0-IBM (build master-764252c83, JRE 11 Linux ppc64le-64-Bit Compressed References 20210504_80 (JIT enabled, AOT enabled)
OpenJ9   - 764252c83
OMR      - 79c52c726
JCL      - da466bb02c based on jdk-11.0.11+9)

Rerun in Grinder

Optional info

Failure output (captured from console output)

[2021-05-05T03:04:25.678Z] Running test defineModuleAsClassTest_0 ...
[2021-05-05T03:04:25.678Z] ===============================================
[2021-05-05T03:04:25.678Z] defineModuleAsClassTest_0 Start Time: Tue May  4 20:04:24 2021 Epoch Time (ms): 1620183864531
[2021-05-05T03:04:25.678Z] "/home/jenkins/workspace/Test_openjdk11_j9_extended.functional_ppc64le_linux_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/home/jenkins/workspace/Test_openjdk11_j9_extended.functional_ppc64le_linux_testList_0/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
[2021-05-05T03:04:25.678Z] JVMSHRC005I No shared class caches available
[2021-05-05T03:04:25.678Z] JVMSHRC005I No shared class caches available
[2021-05-05T03:04:25.678Z] cache cleanup done
[2021-05-05T03:04:25.678Z] variation: NoOptions
[2021-05-05T03:04:25.679Z] JVM_OPTIONS:  

[2021-05-05T03:04:27.894Z] FAILED: testLoadModuleInClassLoader
[2021-05-05T03:04:27.894Z] java.lang.ClassFormatError: JVMCFRE152 module-info is not a class because access_flag ACC_MODULE is set; class=module-info, offset=27
[2021-05-05T03:04:27.894Z] 	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:440)
[2021-05-05T03:04:27.894Z] 	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:392)
[2021-05-05T03:04:27.894Z] 	at org.openj9.test.defineModuleAsClass.MyClassLoader.loadClass(DefineModuleAsClassTest.java:74)
[2021-05-05T03:04:27.894Z] 	at org.openj9.test.defineModuleAsClass.DefineModuleAsClassTest.testLoadModuleInClassLoader(DefineModuleAsClassTest.java:58)
[2021-05-05T03:04:27.894Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-05-05T03:04:27.894Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2021-05-05T03:04:27.894Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2021-05-05T03:04:27.894Z] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
[2021-05-05T03:04:27.894Z] 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestRunner.run(TestRunner.java:505)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[2021-05-05T03:04:27.894Z] 	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.runSuites(TestNG.java:1049)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.run(TestNG.java:1017)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.privateMain(TestNG.java:1354)
[2021-05-05T03:04:27.894Z] 	at org.testng.TestNG.main(TestNG.java:1323)
[2021-05-05T03:04:27.894Z] 
[2021-05-05T03:04:27.894Z] 
[2021-05-05T03:04:27.894Z] ===============================================
[2021-05-05T03:04:27.895Z]     defineModuleAsClassTest
[2021-05-05T03:04:27.895Z]     Tests run: 1, Failures: 1, Skips: 0
[2021-05-05T03:04:27.895Z] ===============================================
[2021-05-05T03:04:27.895Z] 
[2021-05-05T03:04:27.895Z] 
[2021-05-05T03:04:27.895Z] ===============================================
[2021-05-05T03:04:27.895Z] Java9andUp suite
[2021-05-05T03:04:27.895Z] Total tests run: 1, Failures: 1, Skips: 0
[2021-05-05T03:04:27.895Z] ===============================================
[2021-05-05T03:04:27.895Z] 
[2021-05-05T03:04:27.895Z] 
[2021-05-05T03:04:27.895Z] defineModuleAsClassTest_0_FAILED

This seems caused by #12620
fyi @ChengJin01 @pshipton

@ChengJin01
Copy link

ChengJin01 commented May 5, 2021

Hi @JasonFengJ9 , the code & test changes were merged to https://github.com/eclipse-openj9/openj9 rather than https://github.com/eclipse/openj9.git but the test grinder still sticks to eclipse/openj9.git with the unchanged tests by the latest build with the code changes.

Please try a new grinder with https://github.com/eclipse-openj9/openj9.

@JasonFengJ9
Copy link
Member Author

but the test grinder still sticks to eclipse/openj9.git with the unchanged tests by the latest build with the code changes.

fyi @llxia

@llxia
Copy link
Contributor

llxia commented May 5, 2021

https://github.com/eclipse/openj9 should be redirected to https://github.com/eclipse-openj9/openj9 automatically. It should not be a problem to continue using eclipse/openj9.

From SHA.txt, we are running 8a6e1df5c0cc2200c3f07efc04cc62946c9cdac1. It should contain the change Update the error action for ACC_MODULE

timestamp: 20210504-185720
repo dir: /home/jenkins/workspace/Test_openjdk11_j9_extended.functional_ppc64le_linux_testList_0/openjdk-tests/openj9
git repo: 
  Fetch URL: https://github.com/eclipse/openj9.git
sha:
8a6e1df5c0cc2200c3f07efc04cc62946c9cdac1

@ChengJin01
Copy link

ChengJin01 commented May 5, 2021

If so, then the nightly build didn't pick up the latest changes at b5f5102 according to the test output (it was supposed to throw out NoClassDefFoundError rather than ClassFormatError) as the code changes should work on both JDK11 & 17.

FYI @AdamBrousseau & @jdekonin

@llxia
Copy link
Contributor

llxia commented May 5, 2021

re #12629 (comment), just to complete the testing story, Grinder/15284 used https://github.com/eclipse-openj9/openj9 and had the same failure.

@llxia
Copy link
Contributor

llxia commented May 5, 2021

It looks like the SDK build picked up 764252c and test build picked up 8a6e1df. Giving the fact that there was only 1 hour in between the two commits. I suspect the commit 8a6e1df was merged in between the SDK build and the test build.

In summary, tonight's build should not have this problem. The proper fix should be set openj9 SHA to test build, so SDK build and test build are in sync.

@AdamBrousseau
Copy link
Contributor

Note that this is from a build using Adopt's scripts. OpenJ9 build scripts sync the test material with the compile.
Opened adoptium/ci-jenkins-pipelines#143 to address.

@pshipton
Copy link
Member

pshipton commented May 5, 2021

Since we have the adoptiium issue to address the problem, closing this one.

@pshipton pshipton closed this as completed May 5, 2021
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