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

JDK21 testSCCMLTests1_openj9_1_FAILED - lambda classes #17218

Closed JasonFengJ9 closed 1 year ago

JasonFengJ9 commented 1 year ago

Failure link

From an internal grinder:

15:19:40  Eclipse OpenJ9 VM (build HEAD-1f25b601986, JRE 21 Linux amd64-64-Bit Compressed References 20230322_60 (JIT enabled, AOT enabled)
15:19:40  OpenJ9   - 1f25b601986
15:19:40  OMR      - c766c4155b0
15:19:40  JCL      - 732652e2726 based on jdk-21+13)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

15:31:37  ===============================================
15:31:37  Running test testSCCMLTests1_openj9_1 ...
15:31:37  ===============================================
15:31:37  testSCCMLTests1_openj9_1 Start Time: Tue Apr 18 15:31:36 2023 Epoch Time (ms): 1681846296459
15:31:37  variation: Mode610
15:31:37  JVM_OPTIONS:  -Xcompressedrefs -Xjit -Xgcpolicy:gencon 

15:32:21  Testing: Test 57-a: Make sure that lambda classes work and get stored in the shared class cache
15:32:21  Test start time: 2023/04/18 15:32:20 Eastern Standard Time
15:32:21  Running command: "/home/jenkins/workspace/Grinder_iteration_0/openjdkbinary/j2sdk-image/bin/java"  -Xcompressedrefs -Xjit -Xgcpolicy:gencon  -Xshareclasses:name=ShareClassesCMLTests -Xtrace:print={j9shr.2259} -cp /home/jenkins/workspace/Grinder_iteration_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/utils/utils.jar org.openj9.test.lambdatests.Test1 0
15:32:21  Time spent starting: 3 milliseconds
15:32:22  Time spent executing: 912 milliseconds
15:32:22  Test result: FAILED
15:32:23   [OUT] 364
15:32:23   [OUT] 1720
15:32:23   [OUT] Lambda test done!
15:32:23   [ERR] 19:32:21.374*0x17000           j9shr.2259     > API j9shr_classStoreTransaction_createSharedClass : enter (classname=com/ibm/sharedclasses/spi/SharedClassProvider romClassSizeFullSize=1416 romClassMinimalSize=1416 lineNumberTableSize=0 localVariableTableSize=0

15:32:23   [ERR] 19:32:21.860 0x17000           j9shr.2259     > API j9shr_classStoreTransaction_createSharedClass : enter (classname=org/openj9/test/lambdatests/Test1$$Lambda/0x0000000000000000 romClassSizeFullSize=592 romClassMinimalSize=592 lineNumberTableSize=0 localVariableTableSize=0
15:32:23  >> Success condition was not found: [Output match: j9shr[\.]2259     > API j9shr_classStoreTransaction_createSharedClass : enter [\(]classname=org/openj9/test/lambdatests/Test1..Lambda.([\d]+)/(0x00000000|0x0000000000000000)]
15:32:23  >> Required condition was found: [Output match: Lambda test done!]
15:32:23  >> Required condition was not found: [Output match: j9shr[\.]2259     > API j9shr_classStoreTransaction_createSharedClass : enter [\(]classname=org/openj9/test/lambdatests/Test1..Lambda.([\d]+)/(0x00000000|0x0000000000000000)]
15:32:23  >> Failure condition was not found: [Output match: Unhandled Exception]
15:32:23  >> Failure condition was not found: [Output match: corrupt]
15:32:23  >> Failure condition was not found: [Output match: Processing dump event]

15:33:05  ---TEST RESULTS---
15:33:05  Number of PASSED tests: 79 out of 87
15:33:05  Number of FAILED tests: 8 out of 87
15:33:05  
15:33:05  ---SUMMARY OF FAILED TESTS---
15:33:05  Test 57-a: Make sure that lambda classes work and get stored in the shared class cache
15:33:05  Test 57-b: Make sure that lambda classes are stored in the cache as orphans
15:33:05  Test 57-c: Make sure that when the program runs again lambda classes are used from the cache and not stored again
15:33:05  Test 58: Make sure that when the program runs again without the first lambda class, the second lambda class is still used from the cache and not stored again
15:33:05  Test 59-a: Run and store 10 lambda classes in the cache
15:33:05  Test 59-b: Do not run the first lambda class to check if a class with 1 digit index number gets matched to the one stored in the cache but with 2 digits index number (10th class in the previous run will be matched to 9th in this run)
15:33:05  Test 60-a: Make sure that lambda classes work and get stored in the cache when another function with lambda classes in another file is being called from the current file
15:33:05  Test 60-b: Make sure that the classes are used from the cache when the program is being run again
15:33:05  -----------------------------
15:33:05  
15:33:05  -----------------------------------
15:33:05  testSCCMLTests1_openj9_1_FAILED

50x internal grinder

Also seen https://openj9-jenkins.osuosl.org/job/Test_openjdknext_j9_sanity.functional_x86-64_linux_Personal/30/

FYI @hangshao0

JasonFengJ9 commented 1 year ago

Discussed with @hangshao0 this is a test problem.

It was

20:05:04.632 0x14688ef00           j9shr.2259     > API j9shr_classStoreTransaction_createSharedClass : enter (classname=Test1$$Lambda$3/0x0000000000000000 romClassSizeFullSize=544 romClassMinimalSize=544 lineNumberTableSize=0 localVariableTableSize=0
Test1$$Lambda$3/0x0000000000000000

JDK21 has

15:32:23   [ERR] 19:32:21.860 0x17000           j9shr.2259     > API j9shr_classStoreTransaction_createSharedClass : enter (classname=org/openj9/test/lambdatests/Test1$$Lambda/0x0000000000000000 romClassSizeFullSize=592 romClassMinimalSize=592 lineNumberTableSize=0 localVariableTableSize=0
Test1$$Lambda/0x0000000000000000
JasonFengJ9 commented 1 year ago

The openjdk change was https://github.com/ibmruntimes/openj9-openjdk-jdk/commit/89cb6a4857eb80f3de4969341dc55accccfe1925

8292914: Lambda proxies have unstable names Change the name of generated lambda proxy classes so that they no longer have a numerical suffix.