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 722 forks source link

Crash with dead tree elimination disabled when running renaissance db-shootout benchmark #19238

Open jmesyou opened 7 months ago

jmesyou commented 7 months ago

Java -version output

openjdk version "17.0.10" 2024-01-16
IBM Semeru Runtime Open Edition 17.0.10.0 (build 17.0.10+7)
Eclipse OpenJ9 VM 17.0.10.0 (build openj9-0.43.0, JRE 17 Linux amd64-64-Bit Compressed References 20240116_670 (JIT enabled, AOT enabled)
OpenJ9   - 2c3d78b48
OMR      - ea8124dbc
JCL      - 2aad089841f based on jdk-17.0.10+7)

Summary of problem

Segmentation fault when compiling org/mapdb/BTreeMapJava$NodeSerializer.deserialize(Lorg/mapdb/DataInput2;I)Lorg/mapdb/BTreeMapJava$Node; during code generation.

Command to reproduce:

java -jar -Xjit:disableDeadTreeElimination renaissance-mit-0.15.jar db-shootout

Crash is intermittent, may require several runs in order to reproduce (usually 3-5).

Unhandled exception
Type=Segmentation error vmState=0x0005ff04
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
Handler1=00007F99190436D0 Handler2=00007F99196D9710 InaccessibleAddress=00007F9800002151
RDI=00007F98CE4F6A40 RSI=00007F98CE4F6A40 RAX=00007F9913725190 RBX=00007F98CE4F6A40
RCX=0000000000000000 RDX=0000000000000000 R8=0000000000000001 R9=00007F98CDA06890
R10=000000000000000D R11=0000000000000000 R12=00007F98CDA06890 R13=00007F9800002121
R14=00007F98CE1CB8B0 R15=00007F98CDA06890
RIP=00007F9913756589 GS=0000 FS=0000 RSP=00007F98F45F5FF0
EFlags=0000000000010206 CS=0033 RBP=00007F98CE1C7830 ERR=0000000000000006
TRAPNO=000000000000000E OLDMASK=0000000000000000 CR2=00007F9800002151
xmm0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
xmm1 00007f98cda06890 (f: 3449841920.000000, d: 6.931457e-310)
xmm2 00007f98ce1cb5e0 (f: 3457988096.000000, d: 6.931458e-310)
xmm3 00007f98ce1c20e0 (f: 3457949952.000000, d: 6.931458e-310)
xmm4 00007f98ce1c2360 (f: 3457950464.000000, d: 6.931458e-310)
xmm5 00007f98ce1c29e0 (f: 3457952256.000000, d: 6.931458e-310)
xmm6 00007f98ce1c27e0 (f: 3457951744.000000, d: 6.931458e-310)
xmm7 00007f98ce1c25e0 (f: 3457951232.000000, d: 6.931458e-310)
xmm8 00007f98ce1c2360 (f: 3457950464.000000, d: 6.931458e-310)
xmm9 1d0a0c030b26460e (f: 187057680.000000, d: 8.627180e-169)
xmm10 25521d0a0c030b26 (f: 201526048.000000, d: 6.532850e-129)
xmm11 9999999999999999 (f: 2576980480.000000, d: -2.353437e-185)
xmm12 2020202020202020 (f: 538976256.000000, d: 6.013470e-154)
xmm13 000001380000013f (f: 319.000000, d: 6.620627e-312)
xmm14 0000000008001800 (f: 134223872.000000, d: 6.631540e-316)
xmm15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
Module=/home/jyou/.sdkman/candidates/java/17.0.10-sem/lib/default/libj9jit29.so
Module_base_address=00007F9913200000

Method_being_compiled=org/mapdb/BTreeMapJava$NodeSerializer.deserialize(Lorg/mapdb/DataInput2;I)Lorg/mapdb/BTreeMapJava$Node;
Target=2_90_20240116_670 (Linux 6.7.5-100.fc38.x86_64)
CPU=amd64 (8 logical CPUs) (0x3e6e7c000 RAM)
----------- Stack Backtrace -----------
_ZN3OMR13CodeGenerator17decReferenceCountEPN2TR4NodeE+0x69 (0x00007F9913756589 [libj9jit29.so+0x556589])
_ZN3OMR3X8613TreeEvaluator18GlRegDepsEvaluatorEPN2TR4NodeEPNS2_13CodeGeneratorE+0x124 (0x00007F9913B7A414 [libj9jit29.so+0x97a414])
_ZN3OMR13CodeGenerator8evaluateEPN2TR4NodeE+0x44 (0x00007F9913756664 [libj9jit29.so+0x556664])
_Z24generateLabelInstructionN3OMR10InstOpCode8MnemonicEPN2TR4NodeEPNS2_11LabelSymbolES4_bPNS2_13CodeGeneratorE+0x5b (0x00007F9913BA760B [libj9jit29.so+0x9a760b])
_ZN3OMR3X8613TreeEvaluator14BBEndEvaluatorEPN2TR4NodeEPNS2_13CodeGeneratorE+0xda (0x00007F9913B8256A [libj9jit29.so+0x98256a])
_ZN3OMR13CodeGenerator8evaluateEPN2TR4NodeE+0x44 (0x00007F9913756664 [libj9jit29.so+0x556664])
_ZN2J913CodeGenerator22doInstructionSelectionEv+0xdb7 (0x00007F9913339A67 [libj9jit29.so+0x139a67])
_ZN3OMR12CodeGenPhase32performInstructionSelectionPhaseEPN2TR13CodeGeneratorEPNS1_12CodeGenPhaseE+0x71 (0x00007F9913763C91 [libj9jit29.so+0x563c91])
_ZN3OMR12CodeGenPhase10performAllEv+0xd6 (0x00007F99137648D6 [libj9jit29.so+0x5648d6])
_ZN3OMR13CodeGenerator12generateCodeEv+0x5a (0x00007F991375FFDA [libj9jit29.so+0x55ffda])
_ZN3OMR11Compilation7compileEv+0xb66 (0x00007F991378B336 [libj9jit29.so+0x58b336])
_ZN2TR28CompilationInfoPerThreadBase7compileEP10J9VMThreadPNS_11CompilationEP17TR_ResolvedMethodR11TR_J9VMBaseP19TR_OptimizationPlanRKNS_16SegmentAllocatorE+0x4bf (0x00007F9913376A2F [libj9jit29.so+0x176a2f])
_ZN2TR28CompilationInfoPerThreadBase14wrappedCompileEP13J9PortLibraryPv+0x381 (0x00007F9913377A61 [libj9jit29.so+0x177a61])
omrsig_protect+0x239 (0x00007F99196DA399 [libj9prt29.so+0x2a399])
_ZN2TR28CompilationInfoPerThreadBase7compileEP10J9VMThreadP21TR_MethodToBeCompiledRN2J917J9SegmentProviderE+0x372 (0x00007F99133755A2 [libj9jit29.so+0x1755a2])
_ZN2TR24CompilationInfoPerThread12processEntryER21TR_MethodToBeCompiledRN2J917J9SegmentProviderE+0x128 (0x00007F99133758E8 [libj9jit29.so+0x1758e8])
_ZN2TR24CompilationInfoPerThread14processEntriesEv+0x35b (0x00007F991337480B [libj9jit29.so+0x17480b])
_ZN2TR24CompilationInfoPerThread3runEv+0x42 (0x00007F9913374B72 [libj9jit29.so+0x174b72])
_Z30protectedCompilationThreadProcP13J9PortLibraryPN2TR24CompilationInfoPerThreadE+0x82 (0x00007F9913374C22 [libj9jit29.so+0x174c22])
omrsig_protect+0x239 (0x00007F99196DA399 [libj9prt29.so+0x2a399])
_Z21compilationThreadProcPv+0x17b (0x00007F9913374FEB [libj9jit29.so+0x174feb])
thread_wrapper+0x163 (0x00007F99196A23A3 [libj9thr29.so+0xb3a3])
start_thread+0x2f7 (0x00007F99199B3947 [libc.so.6+0x8c947])
__clone3+0x30 (0x00007F9919A39970 [libc.so.6+0x112970])

Diagnostic files

20240320.131937.546817.0003.data.zip

pshipton commented 7 months ago

@hzongaro fyi

hzongaro commented 7 months ago

I'm going to move this to the backlog. Although there's a bug here, if it's only showing up by disabling Dead Trees Elimination, it's probably not highest priority.