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.29k stars 722 forks source link

On AIX using zlibNX may cause ClassNotFoundException #20324

Open pshipton opened 1 month ago

pshipton commented 1 month ago

Experienced the following problem on AIX 7.3 P10, which is configured to support zlibNX, and Semeru will use it be default. Disable using -XX:-UseZlibNX and it no longer occurs.

00:52:14  /home/jenkins/workspace/Test_openjdk23_j9_sanity.jck_ppc64_aix/jdkbinary/j2sdk-image/bin/java -cp ./bin/TestKitGen.jar org.openj9.envInfo.EnvDetector
00:52:14  Exception in thread "main" java.lang.NoClassDefFoundError: org.openj9.envInfo.MachineInfo
00:52:14    at org.openj9.envInfo.EnvDetector.parseArgs(EnvDetector.java:32)
00:52:14    at org.openj9.envInfo.EnvDetector.main(EnvDetector.java:28)
00:52:14  Caused by: java.lang.ClassNotFoundException: org.openj9.envInfo.MachineInfo
00:52:14    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:827)
00:52:14    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
00:52:14    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1099)
00:52:14    ... 2 more

Trying to look at the class with javap you get unexpected end of file while reading org.openj9.envInfo.MachineInfo.

jdk11, 17 seem fine, this particular problem only occurs with jdk21, 23. However we don't know how the bug might affect earlier versions.

github-actions[bot] commented 1 month ago

Issue Number: 20324 Status: Open Recommended Components: comp:test, comp:vm, comp:build Recommended Assignees: keithc-ca, pshipton, jasonfengj9

pshipton commented 1 month ago

There is an AIX ifix related to case TS017146010 which is supposed to fix it. Until the fix is part of a service pack or TL, disable zlibNX by default. The command line option can still be used to enable it, when using the default java launcher.

https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/858 https://github.com/ibmruntimes/openj9-openjdk-jdk23/pull/55 https://github.com/ibmruntimes/openj9-openjdk-jdk21/pull/209 https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/396 https://github.com/ibmruntimes/openj9-openjdk-jdk11/pull/823 https://github.com/ibmruntimes/openj9-openjdk-jdk8/pull/768

Created doc issue https://github.com/eclipse-openj9/openj9-docs/issues/1426

pshipton commented 1 month ago

Although the default has been changed, we can keep this open until there is an AIX update with the fix and the default to enable zlibNX restored.

paulcheeseman commented 1 month ago

This is the AIX APAR:

https://www.ibm.com/support/docview.wss?uid=isg1IJ52189

I believe the fix is available.

EDIT: Actually I think the fix is available as an AIX iFix only - i.e. not in an official AIX release yet.

pshipton commented 1 month ago

The link I have to the AIX ifix for case TS017146010 shows it's expired. Apparently any AIX ifix is specific to the target system.