openj9
openj9 copied to clipboard
OpenJDK java/lang/invoke/MethodHandleProxies/BasicTest crash vmState=0x00000000 hashTableGrow
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/1/ jdk_lang_j9_0 java/lang/invoke/MethodHandleProxies/BasicTest.java
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/1/openjdk_test_output.tar.gz
04:53:41 STARTED BasicTest::testDefaultMethods 'testDefaultMethods()'
04:53:41 SUCCESSFUL BasicTest::testDefaultMethods 'testDefaultMethods()'
04:53:41 Unhandled exception
04:53:41 Type=Segmentation error vmState=0x00000000
04:53:41 J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032
04:53:41 Handler1=09001000A0DD08F0 Handler2=09001000A0B429C0
04:53:41 R0=0000000000000000 R1=0000010023BA10F0 R2=09001000A0DD4718 R3=0000000000000000
04:53:41 R4=0000010023BA1160 R5=0000010022AEBD70 R6=0000010096DE27EF R7=0000010096DE27E5
04:53:41 R8=0000000000000001 R9=0000000067696E65 R10=FFFFFFFFFFFFFFFF R11=0000000000000000
04:53:41 R12=0900000006E58990 R13=0000010023BB0800 R14=0000010024357290 R15=0000000000000005
04:53:41 R16=0000000000010001 R17=00000100226689C8 R18=0000000000000000 R19=0000000000000000
04:53:41 R20=0000000000000000 R21=09001000A0D8D0E8 R22=000000000000045F R23=0000000000000000
04:53:41 R24=00000100241F1D90 R25=0000000000000000 R26=00000100241F1D90 R27=00000100243928D0
04:53:41 R28=09001000A0A17310 R29=0000010010132830 R30=000000000000092B R31=37601C101E5971F5
04:53:41 IAR=0900000006ED29D0 LR=0900000006EEFA58 MSR=A00000000200D032 CTR=0900000006EEE820
04:53:41 CR=4422482200000000 FPSCR=8202000000000000 XER=0000000082020000
04:53:41 FPR0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR1 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
04:53:41 FPR2 41cdcd6500000000 (f: 0.000000, d: 1.000000e+09)
04:53:41 FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR5 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
04:53:41 FPR6 4070b1f20d4afc0c (f: 223018000.000000, d: 2.671216e+02)
04:53:41 FPR7 412e848000000000 (f: 0.000000, d: 1.000000e+06)
04:53:41 FPR8 3ff0000000000000 (f: 0.000000, d: 1.000000e+00)
04:53:41 FPR9 4530000000000000 (f: 0.000000, d: 1.934281e+25)
04:53:41 FPR10 412e848000000000 (f: 0.000000, d: 1.000000e+06)
04:53:41 FPR11 43300000000f4240 (f: 1000000.000000, d: 4.503600e+15)
04:53:41 FPR12 4530000000000000 (f: 0.000000, d: 1.934281e+25)
04:53:41 FPR13 0000000000000001 (f: 1.000000, d: 4.940656e-324)
04:53:41 FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
04:53:41 Module=/home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/jdkbinary/j2sdk-image/lib/default/libj9vm29.so
04:53:41 Module_base_address=0900000006E45000
04:53:41 Target=2_90_20240206_7 (AIX 7.1)
04:53:41 CPU=ppc64 (16 logical CPUs) (0x780000000 RAM)
04:53:41 ----------- Stack Backtrace -----------
04:53:41 IPRA.$hashTableGrowListNodes+0x24c (0x0900000006E58990 [libj9vm29.so+0x13990])
04:53:41 hashTableGrow+0x2b8 (0x0900000006E5619C [libj9vm29.so+0x1119c])
04:53:41 hashTableAdd+0x3a0 (0x0900000006E55E44 [libj9vm29.so+0x10e44])
04:53:41 hashPkgTableIDFor+0x1b4 (0x0900000006EF19B8 [libj9vm29.so+0xac9b8])
04:53:41 IPRA.$_ZL26internalCreateRAMClassDoneP10J9VMThreadP13J9ClassLoaderS2_P10J9ROMClassmP7J9ClassP6J9UTF8P21J9CreateRAMClassStateS6_P15J9MemorySegment+0x7c8 (0x0900000006E9148C [libj9vm29.so+0x4c48c])
04:53:41 IPRA.$_ZL38internalCreateRAMClassFromROMClassImplP10J9VMThreadP13J9ClassLoaderP10J9ROMClassmP7J9ClassPP11J9ROMMethodliS6_S6_P21J9CreateRAMClassStateS2_S6_P8J9Module+0x14b0 (0x0900000006E93474 [libj9vm29.so+0x4e474])
04:53:41 internalCreateRAMClassFromROMClass+0x290 (0x0900000006E8F154 [libj9vm29.so+0x4a154])
04:53:41 internalDefineClass+0x224 (0x0900000006F8A428 [libj9vm29.so+0x145428])
04:53:41 attemptDynamicClassLoad+0x2e4 (0x0900000006E8D068 [libj9vm29.so+0x48068])
04:53:41 internalFindClassInModule+0x2f98 (0x0900000006E8B4BC [libj9vm29.so+0x464bc])
04:53:41 internalFindClassString+0x1dc (0x0900000006E88380 [libj9vm29.so+0x43380])
04:53:41 (0x09000000070D87EC [libj9vm29.so+0x2937ec])
04:53:41 (0x0900000006ED2CE8 [libj9vm29.so+0x8dce8])
04:53:41 sendLoadClass+0x1e0 (0x0900000006EB8704 [libj9vm29.so+0x73704])
04:53:41 internalFindClassInModule+0x23dc (0x0900000006E8A900 [libj9vm29.so+0x45900])
04:53:41 resolveClassRef+0x1d4 (0x0900000006EDBED8 [libj9vm29.so+0x96ed8])
04:53:41 (0x09000000070EB3BC [libj9vm29.so+0x2a63bc])
04:53:41 (0x0900000006ED2CE8 [libj9vm29.so+0x8dce8])
04:53:41 sendClinit+0x278 (0x0900000006EB835C [libj9vm29.so+0x7335c])
04:53:41 initializeImpl+0x430 (0x0900000006EB38B4 [libj9vm29.so+0x6e8b4])
04:53:41 _ZL21classInitStateMachineP10J9VMThreadP7J9Class16J9ClassInitState+0x139c (0x0900000006EB5140 [libj9vm29.so+0x70140])
04:53:41 resolveStaticMethodRefInto+0x3ac (0x0900000006EDCBD0 [libj9vm29.so+0x97bd0])
04:53:41 resolveStaticMethodRef+0x30 (0x0900000006EDD234 [libj9vm29.so+0x98234])
04:53:41 (0x09000000070C6F2C [libj9vm29.so+0x281f2c])
04:53:41 (0x0900000006ED2CE8 [libj9vm29.so+0x8dce8])
04:53:41 runJavaThread+0x28c (0x0900000006EBA330 [libj9vm29.so+0x75330])
04:53:41 _ZL23javaProtectedThreadProcP13J9PortLibraryPv+0xf0 (0x0900000006E47FF4 [libj9vm29.so+0x2ff4])
04:53:41 omrsig_protect+0x4fc (0x09000000075C36E0 [libj9prt29.so+0x5f6e0])
04:53:41 javaThreadProc+0x70 (0x0900000006E47E94 [libj9vm29.so+0x2e94])
04:53:41 thread_wrapper+0x14c (0x09000000071E3590 [libj9thr29.so+0x5590])
04:53:41 _pthread_body+0xf0 (0x090000000051FE14 [libpthreads.a+0x3e14])
04:53:41 ---------------------------------------
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_x86-64_mac_Nightly_testList_1/2 jdk_lang_j9_0 java/lang/invoke/MethodHandleProxies/BasicTest.java
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk22_j9_sanity.openjdk_x86-64_mac_Nightly_testList_1/2/openjdk_test_output.tar.gz
21:24:13 SUCCESSFUL BasicTest::testNonSealed 'testNonSealed()'
21:24:13 STARTED BasicTest::testMultiSameName 'testMultiSameName()'
21:24:13 Unhandled exception
21:24:13 Type=Segmentation error vmState=0x00000000
21:24:13 J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
21:24:13 Handler1=0000000004C5A0E0 Handler2=0000000004F7C7C0 InaccessibleAddress=00007FDE41549A08
21:24:13 RDI=0000000004BE2BE0 RSI=0000700008851DE8 RAX=00007FDE3C966E28 RBX=0000700008851DE0
21:24:13 RCX=0000000000000003 RDX=00007FDE3C966E20 R8=000000000000002E R9=0000000000000010
21:24:13 R10=000000001DE993C8 R11=0000000000000000 R12=00007FDE3C96D420 R13=0000000000000463
21:24:13 R14=00007FDE3A816820 R15=000000000000092B
21:24:13 RIP=0000000004E21C93 GS=0000 FS=0000 RSP=0000700008851DB0
21:24:13 RFlags=0000000000010202 CS=002B RBP=0000700008851DB0 ERR=41549A0800000004
21:24:13 TRAPNO=000000040000000E CPU=9A08000000040000 FAULTVADDR=00007FDE41549A08
21:24:13 XMM0 ffffffffffffffff (f: 4294967296.000000, d: nan)
21:24:13 XMM1 43e0000000000000 (f: 0.000000, d: 9.223372e+18)
21:24:13 XMM2 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
21:24:13 XMM3 4330000000000000 (f: 0.000000, d: 4.503600e+15)
21:24:13 XMM4 412e848000000000 (f: 0.000000, d: 1.000000e+06)
21:24:13 XMM5 656b6f766e692f67 (f: 1852387200.000000, d: 3.557613e+180)
21:24:13 XMM6 3fe60e32f44788d9 (f: 4098328832.000000, d: 6.892333e-01)
21:24:13 XMM7 4028f40b5ed9812d (f: 1591312640.000000, d: 1.247665e+01)
21:24:13 XMM8 0000000041400000 (f: 1094713344.000000, d: 5.408603e-315)
21:24:13 XMM9 401aaaaaaaaaaaab (f: 2863311616.000000, d: 6.666667e+00)
21:24:13 XMM10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 XMM11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 XMM12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 XMM13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 XMM14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 XMM15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:24:13 Module=/Users/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_x86-64_mac_Nightly_testList_1/jdkbinary/j2sdk-image/lib/default/libj9vm29.dylib
21:24:13 Module_base_address=0000000004C22000 Symbol=getPackageName
21:24:13 Symbol_address=0000000004E21C70
21:24:13 Target=2_90_20240206_9 (Mac OS X 11.6.7)
21:24:13 CPU=amd64 (4 logical CPUs) (0x200000000 RAM)
21:24:13 ----------- Stack Backtrace -----------
21:24:13 getPackageName+0x24 (0x0000000004E21C94 [libj9vm29.dylib+0x1ffc94])
21:24:13 classHashGetName+0x70 (0x0000000004C7E340 [libj9vm29.dylib+0x5c340])
21:24:13 classHashFn+0x40 (0x0000000004C7C340 [libj9vm29.dylib+0x5a340])
21:24:13 hashTableAdd+0x279 (0x0000000004E355C9 [libj9vm29.dylib+0x2135c9])
21:24:13 hashPkgTableIDFor+0xa2 (0x0000000004C7DDC2 [libj9vm29.dylib+0x5bdc2])
21:24:13 _ZL26internalCreateRAMClassDoneP10J9VMThreadP13J9ClassLoaderS2_P10J9ROMClassmP7J9ClassP6J9UTF8P21J9CreateRAMClassStateS6_P15J9MemorySegment+0xb81 (0x0000000004C46841 [libj9vm29.dylib+0x24841])
21:24:13 _ZL38internalCreateRAMClassFromROMClassImplP10J9VMThreadP13J9ClassLoaderP10J9ROMClassmP7J9ClassPP11J9ROMMethodliS6_S6_P21J9CreateRAMClassStateS2_S6_P8J9Module+0x30e (0x0000000004C46C4E [libj9vm29.dylib+0x24c4e])
21:24:13 internalCreateRAMClassFromROMClass+0x230 (0x0000000004C45100 [libj9vm29.dylib+0x23100])
21:24:13 internalDefineClass+0xa4c (0x0000000004E6DF3C [libj9vm29.dylib+0x24bf3c])
21:24:13 internalFindClassInModule+0x1713 (0x0000000004C40F53 [libj9vm29.dylib+0x1ef53])
21:24:13 internalFindClassString+0x211 (0x0000000004C3F7F1 [libj9vm29.dylib+0x1d7f1])
21:24:13 _ZN26VM_BytecodeInterpreterFull3runEP10J9VMThread+0x16126 (0x0000000004CFA066 [libj9vm29.dylib+0xd8066])
21:24:13 bytecodeLoopFull+0xd1 (0x0000000004CE3F31 [libj9vm29.dylib+0xc1f31])
21:24:13 ---------------------------------------
@hangshao0 Please take a look at this
@theresa-m Could you look at this ?
JDK22 ppc64_aix(paix910
)
19:33:39 variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage Mode501
19:33:39 JVM_OPTIONS: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -Xjit -Xgcpolicy:balanced -Xnocompressedrefs -Xverbosegclog
20:12:41 TEST: java/lang/invoke/MethodHandleProxies/BasicTest.java
20:12:41 Unhandled exception
20:12:41 Type=Segmentation error vmState=0x00000000
20:12:41 J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032
20:12:41 Handler1=09001000A1033688 Handler2=09001000A07E9A50
20:12:41 R0=0000000000000000 R1=0000010023C570C0 R2=09001000A10374B0 R3=0000000000000000
20:12:41 R4=0000010023C57130 R5=00000100242AACD0 R6=0000010053770E47 R7=0000010053770E3D
20:12:41 R8=0000000000000001 R9=0000000000000000 R10=000000000000000C R11=0000000000000000
20:12:41 R12=0900000003D6E990 R13=0000010023C66800 R14=00000100242FE590 R15=0000000000000005
20:12:41 R16=0000000000010001 R17=000001002266B3C8 R18=0000000000000000 R19=0000000000000000
20:12:41 R20=0000000000000000 R21=09001000A0FEFDD0 R22=0000000000000463 R23=0000000000000000
20:12:41 R24=000001002415BF50 R25=0000000000000000 R26=000001002415BF50 R27=000001002430A010
20:12:41 R28=09001000A0B48E08 R29=0000010010132ED0 R30=000000000000092B R31=7772B69EB0177829
20:12:41 IAR=0900000003DE89D0 LR=0900000003E05AD8 MSR=A00000000200D032 CTR=0900000003E048A0
20:12:41 CR=442242420000A760 FPSCR=8202000000000000 XER=0000A76082020000
20:12:41 FPR0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR1 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
20:12:41 FPR2 41cdcd6500000000 (f: 0.000000, d: 1.000000e+09)
20:12:41 FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR5 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
20:12:41 FPR6 4070b1f20d4afc0c (f: 223018000.000000, d: 2.671216e+02)
20:12:41 FPR7 412e848000000000 (f: 0.000000, d: 1.000000e+06)
20:12:41 FPR8 3ff0000000000000 (f: 0.000000, d: 1.000000e+00)
20:12:41 FPR9 4530000000000000 (f: 0.000000, d: 1.934281e+25)
20:12:41 FPR10 412e848000000000 (f: 0.000000, d: 1.000000e+06)
20:12:41 FPR11 43300000000f4240 (f: 1000000.000000, d: 4.503600e+15)
20:12:41 FPR12 4530000000000000 (f: 0.000000, d: 1.934281e+25)
20:12:41 FPR13 0000000000000001 (f: 1.000000, d: 4.940656e-324)
20:12:41 FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
20:12:41 Module=/home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Personal_testList_0/jdkbinary/j2sdk-image/lib/default/libj9vm29.so
20:12:41 Module_base_address=0900000003D5B000
20:12:41 Target=2_90_20240227_24 (AIX 7.2)
20:12:41 CPU=ppc64 (16 logical CPUs) (0x200000000 RAM)
20:12:41 ----------- Stack Backtrace -----------
20:12:41 IPRA.$hashTableGrowListNodes+0x24c (0x0900000003D6E990 [libj9vm29.so+0x13990])
20:12:41 hashTableGrow+0x2b8 (0x0900000003D6C19C [libj9vm29.so+0x1119c])
20:12:41 hashTableAdd+0x3a0 (0x0900000003D6BE44 [libj9vm29.so+0x10e44])
20:12:41 hashPkgTableIDFor+0x1b4 (0x0900000003E07A38 [libj9vm29.so+0xaca38])
20:12:41 IPRA.$_ZL26internalCreateRAMClassDoneP10J9VMThreadP13J9ClassLoaderS2_P10J9ROMClassmP7J9ClassP6J9UTF8P21J9CreateRAMClassStateS6_P15J9MemorySegment+0x7c8 (0x0900000003DA748C [libj9vm29.so+0x4c48c])
20:12:41 IPRA.$_ZL38internalCreateRAMClassFromROMClassImplP10J9VMThreadP13J9ClassLoaderP10J9ROMClassmP7J9ClassPP11J9ROMMethodliS6_S6_P21J9CreateRAMClassStateS2_S6_P8J9Module+0x14b0 (0x0900000003DA9474 [libj9vm29.so+0x4e474])
20:12:41 internalCreateRAMClassFromROMClass+0x290 (0x0900000003DA5154 [libj9vm29.so+0x4a154])
20:12:41 internalDefineClass+0x224 (0x0900000003EA0428 [libj9vm29.so+0x145428])
20:12:41 attemptDynamicClassLoad+0x2e4 (0x0900000003DA3068 [libj9vm29.so+0x48068])
20:12:41 internalFindClassInModule+0x2f98 (0x0900000003DA14BC [libj9vm29.so+0x464bc])
20:12:41 internalFindClassString+0x1dc (0x0900000003D9E380 [libj9vm29.so+0x43380])
20:12:41 (0x0900000003FEF1FC [libj9vm29.so+0x2941fc])
20:12:41 (0x0900000003DE8CE8 [libj9vm29.so+0x8dce8])
20:12:41 sendLoadClass+0x1e0 (0x0900000003DCE704 [libj9vm29.so+0x73704])
20:12:41 internalFindClassInModule+0x23dc (0x0900000003DA0900 [libj9vm29.so+0x45900])
20:12:41 resolveClassRef+0x1d4 (0x0900000003DF1ED8 [libj9vm29.so+0x96ed8])
20:12:41 (0x09000000040020AC [libj9vm29.so+0x2a70ac])
20:12:41 (0x0900000003DE8CE8 [libj9vm29.so+0x8dce8])
20:12:41 sendClinit+0x278 (0x0900000003DCE35C [libj9vm29.so+0x7335c])
20:12:41 initializeImpl+0x430 (0x0900000003DC98B4 [libj9vm29.so+0x6e8b4])
20:12:41 _ZL21classInitStateMachineP10J9VMThreadP7J9Class16J9ClassInitState+0x139c (0x0900000003DCB140 [libj9vm29.so+0x70140])
20:12:41 resolveStaticMethodRefInto+0x3ac (0x0900000003DF2BD0 [libj9vm29.so+0x97bd0])
20:12:41 resolveStaticMethodRef+0x30 (0x0900000003DF3234 [libj9vm29.so+0x98234])
20:12:41 (0x0900000003FDD93C [libj9vm29.so+0x28293c])
20:12:41 (0x0900000003DE8CE8 [libj9vm29.so+0x8dce8])
20:12:41 runJavaThread+0x28c (0x0900000003DD0330 [libj9vm29.so+0x75330])
20:12:41 _ZL23javaProtectedThreadProcP13J9PortLibraryPv+0xf0 (0x0900000003D5DFF4 [libj9vm29.so+0x2ff4])
20:12:41 omrsig_protect+0x4fc (0x090000000355B6E0 [libj9prt29.so+0x5f6e0])
20:12:41 javaThreadProc+0x70 (0x0900000003D5DE94 [libj9vm29.so+0x2e94])
20:12:41 thread_wrapper+0x14c (0x09000000035C4590 [libj9thr29.so+0x5590])
20:12:41 _pthread_body+0xe8 (0x09000000005B404C [libpthreads.a+0x404c])
20:12:41 ---------------------------------------
20:12:41 JVMDUMP039I Processing dump event "gpf", detail "" at 2024/02/27 18:44:11 - please wait.
20:12:41 TEST RESULT: Error. Program `/home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Personal_testList_0/jdkbinary/j2sdk-image/bin/java' timed out (timeout set to 960000ms, elapsed time including timeout handling was 1702798ms).
20:12:41 --------------------------------------------------
20:52:25 Test results: passed: 925; error: 1
20:52:53 Report written to /home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Personal_testList_0/aqa-tests/TKG/output_17090776685750/jdk_lang_j9_0/report/html/report.html
20:52:53 Results written to /home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Personal_testList_0/aqa-tests/TKG/output_17090776685750/jdk_lang_j9_0/work
20:52:53 Error: Some tests failed or other problems occurred.
20:52:53 -----------------------------------
20:52:53 jdk_lang_j9_0_FAILED
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/14/ jdk_lang_j9_0 java/lang/invoke/MethodHandleProxies/BasicTest.java
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/14/openjdk_test_output.tar.gz
02:05:04 Type=Segmentation error vmState=0x00000000
02:05:04 J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000032
02:05:04 Handler1=09001000A1162640 Handler2=09001000A0FF99D0
02:05:04 R0=0000000000000000 R1=0000010023B930C0 R2=09001000A1166468 R3=0000000000000000
02:05:04 R4=0000010023B93130 R5=000001002432E9F0 R6=0000010085A54D62 R7=0000010085A54D58
02:05:04 R8=0000000000000001 R9=000000006F776162 R10=0000000000000001 R11=0000000000000000
02:05:04 R12=09000000116E4990 R13=0000010023BA2800 R14=00000100241D64A0 R15=0000000000000005
02:05:04 R16=0000000000010001 R17=00000100226672C8 R18=0000000000000000 R19=0000000000000000
02:05:04 R20=0000000000000000 R21=09001000A111ED88 R22=0000000000000461 R23=0000000000000000
02:05:04 R24=00000100241CF3D0 R25=0000000000000000 R26=00000100241CF3D0 R27=0000010024365AD0
02:05:04 R28=09001000A1081DC0 R29=0000010010132870 R30=000000000000092B R31=1405FE3FCD8D277E
02:05:04 IAR=090000001175EAD0 LR=090000001177BBD8 MSR=A00000000200D032 CTR=090000001177A9A0
02:05:04 CR=4422488200000000 FPSCR=8202000000000000 XER=0000000082020000
02:05:04 FPR0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR1 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
02:05:04 FPR2 41cdcd6500000000 (f: 0.000000, d: 1.000000e+09)
02:05:04 FPR3 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR4 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR5 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
02:05:04 FPR6 4070b1f20d4afc0c (f: 223018000.000000, d: 2.671216e+02)
02:05:04 FPR7 412e848000000000 (f: 0.000000, d: 1.000000e+06)
02:05:04 FPR8 3ff0000000000000 (f: 0.000000, d: 1.000000e+00)
02:05:04 FPR9 4530000000000000 (f: 0.000000, d: 1.934281e+25)
02:05:04 FPR10 412e848000000000 (f: 0.000000, d: 1.000000e+06)
02:05:04 FPR11 43300000000f4240 (f: 1000000.000000, d: 4.503600e+15)
02:05:04 FPR12 4530000000000000 (f: 0.000000, d: 1.934281e+25)
02:05:04 FPR13 0000000000000001 (f: 1.000000, d: 4.940656e-324)
02:05:04 FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
02:05:04 Module=/home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/jdkbinary/j2sdk-image/lib/default/libj9vm29.so
02:05:04 Module_base_address=09000000116D1000
02:05:04 Target=2_90_20240229_26 (AIX 7.2)
02:05:04 CPU=ppc64 (16 logical CPUs) (0x780000000 RAM)
02:05:04 ----------- Stack Backtrace -----------
02:05:04 IPRA.$hashTableGrowListNodes+0x24c (0x09000000116E4990 [libj9vm29.so+0x13990])
02:05:04 hashTableGrow+0x2b8 (0x09000000116E219C [libj9vm29.so+0x1119c])
02:05:04 hashTableAdd+0x3a0 (0x09000000116E1E44 [libj9vm29.so+0x10e44])
02:05:04 hashPkgTableIDFor+0x1b4 (0x090000001177DB38 [libj9vm29.so+0xacb38])
02:05:04 IPRA.$_ZL26internalCreateRAMClassDoneP10J9VMThreadP13J9ClassLoaderS2_P10J9ROMClassmP7J9ClassP6J9UTF8P21J9CreateRAMClassStateS6_P15J9MemorySegment+0x7c8 (0x090000001171D58C [libj9vm29.so+0x4c58c])
02:05:04 IPRA.$_ZL38internalCreateRAMClassFromROMClassImplP10J9VMThreadP13J9ClassLoaderP10J9ROMClassmP7J9ClassPP11J9ROMMethodliS6_S6_P21J9CreateRAMClassStateS2_S6_P8J9Module+0x14b0 (0x090000001171F574 [libj9vm29.so+0x4e574])
02:05:04 internalCreateRAMClassFromROMClass+0x290 (0x090000001171B254 [libj9vm29.so+0x4a254])
02:05:04 internalDefineClass+0x224 (0x0900000011816528 [libj9vm29.so+0x145528])
02:05:04 attemptDynamicClassLoad+0x2e4 (0x0900000011719168 [libj9vm29.so+0x48168])
02:05:04 internalFindClassInModule+0x2f98 (0x09000000117175BC [libj9vm29.so+0x465bc])
02:05:04 internalFindClassString+0x1dc (0x0900000011714480 [libj9vm29.so+0x43480])
02:05:04 (0x09000000119652FC [libj9vm29.so+0x2942fc])
02:05:04 (0x090000001175EDE8 [libj9vm29.so+0x8dde8])
02:05:04 sendLoadClass+0x1e0 (0x0900000011744804 [libj9vm29.so+0x73804])
02:05:04 internalFindClassInModule+0x23dc (0x0900000011716A00 [libj9vm29.so+0x45a00])
02:05:04 resolveClassRef+0x1d4 (0x0900000011767FD8 [libj9vm29.so+0x96fd8])
02:05:04 (0x09000000119781AC [libj9vm29.so+0x2a71ac])
02:05:04 (0x090000001175EDE8 [libj9vm29.so+0x8dde8])
02:05:04 sendClinit+0x278 (0x090000001174445C [libj9vm29.so+0x7345c])
02:05:04 initializeImpl+0x430 (0x090000001173F9B4 [libj9vm29.so+0x6e9b4])
02:05:04 _ZL21classInitStateMachineP10J9VMThreadP7J9Class16J9ClassInitState+0x139c (0x0900000011741240 [libj9vm29.so+0x70240])
02:05:04 resolveStaticMethodRefInto+0x3ac (0x0900000011768CD0 [libj9vm29.so+0x97cd0])
02:05:04 resolveStaticMethodRef+0x30 (0x0900000011769334 [libj9vm29.so+0x98334])
02:05:04 (0x0900000011953A3C [libj9vm29.so+0x282a3c])
02:05:04 (0x090000001175EDE8 [libj9vm29.so+0x8dde8])
02:05:04 runJavaThread+0x28c (0x0900000011746430 [libj9vm29.so+0x75430])
02:05:04 _ZL23javaProtectedThreadProcP13J9PortLibraryPv+0xf0 (0x09000000116D3FF4 [libj9vm29.so+0x2ff4])
02:05:04 omrsig_protect+0x4fc (0x0900000011AD16E0 [libj9prt29.so+0x5f6e0])
02:05:04 javaThreadProc+0x70 (0x09000000116D3E94 [libj9vm29.so+0x2e94])
02:05:04 thread_wrapper+0x14c (0x0900000011B3A590 [libj9thr29.so+0x5590])
02:05:04 _pthread_body+0xe8 (0x090000000056104C [libpthreads.a+0x404c])
02:05:04 ---------------------------------------
This ~should~ might be fixed by https://github.com/eclipse-openj9/openj9/pull/19020. ~@theresa-m Can you please verify?~
The last crash happened after https://github.com/eclipse-openj9/openj9/pull/19020 was merged. It seems to be a different issue.
This is MethodHandleProxies test, which can create many anonymous classes.
For package ID, it references the romClass, where the package name is from: https://github.com/eclipse-openj9/openj9/blob/ae0c76e4fdb9581632364e22f6a797e9de9a67bd/runtime/vm/KeyHashTable.c#L555
One possible case might be:
If the class is an anonymous class, its romClass could be collected by GC, which makes the romClass pointer (and the hashtable entry referencing the romClass) invalid. hashTableGrow()
goes through all the entries in the hashtable, which will eventually encounter the invalid one (if exits) and crash.
Potential Fix
This will only apply to the new impl of MethodHandleProxies in JDK22+. @theresa-m Give it a try and see if it works.
GC doesn't remove the module entries from the hash table after collecting Modules.
For MethodHandleProxies, there is a 1-to-1 relationship between the anon/hidden class and its module entry. Once the MethodHandleProxies anon/hidden class is unloaded, the module entry can also be collected due to the 1-to-1 relationship.
The GC triggers J9HOOK_VM_CLASS_UNLOAD
for every class that is about to be unloaded.
We register freeClassNativeMemory
(call-site) with J9HOOK_VM_CLASS_UNLOAD
.
In freeClassNativeMemory
, we can free the module entry related to a MethodHandleProxies anon/hidden class as such:
freeClassNativeMemory(J9HookInterface** hook, UDATA eventNum, void* eventData, void* userData)
{
...
J9ROMClass *romClass = clazz->romClass;
#if JAVA_SPEC_VERSION >= 22
if (J9ROMCLASS_IS_ANON_OR_HIDDEN(romClass)) {
J9Class *hostClass = clazz->hostClass;
if (J9ROMCLASS_IS_INTERFACE(hostClass->romClass)
&& (hostClass->module != clazz->module)
) {
/* MethodHandle Proxies anon/hidden class.
* Free the module entry.
*/
// There is code in classallocation.c::freeClassLoader to free a J9Module.
J9Module *module = clazz->module;
hashTableRemove(clazz->classLoader->moduleHashTable, &module);
freeJ9Module(data->currentThread->javaVM, module);
}
}
#endif /* JAVA_SPEC_VERSION >= 22 */
...
}
Most of the addresses in J9JavaVM are corrupt so I can't confirm its in the anonymous classloader.
0x4fc8: struct J9ClassLoader* anonClassLoader = <FAULT>
I also looked through areas of the code where the hash table could get modified for locking issues but it looks correct to me.
I'll try your suggestions out, thanks.
FYI There is (maybe) more efficient solution. GC triggers J9HOOK_VM_ANON_CLASSES_UNLOAD
hook once per Class Unloading procedure. This hook passes the header of Hidden (Anonymous) classes "to be unloaded" list. Pointer to the next element is stored in class->gcLink
, NULL
means end of the list. So you can do handling in the single loop. Please ask me if any questions.
@dmitripivkine is correct, J9HOOK_VM_ANON_CLASSES_UNLOAD
will be more efficient. Here is existing code to iterate through the unloaded anon/hidden list:
https://github.com/eclipse-openj9/openj9/blob/ae0c76e4fdb9581632364e22f6a797e9de9a67bd/runtime/compiler/control/HookedByTheJit.cpp#L1988-L2001
But, a new VM call-site will need to be registered against J9HOOK_VM_ANON_CLASSES_UNLOAD
.
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/19
I see the failures reported here all crash inside hashPkgTableIDFor()
, where classLoader->classHashTable
is the hash table being used.
There seems to be 2 problems, one related to stale entries in classLoader->moduleHashTable
as described in https://github.com/eclipse-openj9/openj9/issues/18907#issuecomment-1984058623. One related to stale entries in classLoader->classHashTable
.
OpenJ9 uses the romClass address (+ tag bits) of the first class loaded in its package as the unique packageID. The packageID is added into the classHashTable
. The romClass can be used to get the package name (from the class name) when necessary in the hash table. However, if an anon romClass is used as packagID, it is problematic as the anon class can be unloaded individually and its romClass can be collected by GC.
Maybe when creating the ramClass, we can leave J9Class->packageID
unset if it is an anon class and the first class loaded in its package. We can try setting the packageID later before it is being used. If there is still no non-anon romClass that can be used as packageID, we have to fall back to string comparison on the package name.
@TobiAjila @gacholio @pshipton Any other thoughts ?
JDK22 x86-64_mac(macx64rt4
)
[2024-03-08T05:05:15.503Z] variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage Mode501
[2024-03-08T05:05:15.503Z] JVM_OPTIONS: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -Xjit -Xgcpolicy:balanced -Xnocompressedrefs -Xverbosegclog
[2024-03-08T05:09:23.955Z] TEST: java/lang/invoke/MethodHandleProxies/BasicTest.java
[2024-03-08T05:09:23.956Z] Unhandled exception
[2024-03-08T05:09:23.956Z] Type=Segmentation error vmState=0x00000000
[2024-03-08T05:09:23.956Z] J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
[2024-03-08T05:09:23.956Z] Handler1=0000000000EDB080 Handler2=0000000000C2B9E0 InaccessibleAddress=00007F7DD4000000
[2024-03-08T05:09:23.956Z] RDI=00000000000E0EC0 RSI=00007F7DD4000000 RAX=00000000E3A21469 RBX=0000000000000000
[2024-03-08T05:09:23.956Z] RCX=FFFFFFFFFF0992E2 RDX=00000000E3A21469 R8=000000000000002E R9=0000000000000010
[2024-03-08T05:09:23.956Z] R10=0000000000000000 R11=0000000000000000 R12=00007F7DD8024620 R13=0000000000000460
[2024-03-08T05:09:23.956Z] R14=00007F7DD3812220 R15=FFFFFFFFFFFFFFFF
[2024-03-08T05:09:23.956Z] RIP=0000000000EFD513 GS=0000 FS=0000 RSP=0000700005958920
[2024-03-08T05:09:23.956Z] RFlags=0000000000010286 CS=002B RBP=0000700005958970 ERR=D400000000000004
[2024-03-08T05:09:23.956Z] TRAPNO=000000040000000E CPU=0000000000040000 FAULTVADDR=00007F7DD4000000
[2024-03-08T05:09:23.956Z] XMM0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM1 43e0000000000000 (f: 0.000000, d: 9.223372e+18)
[2024-03-08T05:09:23.956Z] XMM2 c3e0000000000000 (f: 0.000000, d: -9.223372e+18)
[2024-03-08T05:09:23.956Z] XMM3 4330000000000000 (f: 0.000000, d: 4.503600e+15)
[2024-03-08T05:09:23.956Z] XMM4 412e848000000000 (f: 0.000000, d: 1.000000e+06)
[2024-03-08T05:09:23.956Z] XMM5 656b6f766e692f67 (f: 1852387200.000000, d: 3.557613e+180)
[2024-03-08T05:09:23.956Z] XMM6 3fb51b073f06183f (f: 1057364032.000000, d: 8.244367e-02)
[2024-03-08T05:09:23.956Z] XMM7 402791272ee9dd8e (f: 787078528.000000, d: 1.178350e+01)
[2024-03-08T05:09:23.956Z] XMM8 3ff0000000000000 (f: 0.000000, d: 1.000000e+00)
[2024-03-08T05:09:23.956Z] XMM9 3ff5555555555555 (f: 1431655808.000000, d: 1.333333e+00)
[2024-03-08T05:09:23.956Z] XMM10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] XMM15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-03-08T05:09:23.956Z] Module=/Users/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_x86-64_mac_testList_0/jdkbinary/j2sdk-image/Contents/Home/lib/default/libj9vm29.dylib
[2024-03-08T05:09:23.956Z] Module_base_address=0000000000EA3000 Symbol=classHashFn
[2024-03-08T05:09:23.956Z] Symbol_address=0000000000EFD2E0
[2024-03-08T05:09:23.956Z] Target=2_90_20240308_16 (Mac OS X 13.2.1)
[2024-03-08T05:09:23.956Z] CPU=amd64 (12 logical CPUs) (0x400000000 RAM)
[2024-03-08T05:09:23.956Z] ----------- Stack Backtrace -----------
[2024-03-08T05:09:23.956Z] classHashFn+0x234 (0x0000000000EFD514 [libj9vm29.dylib+0x5a514])
[2024-03-08T05:09:23.956Z] hashTableAdd+0x279 (0x00000000010B65C9 [libj9vm29.dylib+0x2135c9])
[2024-03-08T05:09:23.956Z] hashPkgTableIDFor+0xa2 (0x0000000000EFEDA2 [libj9vm29.dylib+0x5bda2])
[2024-03-08T05:09:23.956Z] _ZL26internalCreateRAMClassDoneP10J9VMThreadP13J9ClassLoaderS2_P10J9ROMClassmP7J9ClassP6J9UTF8P21J9CreateRAMClassStateS6_P15J9MemorySegment+0xb81 (0x0000000000EC77D1 [libj9vm29.dylib+0x247d1])
[2024-03-08T05:09:23.956Z] _ZL38internalCreateRAMClassFromROMClassImplP10J9VMThreadP13J9ClassLoaderP10J9ROMClassmP7J9ClassPP11J9ROMMethodliS6_S6_P21J9CreateRAMClassStateS2_S6_P8J9Module+0x30e (0x0000000000EC7BDE [libj9vm29.dylib+0x24bde])
[2024-03-08T05:09:23.956Z] internalCreateRAMClassFromROMClass+0x230 (0x0000000000EC6090 [libj9vm29.dylib+0x23090])
[2024-03-08T05:09:23.956Z] internalDefineClass+0xa4c (0x00000000010EEF3C [libj9vm29.dylib+0x24bf3c])
[2024-03-08T05:09:23.956Z] internalFindClassInModule+0x1713 (0x0000000000EC1EE3 [libj9vm29.dylib+0x1eee3])
[2024-03-08T05:09:23.956Z] internalFindClassString+0x211 (0x0000000000EC0781 [libj9vm29.dylib+0x1d781])
[2024-03-08T05:09:23.956Z] _ZN26VM_BytecodeInterpreterFull3runEP10J9VMThread+0x15a3d (0x0000000000F7B2DD [libj9vm29.dylib+0xd82dd])
[2024-03-08T05:09:23.956Z] bytecodeLoopFull+0xd1 (0x0000000000F65891 [libj9vm29.dylib+0xc2891])
[2024-03-08T05:09:23.956Z] ---------------------------------------
[2024-03-08T05:09:23.956Z] JVMDUMP039I Processing dump event "gpf", detail "" at 2024/03/08 00:06:40 - please wait.
[2024-03-08T05:15:15.786Z] jdk_lang_j9_0_FAILED
There seems to be 2 problems, one related to stale entries in
OpenJ9 uses the romClass address (+ tag bits) of the first class loaded in its package as the unique packageID. The packageID is added into the classHashTable. The romClass can be used to get the package name (from the class name) when necessary in the hash table. However, if an anon romClass is used as packagID, it is problematic as the anon class can be unloaded individually and its romClass can be collected by GC.
I think this is what is happening: In the first implementation on anonClass (JDK8) an anonClass always had a parent class. This the parent was always loaded first. So the packageID would use the parent class (typically, the anonClass name was an extension of the parent). Parent classes only get unloaded, when the classloader does, so no issue with the classtables.
However, the new behaviour seems to imply that a hidden class is created without a parent class (please confirm this @babsingh ) which would mean that the pkgID would in the class table would disappear when the hidden/anon class was unloaded as @hangshao0 was seeing. So this is a new scenario that we never encountered before.
The original design was that anonClasses should be self contained, as in, they should be unloadable without without side effects, but we missed this case due to the fact that there was always a parent class. One solution could be to remove the pkg from the table when we unload. We could also try @hangshao0 suggestion, but I haven't fully thought thought the impact of this.
This will only apply to the new impl of MethodHandleProxies in JDK22+. @theresa-m Give it a try and see if it works. GC doesn't remove the module entries from the hash table after collecting Modules.
Im not sure this is an issue. GC can not collect the Module objects while the j9module is in the classLoader->moduleHashTable
. In fact there is only one way a module gets collected, and that is when the classloader gets collected. Dmitri recently fixed a bug where we werent scanning modules from certain classloaders, so unless we have another issue like this, there should be no stale module entries in the classLoader->moduleHashTable
.
I think in the future we should come up with a way to remove modules independent from classloaders like we do for anon/hidden classes, but I dont think we need this to solve the current issue.
However, the new behaviour seems to imply that a hidden class is created without a parent class (please confirm this @babsingh ) which would mean that the pkgID would in the class table would disappear when the hidden/anon class was unloaded as @hangshao0 was seeing. So this is a new scenario that we never encountered before.
Here is the code that creates the MH proxy class, which is a type of hidden class: MethodHandleProxies.java#L274-L284.
The proxy class has a parent/host class, but it doesn't inherit the package name of its parent/host class. It inherits the package name from the dynamic module's name (format: jdk.MHProxy#
where #
is a number). The format of the proxy class name is jdk.MHProxy#.<InterfaceName>
and its package name is jdk.MHProxy#
.
One solution could be to remove the pkg from the table when we unload.
~~I don't think this will work because there may be other classes that use this package.~~
Babneet clarified that the package name should be unique to the anonymous class
It inherits the package name from the dynamic module's name (format: jdk.MHProxy# where # is a number). The format of the proxy class name is jdk.MHProxy#.<InterfaceName> and its package name is jdk.MHProxy#.
If there is only one class in a jdk.MHProxy# package, we may not need to add the romCLass to the hashtable and just let packageID check fail when it is compared to another class's packageID. Or we can remove the romClass from the hashtable when it is unloaded.
But if we cannot guarantee there is only one class in a jdk.MHProxy# package, things will be different.
I don't know if anonymous classes would have much impact this but the code for defining modules relys on isAnyClassLoadedFromPackage. I think removing the anonymous class package from the table when the romclass is unloaded makes more sense so the results of this method don't change.
But if we cannot guarantee there is only one class in a jdk.MHProxy# package, things will be different.
The name is created here. I think there is only one per class.
https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_x86-64_mac_Nightly_testList_0/23 https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly_testList_0/20 https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Release_testList_0/1 https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Release_testList_0/2
I've been testing out my changes to remove package entries from the has table when hidden rom classes are unloaded but the test is still crashing at what looks like the same place in the vm. https://github.com/eclipse-openj9/openj9/commit/0014fc47a0495483201e67f090d04733bd0d3ad8 I'm adding in some trace statements for another run to make sure table entries are being removed as expected.
edit: I also found an error in the flags I'm sending to the hash functions so lets see if that helps.
I ran this change https://github.com/eclipse-openj9/openj9/pull/19159 through 9 grinder iterations and jdk_lang_j9_0 suite is passing. Previously the failure occurred approximately every 3 runs.