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

SharedClasses.SCM01.SingleCL UnsupportedClassVersionError #19582

Open
pshipton opened this issue May 30, 2024 · 4 comments
Open

SharedClasses.SCM01.SingleCL UnsupportedClassVersionError #19582

pshipton opened this issue May 30, 2024 · 4 comments

Comments

@pshipton
Copy link
Member

pshipton commented May 30, 2024

Also SharedClasses.SCM23.SingleCL, SharedClasses.SCM01.MultiCL, SharedClasses.SCM23.MultiCL, SharedClasses.SCM01.MultiThreadMultiCL.

https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK22-with-System/79/
https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK17/761/
https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK11/818/
https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK8/841/

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_extended.system_aarch64_linux_Nightly_testList_1/684/

61.0 is jdk17.

[2024-05-30T02:04:59.620Z] SCL3 stderr Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE199E bad major version 61.0 of class=net/openj9/sc/classes/Test_Init, the maximum supported major version is 52.0; offset=6
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.defineClassImpl(Native Method)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.defineClassInternal(ClassLoader.java:399)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.defineClass(ClassLoader.java:360)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:682)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.net.URLClassLoader.access$400(URLClassLoader.java:89)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1086)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.security.AccessController.doPrivileged(AccessController.java:782)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.net.URLClassLoader.findClass(URLClassLoader.java:589)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:959)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.loadClass(ClassLoader.java:904)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at java.lang.ClassLoader.loadClass(ClassLoader.java:887)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at net.openj9.test.sc.LoaderSlave.run(LoaderSlave.java:77)
[2024-05-30T02:04:59.620Z] SCL3 stderr 	at net.openj9.test.sc.LoaderSlave.main(LoaderSlave.java:52)

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_extended.system_aarch64_linux_Nightly_testList_0/78

67.0 is jdk23

Changes from the previous working build
7c62322...b9fd76d
adoptium/aqa-tests@42609ec...a4ef8f2
adoptium/TKG@3ed8f8b...b9e1d27
adoptium/STF@f8d647e...f40f3ca

@llxia
Copy link
Contributor

llxia commented May 30, 2024

getDependencies section looks the same.

00:00:30.452  downloading https://openj9-jenkins.osuosl.org//job/systemtest.getDependency/lastSuccessfulBuild/artifact/systemtest_prereqs/log4j/log4j-core.jar
00:00:30.709  --> file downloaded to /home/jenkins/workspace/Grinder/../../testDependency/system_lib/log4j/log4j-core.jar
00:00:30.709  Checksum verification skipped for /home/jenkins/workspace/Grinder/../../testDependency/system_lib/log4j/log4j-core.jar
...
00:01:03.887  downloading https://openj9-jenkins.osuosl.org//job/systemtest.getDependency/lastSuccessfulBuild/artifact/systemtest_prereqs/log4j/log4j-api.jar
00:01:04.359  --> file downloaded to /home/jenkins/workspace/Grinder/../../testDependency/system_lib/log4j/log4j-api.jar
00:01:04.359  Checksum verification skipped for /home/jenkins/workspace/Grinder/../../testDependency/system_lib/log4j/log4j-api.jar
...
00:00:33.510  downloading https://openj9-jenkins.osuosl.org//job/systemtest.getDependency/lastSuccessfulBuild/artifact/systemtest_prereqs/junit/junit.jar
00:00:33.510  --> file downloaded to /home/jenkins/workspace/Grinder/../../testDependency/system_lib/junit/junit.jar
00:00:33.510  Checksum verification skipped for /home/jenkins/workspace/Grinder/../../testDependency/system_lib/junit/junit.jar
00:04:09.878  GEN   /home/jenkins/testDependency/system_lib/log4j/log4j-api.jar
00:04:09.878  GEN   /home/jenkins/testDependency/system_lib/log4j/log4j-core.jar
00:04:09.878  GEN   /home/jenkins/testDependency/system_lib/junit/junit.jar
...

@llxia
Copy link
Contributor

llxia commented May 30, 2024

Tested with 3 old SHA:
ADOPTOPENJDK_BRANCH: 42609ec5c70, STF: f8d647e99075 and TKG: 3ed8f8b66bc
https://openj9-jenkins.osuosl.org/job/Grinder/3642/ passed onub20-aarch64-osu-1: https://openj9-jenkins.osuosl.org/job/Grinder/3642/

@llxia
Copy link
Contributor

llxia commented May 31, 2024

Failed run:

00:04:52.634  GEN /home/jenkins/testDependency/system_lib/sharedClassesTestData/v1 exists
...
00:04:52.897  STF 21:02:26.302 - +------ Step 1 - Copy sharedClasses jar
00:04:52.897  STF 21:02:26.302 - | Copy a file to another directory
00:04:52.897  STF 21:02:26.302 - |   Source file: /home/jenkins/testDependency/system_lib/sharedClassesTestData/v1/classes.jar
00:04:52.897  STF 21:02:26.302 - |   Dest dir:    /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_17171029401691/SharedClasses.SCM01.SingleCL_0/20240530-210221-SharedClasses/tmp
00:04:52.897  STF 21:02:26.302 - |
...

Passed run:

00:05:45.246  GEN /home/jenkins/workspace/Grinder/jvmtest/system/systemtest_prereqs/sharedClassesTestData/v1 does not exist
...
00:05:45.505  STF 23:43:13.044 - +------ Step 1 - Create Shared Classes jars
...
00:05:45.505  STF 23:43:13.044 - Running command: /home/jenkins/workspace/Grinder/jdkbinary/j2sdk-image/bin/java -classpath /home/jenkins/workspace/Grinder/jvmtest/system/STF/stf.core/bin:/home/jenkins/workspace/Grinder/jvmtest/system/openj9-systemtest/openj9.test.sharedClasses/bin net.openj9.test.sc.JavaGen /home/jenkins/workspace/Grinder/jvmtest/system/systemtest_prereqs/sharedClassesTestData/v1 10000
00:05:45.505  STF 23:43:13.044 - Redirecting stderr to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_17171125877172/SharedClasses.SCM01.SingleCL_0/20240530-234308-SharedClasses/results/1.CSC.stderr
00:05:45.505  STF 23:43:13.044 - Redirecting stdout to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_17171125877172/SharedClasses.SCM01.SingleCL_0/20240530-234308-SharedClasses/results/1.CSC.stdout
00:05:45.505  STF 23:43:13.056 - Monitoring processes: CSC
00:05:46.074  CSC 30/05/24 23:43:13: Generating jar files in /home/jenkins/workspace/Grinder/jvmtest/system/systemtest_prereqs/sharedClassesTestData/v1
...

It looks like the test is leveraging system_lib dir to store sharedClasses jar. It was not a problem because system_lib (previously called systemtest_prereqs) was created under workspace (get deleted after each run). The problem shows up when system_lib is preserved.

@llxia
Copy link
Contributor

llxia commented May 31, 2024

Fix: we need to redirect SharedClasses tests to generate related classes under workspace dir, not system_lib.
https://github.com/eclipse-aqavit/openj9-systemtest/blob/0cc1cdb8e33b41de4478f8f07d53a461905e5f49/openj9.test.sharedClasses/src/test.sharedClasses/net/openj9/stf/SharedClasses.java#L193

Try getTestRoots(), getTmpDir(), or getResultsDir(). (see https://github.com/adoptium/STF/blob/f40f3ca179d2bcd7f6c32838d5475c5f0a26cb47/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java)

@annaibm please take care of this. We need to ensure that getPrereqRoots() is not used anywhere other than getting 3rd party jars. Thanks

annaibm added a commit to annaibm/openj9-systemtest that referenced this issue May 31, 2024
- SharedClasses tests to generate related classes under workspace dir - with getTestRoots function instead of getPrereqRoots.

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue May 31, 2024
- SharedClasses tests to generate related classes under workspace dir - with getTestRoots function instead of getPrereqRoots.

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue May 31, 2024
- SharedClasses tests to generate related classes under workspace dir - with getResultsDir function instead of getPrereqRoots.

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue May 31, 2024
- SharedClasses tests to generate related classes under workspace dir - with getResultsDir function instead of getPrereqRoots.

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 3, 2024
- Store sharedClassesTestData using getResultsDir() instead of getPrereqRoots().

related:eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 4, 2024
- updates the directory structure to include the Java version in the sharedClassesDataDir path.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 7, 2024
- Include Java version number as in  classes8.jar to be generated.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 7, 2024
- Include Java version number as in  classes_jdk8.jar while generating the classes.jar file.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 11, 2024
- Include Java version number as in  classes_jdk8.jar while generating the classes.jar file.

closes: eclipse-openj9/openj9#19582

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 12, 2024
 - Add the classes jars for SharedClassesTest data into specific jdk version dir.

related:eclipse-openj9/openj9#19582

 Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
annaibm added a commit to annaibm/openj9-systemtest that referenced this issue Jun 13, 2024
 - Add the classes jars for SharedClassesTest data into specific jdk version dir.
 - Updated copyright to 2016, 2024.

related:eclipse-openj9/openj9#19582

 Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants