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

NewROMCreationAfterModifyingExistingClassTest - ERROR: Expected to read shared ROMClass before j9bcu.205! #12674

Open JasonFengJ9 opened 3 years ago

JasonFengJ9 commented 3 years ago

Failure link

From an internal build Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/32/ mac11x64rt06:

openjdk version "1.8.0_302-internal"
OpenJDK Runtime Environment (build 1.8.0_302-internal-202105120232-b01)
Eclipse OpenJ9 VM (build master-e80ab0f03, JRE 1.8.0 Mac OS X amd64-64-Bit Compressed References 20210511_126 (JIT enabled, AOT enabled)
OpenJ9   - e80ab0f03
OMR      - 092787cd6
JCL      - e0e56cb2 based on jdk8u302-b01)

Rerun in Grinder

Optional info

Failure output (captured from console output)

[2021-05-12T03:57:17.295Z] Running test J9vmTest_0 ...
[2021-05-12T03:57:17.295Z] ===============================================
[2021-05-12T03:57:17.295Z] J9vmTest_0 Start Time: Tue May 11 23:57:16 2021 Epoch Time (ms): 1620791836719
[2021-05-12T03:57:17.295Z] "/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/bin/..//bin/java" -Xshareclasses:destroyAll; "/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/bin/..//bin/java" -Xshareclasses:groupAccess,destroyAll; echo "cache cleanup done";
[2021-05-12T03:57:17.295Z] JVMSHRC005I No shared class caches available
[2021-05-12T03:57:17.295Z] JVMSHRC005I No shared class caches available
[2021-05-12T03:57:17.295Z] cache cleanup done
[2021-05-12T03:57:17.295Z] variation: Mode110
[2021-05-12T03:57:17.295Z] JVM_OPTIONS:  -Xjit -Xgcpolicy:gencon -Xnocompressedrefs 
...
[2021-05-12T03:58:14.099Z] command: /Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/bin/..//bin/java  -Xjit -Xgcpolicy:gencon -Xnocompressedrefs  -Xdump -Xms64m -Xmx64m -Dcom.ibm.tools.attach.enable=no -Xshareclasses:name=romclasscreation,enableBCI -agentlib:jvmtitest=test:ecflh001,args:modifyBootstrap=java/lang/Class -Xtrace:print=tpnid{j9shr.150} -Xtrace:print=tpnid{j9bcu.205} -Xtrace:print=tpnid{j9bcu.31}  -Xbootclasspath:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/default/jclSC180/vm.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/se-service.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/rt.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/resources.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/jsse.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/charsets.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdkbinary/j2sdk-image/Contents/Home/jre/lib/jce.jar -classpath /Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdk-tests/TKG/../../jvmtest/functional/VM_Test/VM_Test.jar:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/openjdk-tests/TKG/../TKG/lib/asm-all.jar  j9vm.test.romclasscreation.NewROMCreationAfterModifyingExistingClassTest 

...
[2021-05-12T03:58:16.805Z] 03:58:14.243 0x7ffcdf084b00           j9shr.150      - RMI storeNew: storing romclass java/lang/Class$ClassReflectNullPlaceHolder in local hashtable (address 0x000000002288C828)
[2021-05-12T03:58:16.805Z] 03:58:14.243 0x7ffcdf084b00     j9bcu(j9vm).31       - BCU internalLoadROMClass: ROMClass loaded successfully into address 000000002288C828
[2021-05-12T03:58:16.805Z] Dummy class
[2021-05-12T03:58:16.805Z] ERROR: Expected to read shared ROMClass before j9bcu.205!
[2021-05-12T03:58:16.805Z] *** Test FAILED *** (j9vm.test.romclasscreation.NewROMCreationAfterModifyingExistingClassTest)
[2021-05-12T03:58:16.805Z] 

fyi @hangshao0

hangshao0 commented 3 years ago

The output from the previous build Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/32/ on mac10x64rt03 (passed):

23:42:37  03:42:35.588*0x7fc56f880300           j9shr.150      - RMI storeNew: storing romclass java/lang/Object in local hashtable (address 0x0000000020763000)
23:42:37  03:42:35.588 0x7fc56f880300           j9shr.150      - RMI storeNew: storing romclass java/lang/J9VMInternals in local hashtable (address 0x0000000020763660)

Output from the failed build Test_openjdk8_j9_sanity.functional_x86-64_mac_testList_2/32/ on mac11x64rt06:

03:58:13.915*0x7ffcdf084b00     j9bcu(j9vm).205      > BCU internalDefineClass: classnamePtr=000000000A9DEAC8, classname=java/lang/Object, existingROMClass=0000000000000000
03:58:13.918 0x7ffcdf084b00           j9shr.150      - RMI storeNew: storing romclass java/lang/Object in local hashtable (address 0x0000000022738000)
03:58:13.918 0x7ffcdf084b00     j9bcu(j9vm).31       - BCU internalLoadROMClass: ROMClass loaded successfully into address 0000000022738000
03:58:13.918 0x7ffcdf084b00     j9bcu(j9vm).205      > BCU internalDefineClass: classnamePtr=000000000A9DEF3E, classname=java/lang/J9VMInternals, existingROMClass=0000000000000000
03:58:13.919 0x7ffcdf084b00           j9shr.150      - RMI storeNew: storing romclass java/lang/J9VMInternals in local hashtable (address 0x0000000022738660)
03:58:13.919 0x7ffcdf084b00     j9bcu(j9vm).31       - BCU internalLoadROMClass: ROMClass loaded successfully into address 0000000022738660

The test created a cache first and then use this existing cache to test. I suspect the cache is deleted in between, like some failures we saw in https://github.com/eclipse-openj9/openj9/issues/12628.

JasonFengJ9 commented 2 years ago

Observed at job/Test_openjdk11_j9_sanity.functional_ppc64le_linux_testList_2/153/(rhel7lert-1-1)

[2021-12-15T04:30:50.240Z] Dummy class
[2021-12-15T04:30:50.240Z] ERROR: Expected to read shared ROMClass before j9bcu.205!
[2021-12-15T04:30:50.240Z] *** Test FAILED *** (j9vm.test.romclasscreation.NewROMCreationAfterModifyingExistingClassTest)