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.28k stars 721 forks source link

JDK17 : jdk_lang_0 fails at NativeLibraryTest with invalid boolean value: 'null' for expression 'vm.musl' on OpenJ9 #14349

Closed Mesbah-Alam closed 2 years ago

Mesbah-Alam commented 2 years ago

NativeLibraryTest fails with invalid boolean value: null' for expressionvm.musl' on OpenJ9 JDK 17 while it passes on HotSpot JDK 17.

Output excerpt from OpenJ9 run:

[2022-01-22T23:07:20.738Z] ===============================================
[2022-01-22T23:07:20.738Z] Running test jdk_lang_0 ...
[2022-01-22T23:07:20.738Z] ===============================================
[2022-01-22T23:07:20.738Z] jdk_lang_0 Start Time: Sat Jan 22 23:07:20 2022 Epoch Time (ms): 1642892840575
[2022-01-22T23:07:20.738Z] "/Users/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:destroyAll; "/Users/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
[2022-01-22T23:07:20.738Z] 
[2022-01-22T23:07:20.738Z] Attempting to destroy all caches in cacheDir /Users/jenkins/javasharedresources/
[2022-01-22T23:07:20.738Z] 
[2022-01-22T23:07:20.738Z] JVMSHRC806I Compressed references persistent shared cache "sharedcc_jenkins" has been destroyed. Use option -Xnocompressedrefs if you want to destroy a non-compressed references cache.
[2022-01-22T23:07:20.738Z] JVMSHRC807I Non-compressed references persistent shared cache "sharedcc_jenkins" has been destroyed. Use option -Xcompressedrefs if you want to destroy a compressed references cache.
[2022-01-22T23:07:20.738Z] JVMSHRC005I No shared class caches available
[2022-01-22T23:07:20.738Z] cache cleanup done
[2022-01-22T23:07:20.738Z] variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage Mode150
[2022-01-22T23:07:20.738Z] JVM_OPTIONS:  -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -XX:+UseCompressedOops 
[2022-01-22T23:07:20.738Z] { itercnt=1; \
[2022-01-22T23:07:20.738Z]  mkdir -p "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428928403111/jdk_lang_0"; \
[2022-01-22T23:07:20.738Z]  cd "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428928403111/jdk_lang_0"; \
[2022-01-22T23:07:20.738Z]  "/Users/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java" -Xmx512m -jar "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/jtreg/lib/jtreg.jar" \
[2022-01-22T23:07:20.738Z]  -agentvm -a -ea -esa -v:fail,error,time,nopass -retain:fail,error,*.dmp,javacore.*,heapdump.*,*.trc -ignore:quiet -timeoutFactor:8 -xml:verify -concurrency:4  -nativepath:"/Users/jenkins/workspace/Grinder/openjdkbinary/openjdk-test-image/jdk/jtreg/native" -vmoptions:"-Xmx512m  -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -XX:+UseCompressedOops  " \
[2022-01-22T23:07:20.738Z]  -timeoutHandler:jtreg.openj9.CoreDumpTimeoutHandler -timeoutHandlerDir:"/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/lib/openj9jtregtimeouthandler.jar" \
[2022-01-22T23:07:20.738Z]  -w ""/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428928403111/jdk_lang_0"/work" \
[2022-01-22T23:07:20.738Z]  -r "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/report" \
[2022-01-22T23:07:20.738Z]  -jdk:"/Users/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image" \
[2022-01-22T23:07:20.738Z]  -exclude:"/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../openjdk/openjdk-jdk/test/jdk/ProblemList.txt" \
[2022-01-22T23:07:20.738Z]  -exclude:"/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/excludes/ProblemList_openjdk17-openj9.txt" \
[2022-01-22T23:07:20.738Z]  "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../openjdk/openjdk-jdk/test/jdk:jdk_lang"; \
[2022-01-22T23:07:20.738Z]  if [ $? -eq 0 ] ; then echo ""; echo "jdk_lang_0""_PASSED"; echo ""; cd /Users/jenkins/workspace/Grinder/aqa-tests/TKG/..;  else echo ""; echo "jdk_lang_0""_FAILED"; echo ""; fi; } 2>&1 | tee -a "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428928403111/TestTargetResult";
[2022-01-22T23:07:22.574Z] Directory "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428928403111/jdk_lang_0/work" not found: creating
[2022-01-22T23:07:22.574Z] Directory "/Users/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/report" not found: creating
[2022-01-22T23:07:31.973Z] XML output with verification to /Users/jenkins/workspace/Grinder/aqa-tests/TKG/output_16428928403111/jdk_lang_0/work
[2022-01-22T23:08:42.283Z] --------------------------------------------------
[2022-01-22T23:08:42.283Z] TEST: java/lang/ClassLoader/nativeLibrary/NativeLibraryTest.java
[2022-01-22T23:08:42.283Z] 
[2022-01-22T23:08:42.283Z] TEST RESULT: Error. Error evaluating expression: invalid boolean value: `null' for expression `vm.musl'
[2022-01-22T23:08:42.283Z] --------------------------------------------------

Java version:

[2022-01-22T23:07:20.738Z] "/Users/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java" -version
[2022-01-22T23:07:20.738Z] openjdk version "17.0.2-internal" 2022-01-18
[2022-01-22T23:07:20.738Z] OpenJDK Runtime Environment (build 17.0.2-internal+0-adhoc.jenkins.BuildJDK17x86-64macNightly)
[2022-01-22T23:07:20.738Z] Eclipse OpenJ9 VM (build master-2a80e4c17a3, JRE 17 Mac OS X amd64-64-Bit Compressed References 20220121_140 (JIT enabled, AOT enabled)
[2022-01-22T23:07:20.738Z] OpenJ9   - 2a80e4c17a3
[2022-01-22T23:07:20.738Z] OMR      - b0373e26ac4
[2022-01-22T23:07:20.738Z] JCL      - 3db08566f38 based on jdk-17.0.2+8)

Output excerpt from HotSpot run:

17:08:44  Running test jdk_lang_0 ...
17:08:44  ===============================================
17:08:44  jdk_lang_0 Start Time: Sat Jan 22 16:08:44 2022 Epoch Time (ms): 1642889324129
17:08:44  Nothing to be done for setup.
17:08:44  variation:   Mode150
17:08:44  JVM_OPTIONS:    -XX:+UseCompressedOops 
17:08:44  { itercnt=1; \
17:08:44  mkdir -p "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428893236388/jdk_lang_0"; \
17:08:44  cd "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428893236388/jdk_lang_0"; \
17:08:44  "/home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java" -Xmx512m -jar "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/jtreg/lib/jtreg.jar" \
17:08:44  -agentvm -a -ea -esa -v:fail,error,time,nopass -retain:fail,error,*.dmp,javacore.*,heapdump.*,*.trc -ignore:quiet -timeoutFactor:8 -xml:verify -concurrency:3  -nativepath:"/home/jenkins/workspace/Grinder/openjdkbinary/openjdk-test-image/jdk/jtreg/native" -vmoptions:"-Xmx512m    -XX:+UseCompressedOops  " \
17:08:44   \
17:08:44  -w ""/home/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428893236388/jdk_lang_0"/work" \
17:08:44  -r "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/report" \
17:08:44  -jdk:"/home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image" \
17:08:44  -exclude:"/home/jenkins/workspace/Grinder/aqa-tests/TKG/../openjdk/openjdk-jdk/test/jdk/ProblemList.txt" \
17:08:44  -exclude:"/home/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/excludes/ProblemList_openjdk17.txt" \
17:08:44  "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../openjdk/openjdk-jdk/test/jdk:jdk_lang"; \
17:08:44  if [ $? -eq 0 ] ; then echo ""; echo "jdk_lang_0""_PASSED"; echo ""; cd /home/jenkins/workspace/Grinder/aqa-tests/TKG/..;  else echo ""; echo "jdk_lang_0""_FAILED"; echo ""; fi; } 2>&1 | tee -a "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428893236388/TestTargetResult";
17:08:44  Directory "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../TKG/output_16428893236388/jdk_lang_0/work" not found: creating
17:08:44  Directory "/home/jenkins/workspace/Grinder/aqa-tests/TKG/../../jvmtest/openjdk/report" not found: creating
17:08:48  XML output with verification to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_16428893236388/jdk_lang_0/work
17:16:44  Test results: passed: 880
17:17:08  Report written to /home/jenkins/workspace/Grinder/jvmtest/openjdk/report/html/report.html
17:17:08  Results written to /home/jenkins/workspace/Grinder/aqa-tests/TKG/output_16428893236388/jdk_lang_0/work
17:17:08  
17:17:08  jdk_lang_0_PASSED

Java version:

17:07:08  Run /home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java -version
17:07:08  =JAVA VERSION OUTPUT BEGIN=
17:07:09  openjdk version "17.0.2-beta" 2022-01-18
17:07:09  OpenJDK Runtime Environment Temurin-17.0.2+8-202201202250 (build 17.0.2-beta+8-202201202250)
17:07:09  OpenJDK 64-Bit Server VM Temurin-17.0.2+8-202201202250 (build 17.0.2-beta+8-202201202250, mixed mode, sharing)
17:07:09  =JAVA VERSION OUTPUT END=
17:07:09  =RELEASE INFO BEGIN=
17:07:09  IMPLEMENTOR="Eclipse Adoptium"
17:07:09  IMPLEMENTOR_VERSION="Temurin-17.0.2+8-202201202250"
17:07:09  JAVA_VERSION="17.0.2"
17:07:09  JAVA_VERSION_DATE="2022-01-18"
17:07:09  LIBC="gnu"
pshipton commented 2 years ago

Isn't this a test setup issue?

smlambert commented 2 years ago

Do not think so, this test expects a system property vm.musl to have a value of true or false. That property is null for openj9.

pshipton commented 2 years ago

It's not a system property, I don't see this property set in Hotspot, and it doesn't follow the usual conventions for system property names. It looks like a test harness property to me, we've had a number of similar problems in the past where OpenJ9 testing isn't setting a test harness property that is needed.

pshipton commented 2 years ago

Example of fixing another test property for OpenJ9 @llxia https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/300

llxia commented 2 years ago

@LongyuZhang could you help with this? Thanks

LongyuZhang commented 2 years ago

This failure can be reproduced on JDK 17 (hyc-grinder_20642), JDK 18 (hyc-grinder_20650), and JDK 19 (hyc-grinder_20652). Adding test property for OpenJ9 fixed these failures. PRs will be created soon.

Example of fixing another test property for OpenJ9 @llxia ibmruntimes/openj9-openjdk-jdk#300

pshipton commented 2 years ago

The fixes above are merged so closing.

Mesbah-Alam commented 2 years ago

The issue seems to have reappeared here: https://hyc-runtimes-jenkins.swg-devops.com/job/Test_openjdk17_j9_sanity.openjdk_x86-64_mac_testList_1/84/testReport/junit/java_lang_ClassLoader_nativeLibrary_NativeLibraryTest/java/NativeLibraryTest/

Stacktrace
Error evaluating expression: invalid boolean value: `null' for expression `vm.musl'    

JDK version:

14:18:12  System.getProperty('java.fullversion')=17.0.2+8
14:18:12  JRE 17 Mac OS X amd64-64-Bit Compressed References 20220209_95 (JIT enabled, AOT enabled)
14:18:12  OpenJ9   - 9dccbe076
14:18:12  OMR      - dac962a28
14:18:12  JCL      - 316ae6c0611 based on jdk-17.0.2+8
pshipton commented 2 years ago

It doesn't "reappear", the older code stream doesn't contain the fix https://github.com/ibmruntimes/openj9-openjdk-jdk17/pull/65.