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

jdk_lang_1_FAILED java/lang/invoke/MethodHandles/CatchExceptionTest.java Segmentation error vmState=0x00000000 #15006

Open JasonFengJ9 opened 2 years ago

JasonFengJ9 commented 2 years ago

Failure link

From an internal build job/Test_openjdk8_j9_sanity.openjdk_aarch64_linux_testList_1/128/(ub18-aarch64-2):

openjdk version "1.8.0_342-beta"
IBM Semeru Runtime Open Edition (build 1.8.0_342-beta-202205040236-b00)
Eclipse OpenJ9 VM (build master-3549e2444, JRE 1.8.0 Linux aarch64-64-Bit Compressed References 20220504_353 (JIT enabled, AOT enabled)
OpenJ9   - 3549e2444
OMR      - 81b79405d
JCL      - dfc9df547 based on jdk8u342-b00)

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

Optional info

Failure output (captured from console output)

[2022-05-04T03:24:59.423Z] variation: -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage Mode650
[2022-05-04T03:24:59.423Z] JVM_OPTIONS:  -Xdump:system:none -Xdump:heap:none -Xdump:system:events=gpf+abort+traceassert+corruptcache -XX:-JITServerTechPreviewMessage -XX:-UseCompressedOops 

[2022-05-04T03:26:05.825Z] TEST: java/lang/invoke/MethodHandles/CatchExceptionTest.java

[2022-05-04T03:26:05.827Z] STDERR:
[2022-05-04T03:26:05.827Z] Unhandled exception
[2022-05-04T03:26:05.827Z] Type=Segmentation error vmState=0x00000000
[2022-05-04T03:26:05.827Z] J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
[2022-05-04T03:26:05.827Z] Handler1=0000FFFFB1ACA548 Handler2=0000FFFFB1A41B88 InaccessibleAddress=00000000000001E8
[2022-05-04T03:26:05.827Z] R0=00000000000001E8 R1=0000000000000003 R2=0000FFFF14035738 R3=0000000000000000
[2022-05-04T03:26:05.827Z] R4=0000000000000000 R5=0000FFFF14035758 R6=0000000000000008 R7=0000000000000001
[2022-05-04T03:26:05.827Z] R8=0000FFFFB0E03830 R9=0000000000002200 R10=000000006271F243 R11=000000000008A577
[2022-05-04T03:26:05.827Z] R12=0000000000000018 R13=00000003E8000000 R14=00216D27A98990E2 R15=00005934FFC99EF1
[2022-05-04T03:26:05.827Z] R16=0000FFFFB112C010 R17=0000FFFFB20B5F90 R18=0000FFFFB0E92000 R19=0000000000000000
[2022-05-04T03:26:05.827Z] R20=0000FFFFB1C55000 R21=0000FFFFAC273498 R22=0000FFFF8C038AB0 R23=0000FFFFB1C591E0
[2022-05-04T03:26:05.827Z] R24=0000FFFFAC296900 R25=0000FFFF14035700 R26=0000FFFFAB526E40 R27=0000FFFF414818B3
[2022-05-04T03:26:05.827Z] R28=0000FFFFB1B2C8A8 R29=0000FFFF78C87900 R30=0000FFFFB1BA4328 R31=0000FFFF78C878F0
[2022-05-04T03:26:05.827Z] PC=0000FFFFB1B2E88C SP=0000FFFF78C878F0 PSTATE=0000000080000000
[2022-05-04T03:26:05.827Z] V0 0000000000000005 (f: 5.000000, d: 2.470328e-323)
[2022-05-04T03:26:05.827Z] V1 b1fcc340a27001ee (f: 2725249536.000000, d: -6.667925e-68)
[2022-05-04T03:26:05.827Z] V2 0000ffffb1fcc340 (f: 2986132224.000000, d: 1.390665e-309)
[2022-05-04T03:26:05.827Z] V3 0000ffff78c87e50 (f: 2026405504.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.827Z] V4 0000ffff78c87e40 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.827Z] V5 0000ffff78c87e30 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V6 0000ffff78c87e20 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V7 0000ffff78c87e10 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V8 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V9 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V16 0000ffff78c87e00 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V17 0000ffff78c87df0 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V18 0000ffff78c87de0 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V19 0000ffff78c87dd0 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V20 0000ffff78c87dc0 (f: 2026405376.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V21 0000ffff78c87db0 (f: 2026405248.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V22 0000ffff78c87da0 (f: 2026405248.000000, d: 1.390660e-309)
[2022-05-04T03:26:05.828Z] V23 00000000000000f0 (f: 240.000000, d: 1.185758e-321)
[2022-05-04T03:26:05.828Z] V24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-05-04T03:26:05.828Z] V30 000000003f800000 (f: 1065353216.000000, d: 5.263544e-315)
[2022-05-04T03:26:05.828Z] V31 0000000040c00000 (f: 1086324736.000000, d: 5.367157e-315)
[2022-05-04T03:26:05.828Z] Module=/home/jenkins/workspace/Test_openjdk8_j9_sanity.openjdk_aarch64_linux_testList_1/openjdkbinary/j2sdk-image/jre/lib/aarch64/default/libj9vm29.so
[2022-05-04T03:26:05.828Z] Module_base_address=0000FFFFB1A96000
[2022-05-04T03:26:05.828Z] Target=2_90_20220504_353 (Linux 4.15.0-166-generic)
[2022-05-04T03:26:05.828Z] CPU=aarch64 (8 logical CPUs) (0x1f25d6000 RAM)
[2022-05-04T03:26:05.828Z] ----------- Stack Backtrace -----------
[2022-05-04T03:26:05.828Z] protectedBacktrace+0x18 (0x0000FFFFB1A3E3E8 [libj9prt29.so+0x263e8])
[2022-05-04T03:26:05.828Z] ---------------------------------------
[2022-05-04T03:26:05.828Z] JVMDUMP039I Processing dump event "gpf", detail "" at 2022/05/03 23:25:55 - please wait.

[2022-05-04T03:27:39.845Z] jdk_lang_1_FAILED

50x grinder - job/Grinder/23473/ - all passed

A similar failure was reported a while ago - https://github.com/eclipse-openj9/openj9/issues/9272

knn-k commented 2 years ago

The location of the crash is somewhere in bytecodeLoopFull().

   98880:       91400821        add     x1, x1, #0x2, lsl #12
   98884:       9278de73        and     x19, x19, #0xffffffffffffff00
   98888:       394e2821        ldrb    w1, [x1, #906]
   9888c:       f8736814        ldr     x20, [x0, x19] <- This instruction
   98890:       f901c7b4        str     x20, [x29, #904]
   98894:       360735c1        tbz     w1, #0, 96f4c <bytecodeLoopFull+0x6a4>
Akira1Saitoh commented 2 years ago

The crash happened at java/lang/invoke/MethodHandle.<init>.

1XMCURTHDINFO  Current thread
3XMTHREADINFO      "MainThread" J9VMThread:0x0000FFFFAC3E7200, omrthread_t:0x0000FFFFAC35B220, java/lang/Thread:0x0000FFFF8C058958, state:R, prio=5
3XMJAVALTHREAD            (java/lang/Thread getId:0x18, isDaemon:false)
3XMJAVALTHRCCL            sun/misc/Launcher$AppClassLoader(0x0000FFFF8C0414E0)
3XMTHREADINFO1            (native thread ID:0x7DAF, native priority:0x5, native policy:UNKNOWN, vmstate:R, vm thread flags:0x00000020)
3XMTHREADINFO2            (native stack address range from:0x0000FFFF78C4A000, to:0x0000FFFF78C8A000, size:0x40000)
3XMCPUTIME               CPU usage total: 12.318895305 secs, current category="Application"
3XMHEAPALLOC             Heap bytes allocated since last GC cycle=7130208 (0x6CCC60)
3XMTHREADINFO3           Java callstack:
4XESTACKTRACE                at java/lang/invoke/MethodHandle.<init>(MethodHandle.java:223)
4XESTACKTRACE                at java/lang/invoke/PrimitiveHandle.<init>(PrimitiveHandle.java:60)
4XESTACKTRACE                at java/lang/invoke/DirectHandle.<init>(DirectHandle.java:80)
4XESTACKTRACE                at java/lang/invoke/ReceiverBoundHandle.<init>(ReceiverBoundHandle.java:49)
4XESTACKTRACE                at java/lang/invoke/MethodHandle.bindTo(MethodHandle.java:632)
4XESTACKTRACE                at java/lang/invoke/MethodHandles$Lookup.bind(MethodHandles.java:224(Compiled Code))
4XESTACKTRACE                at java/lang/invoke/IndirectHandle.bindTo(IndirectHandle.java:102(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/TestCase.<init>(CatchExceptionTest.java:393(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/TestCase.lambda$null$2(CatchExceptionTest.java:428(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/TestCase$$Lambda$10/0x0000000000000000.get(Bytecode PC:16(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/TestFactory.createTest(CatchExceptionTest.java:295(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/TestFactory.nextTest(CatchExceptionTest.java:259(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/CatchExceptionTest.lambda$test$0(CatchExceptionTest.java:106(Compiled Code))
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/CatchExceptionTest$$Lambda$14/0x0000000000000000.call(Bytecode PC:4(Compiled Code))
4XESTACKTRACE                at jdk/testlibrary/TimeLimitedRunner.call(TimeLimitedRunner.java:71)
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/CatchExceptionTest.test(CatchExceptionTest.java:116)
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/CatchExceptionTest$$Lambda$1/0x0000000000000000.run(Bytecode PC:0)
4XESTACKTRACE                at com/oracle/testlibrary/jsr292/CodeCacheOverflowProcessor$$Lambda$2/0x0000000000000000.run(Bytecode PC:6)
4XESTACKTRACE                at jdk/testlibrary/Utils.filterException(Utils.java:368)
4XESTACKTRACE                at com/oracle/testlibrary/jsr292/CodeCacheOverflowProcessor.runMHTest(CodeCacheOverflowProcessor.java:70)
4XESTACKTRACE                at test/java/lang/invoke/MethodHandles/CatchExceptionTest.main(CatchExceptionTest.java:95)
4XESTACKTRACE                at sun/reflect/NativeMethodAccessorImpl.invoke0(Native Method)
4XESTACKTRACE                at sun/reflect/NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
4XESTACKTRACE                at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
4XESTACKTRACE                at java/lang/reflect/Method.invoke(Method.java:498)
4XESTACKTRACE                at com/sun/javatest/regtest/agent/MainWrapper$MainThread.run(MainWrapper.java:127)
4XESTACKTRACE                at java/lang/Thread.run(Thread.java:822)
3XMTHREADINFO3           Native callstack:
4XENATIVESTACK               protectedBacktrace+0x18 (0x0000FFFFB1A3E3E8 [libj9prt29.so+0x263e8])

It seems that this object is at stack. Possibly, this stack allocated object somehow escaped?

<ffffac3e7200> *** BEGIN STACK WALK, flags = 00400001 walkThread = 0x0000FFFFAC3E7200 ***
<ffffac3e7200>  ITERATE_O_SLOTS
<ffffac3e7200>  RECORD_BYTECODE_PC_OFFSET
<ffffac3e7200> Initial values: walkSP = 0x0000FFFF14035700, PC = 0x0000FFFF414818B3, literals = 0x0000FFFFAC273498, A0 = 0x0000FFFF14035758, j2iFrame = 0x0000FFFF140358A0, ELS = 0x0000FFFF78C88100, decomp = 0x0000000000000000
<ffffac3e7200> Bytecode frame: bp = 0x0000FFFF14035728, sp = 0x0000FFFF14035700, pc = 0x0000FFFF414818B3, cp = 0x0000FFFFAC2728F0, arg0EA = 0x0000FFFF14035758, flags = 0x0000000000000000
<ffffac3e7200>  Method: java/lang/invoke/MethodHandle.<init>(Ljava/lang/invoke/MethodType;BLjava/lang/Object;)V !j9method 0x0000FFFFAC273498
<ffffac3e7200>  Bytecode index = 35
<ffffac3e7200>  Using local mapper
<ffffac3e7200>  Locals starting at 0x0000FFFF14035758 for 0x0000000000000006 slots
<ffffac3e7200>          O-Slot: a0[0x0000FFFF14035758] = 0x0000FFFF14035738   <—————— this
<ffffac3e7200>          I-Slot: a1[0x0000FFFF14035750] = 0x0000FFFF8C038AB0
<ffffac3e7200>          I-Slot: a2[0x0000FFFF14035748] = 0x0000000000000000
<ffffac3e7200>          I-Slot: a3[0x0000FFFF14035740] = 0x0000000000000000
<ffffac3e7200>          I-Slot: t4[0x0000FFFF14035738] = 0x0000000000000000
<ffffac3e7200>          I-Slot: t5[0x0000FFFF14035730] = 0x0000000000000000
<ffffac3e7200>  Pending stack starting at 0x0000FFFF14035710 for UDATA(0x0000000000000003) slots
<ffffac3e7200>          O-Slot: p0[0x0000FFFF14035710] = 0x0000FFFF14035738
<ffffac3e7200>          O-Slot: p1[0x0000FFFF14035708] = 0x0000FFFF14035738
<ffffac3e7200>          O-Slot: p2[0x0000FFFF14035700] = 0x0000000000000000
pshipton commented 2 years ago

Another one in https://github.com/eclipse-openj9/openj9/issues/15797

knn-k commented 2 years ago

I ran jdk_lang_1 with JDK 8 on AArch64 Linux 30 times, and got no failures. https://openj9-jenkins.osuosl.org/job/Grinder/1313/

pshipton commented 1 year ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_Nightly/539 jdk_lang_j9_0 java/lang/invoke/MethodHandles/CatchExceptionTest.java

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_Nightly/539/openjdk_test_output.tar.gz

21:44:56  Unhandled exception
21:44:56  Type=Segmentation error vmState=0x00000000
21:44:56  J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000001
21:44:56  Handler1=00007F3BCD57CDE0 Handler2=00007F3BCD2D8B00 InaccessibleAddress=00000000000001E8
21:44:56  RDI=00007F3B54DD0600 RSI=00007F3BC83AC700 RAX=00000000000001E8 RBX=00007F3B54DD0600
21:44:56  RCX=00007F3B54DD0630 RDX=00007F3B3C00BC50 R8=000000000005FD2F R9=0000000000000000
21:44:56  R10=00000000647A9AFF R11=0000000000000000 R12=0000000000000000 R13=00007F3BC82B6198
21:44:56  R14=00007F3B3C00BC10 R15=00007F3B55481B1B
21:44:56  RIP=00007F3BCD5ED494 GS=0000 FS=0000 RSP=00007F3B54DD0290
21:44:56  EFlags=0000000000010246 CS=0033 RBP=00007F3B54DD0870 ERR=0000000000000004
21:44:56  TRAPNO=000000000000000E OLDMASK=0000000000000000 CR2=00000000000001E8
21:44:56  xmm0 0000000000000004 (f: 4.000000, d: 1.976263e-323)
21:44:56  xmm1 00007f3ba1792720 (f: 2709071616.000000, d: 6.911686e-310)
21:44:56  xmm2 00007f3b54dd0630 (f: 1423771136.000000, d: 6.911623e-310)
21:44:56  xmm3 00007f3b8e9424fb (f: 2392073472.000000, d: 6.911671e-310)
21:44:56  xmm4 00007f3ba35f9570 (f: 2740950272.000000, d: 6.911688e-310)
21:44:56  xmm5 00007f3b554bf4f3 (f: 1431041280.000000, d: 6.911623e-310)
21:44:56  xmm6 00007f3ba35f9480 (f: 2740950016.000000, d: 6.911688e-310)
21:44:56  xmm7 00007f3ba35f94a0 (f: 2740950272.000000, d: 6.911688e-310)
21:44:56  xmm8 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  xmm9 00007f3ba1792720 (f: 2709071616.000000, d: 6.911686e-310)
21:44:56  xmm10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  xmm11 ffffffffffffffff (f: 4294967296.000000, d: -nan)
21:44:56  xmm12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  xmm13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  xmm14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  xmm15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
21:44:56  Module=/home/jenkins/workspace/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_Nightly/openjdkbinary/j2sdk-image/jre/lib/amd64/default/libj9vm29.so
21:44:56  Module_base_address=00007F3BCD53E000
21:44:56  Target=2_90_20230602_569 (Linux 3.10.0-1160.88.1.el7.x86_64)
21:44:56  CPU=amd64 (4 logical CPUs) (0x1e8cbe000 RAM)
21:44:56  ----------- Stack Backtrace -----------
21:44:56  _ZN26VM_BytecodeInterpreterFull3runEP10J9VMThread+0x8844 (0x00007F3BCD5ED494 [libj9vm29.so+0xaf494])
21:44:56  bytecodeLoopFull+0xc9 (0x00007F3BCD5E4C39 [libj9vm29.so+0xa6c39])
21:44:56   (0x00007F3BCD674FD2 [libj9vm29.so+0x136fd2])
21:44:56  ---------------------------------------
pshipton commented 1 year ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_Nightly_testList_1/33/ jdk_lang_1 java/lang/invoke/MethodHandles/CatchExceptionTest.java

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk8_j9_sanity.openjdk_x86-64_linux_Nightly_testList_1/33/openjdk_test_output.tar.gz

23:11:38  *** Invalid JIT return address 00007F9E00000000 in 00007F9E67351BB0
23:11:38  
23:11:38  03:09:35.896 0x7f9ec033d100    j9vm.249    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/Build_JDK8_x86-64_linux_Nightly/openj9/runtime/vm/swalk.c:1632: ((0 ))