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

jdk_foreign_0_FAILED java/foreign/TestMemorySession.java Segmentation error vmState=0x00000000 #18091

Open JasonFengJ9 opened 1 year ago

JasonFengJ9 commented 1 year ago

Failure link

From an internal build(win16x64rt-1-3):

00:26:48  openjdk version "21-internal" 2023-09-19
00:26:48  OpenJDK Runtime Environment (build 21-internal-adhoc.jenkins.buildjdk21x86-64windowspersonal)
00:26:48  Eclipse OpenJ9 VM (build master-7599bde8a13, JRE 21 Windows Server 2016 amd64-64-Bit Compressed References 20230907_71 (JIT enabled, AOT enabled)
00:26:48  OpenJ9   - 7599bde8a13
00:26:48  OMR      - 873ac5d377a
00:26:48  JCL      - 154f45ddce4 based on jdk-21+35)

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

Optional info

Failure output (captured from console output)

02:50:15  variation: Mode150
02:50:15  JVM_OPTIONS:  -XX:+UseCompressedOops 

03:21:09  TEST: java/foreign/TestMemorySession.java

03:21:09  STDERR:
03:21:09  Unhandled exception
03:21:09  Type=Segmentation error vmState=0x00000000
03:21:09  Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00007FFEF16107EF ContextFlags=0010005f
03:21:09  Handler1=00007FFEF17CB070 Handler2=00007FFEF16AAB90 InaccessibleReadAddress=0000000000000030
03:21:09  RDI=0000000000000010 RSI=00007FFEF18F5040 RAX=0000000000000000 RBX=000001777EB395C8
03:21:09  RCX=000000006D76396A RDX=00007FFEF18F8D48 R8=0000000000000004 R9=00007FFEF82F142A
03:21:09  R10=00007FFEF82F0000 R11=0000000000000246 R12=0000000000000010 R13=0000000000000000
03:21:09  R14=000001777EB395C0 R15=00000000003E05E0
03:21:09  RIP=00007FFEF16107EF RSP=0000003CEBBFEF30 RBP=0000003CEBBFEFB9 EFLAGS=0000000000010212
03:21:09  FS=0053 ES=002B DS=002B
03:21:09  XMM0 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM1 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM2 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM3 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM4 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM5 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM6 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM7 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM8 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM9 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  XMM15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
03:21:09  Module=C:\Users\jenkins\workspace\Test_openjdk21_j9_sanity.openjdk_x86-64_windows_Personal_testList_0\openjdkbinary\j2sdk-image\bin\default\j9trc29.dll
03:21:09  Module_base_address=00007FFEF1600000 Offset_in_DLL=00000000000107ef
03:21:09  Target=2_90_20230907_71 (Windows Server 2016 10.0 build 14393)
03:21:09  CPU=amd64 (8 logical CPUs) (0x3fff78000 RAM)
03:21:09  ----------- Stack Backtrace -----------
03:21:09  JVM_OnUnload+0x775f (0x00007FFEF16107EF [j9trc29+0x107ef])
03:21:09  JVM_OnUnload+0x7f1f (0x00007FFEF1610FAF [j9trc29+0x10faf])
03:21:09  JVM_OnUnload+0x3ac9 (0x00007FFEF160CB59 [j9trc29+0xcb59])
03:21:09  JVM_OnUnload+0x1571 (0x00007FFEF160A601 [j9trc29+0xa601])
03:21:09  J9_GetInterface+0x394f5 (0x00007FFEF1811EB5 [j9vm29+0x111eb5])
03:21:09  Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0+0xec (0x00007FFEF0C0E82C [jclse29+0x4e82c])
03:21:09  (0x00007FFED9C0EE02)
03:21:09  (0x000000000007B001)
03:21:09  (0x00000000FFDF3460)
03:21:09  (0x000000000000000A)
03:21:09  (0x00000502F1610000)
03:21:09  (0x00000000003E42E0)
03:21:09  (0x00000000003E3800)
03:21:09  (0x000001776B00AB80)
03:21:09  (0x000001775FC50003)
03:21:09  (0x000001776B009514)
03:21:09  (0x0000000000000003)
03:21:09  (0x00000000003E3800)
03:21:09  (0x0000003CEBBFF6F0)
03:21:09  (0x0000000000000011)
03:21:09  (0x00000000FFDF3460)
03:21:09  ---------------------------------------
03:21:09  JVMDUMP039I Processing dump event "gpf", detail "" at 2023/09/06 23:52:34 - please wait.

03:21:09  Test results: passed: 80; error: 1
03:21:38  Report written to C:\Users\jenkins\workspace\Test_openjdk21_j9_sanity.openjdk_x86-64_windows_Personal_testList_0\aqa-tests\TKG\output_16940618147895\jdk_foreign_0\report\html\report.html
03:21:38  Results written to C:\Users\jenkins\workspace\Test_openjdk21_j9_sanity.openjdk_x86-64_windows_Personal_testList_0\aqa-tests\TKG\output_16940618147895\jdk_foreign_0\work
03:21:38  Error: Some tests failed or other problems occurred.
03:21:38  -----------------------------------
03:21:38  jdk_foreign_0_FAILED

50x jdk_foreign_0 internal grinder - all passed

tajila commented 1 year ago

@JasonFengJ9 have you been able to reproduce this?

JasonFengJ9 commented 1 year ago

@tajila No, the 50x grinder in the issue description all passed.

ChengJin01 commented 1 year ago

Based on the stacktrace above,

03:21:09  Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0+0xec (0x00007FFEF0C0E82C [jclse29+0x4e82c])

which is related to the code at https://github.com/eclipse-openj9/openj9/blob/333d6c258fb2072dc2ddc6b51c5047111ee9e0bb/runtime/jcl/common/jdk_internal_misc_ScopedMemoryAccess.cpp#L74.

FYI: @babsingh

tajila commented 1 year ago

We have no diagnostics for this at the moment. And it doesn't seem very reproduceable.

tajila commented 1 year ago

Removing this from the milestone. If this issue reproduces again we can add it back in.

pshipton commented 1 year ago

I've just removed any milestone, unless it's seen again.

pshipton commented 6 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64le_linux_Release_testList_2/6 - cent8-ppcle-4 jdk_foreign_0 java/foreign/TestMemorySession.java

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk22_j9_sanity.openjdk_ppc64le_linux_Release_testList_2/6/openjdk_test_output.tar.gz

12:00:03  Type=Segmentation error vmState=0x00000000
12:00:03  J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
12:00:03  Handler1=00007FFF9DC61650 Handler2=00007FFF9DB897C0
12:00:03  R0=00007FFF9D4B3A94 R1=00007FFF5E93AF10 R2=00007FFF9D4F7D00 R3=00007FFF9DBA20A8
12:00:03  R4=00000000FBE1FFF8 R5=000000007BE10000 R6=00007FFF980E84C0 R7=0000000000002000
12:00:03  R8=0000000000007FFF R9=00000000FBE1FFF8 R10=0000000000000000 R11=00007FFF5E93AFB0
12:00:03  R12=00007FFF9E50B864 R13=00007FFF5E9468E0 R14=00007FFF9E351F90 R15=0000000000000000
12:00:03  R16=00007FFF9DEA09B0 R17=0000000000000000 R18=0000000000000000 R19=0000000000000004
12:00:03  R20=00007FFF9E351F90 R21=0000000000000004 R22=0000000000007FFF R23=00007FFF9E359FF8
12:00:03  R24=000000000002AA02 R25=00007FFF9D4F1AA8 R26=00007FFF9DF03800 R27=0000000000000000
12:00:03  R28=000000000003AB02 R29=00007FFF9DBA20A8 R30=00007FFF9DBA2080 R31=00000000FBE1FFF8
12:00:03  NIP=00007FFF9D4CBBA0 MSR=800000000280F033 ORIG_GPR3=00007FFF9D4C799C CTR=00007FFF9E740554
12:00:03  LINK=00007FFF9D4C79A0 XER=0000000000000000 CCR=0000000024024888 SOFTE=0000000000000001
12:00:03  TRAP=0000000000000300 DAR=00007FFF9DBA20A8 dsisr=000000000A000000 RESULT=0000000000000000
12:00:03  FPR0 0000000000000004 (f: 4.000000, d: 1.976263e-323)
12:00:03  FPR1 4052142c60000000 (f: 1610612736.000000, d: 7.231521e+01)
12:00:03  FPR2 41d0000000000000 (f: 0.000000, d: 1.073742e+09)
12:00:03  FPR3 4010000000000000 (f: 0.000000, d: 4.000000e+00)
12:00:03  FPR4 3fe8000000000000 (f: 0.000000, d: 7.500000e-01)
12:00:03  FPR5 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR6 3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
12:00:03  FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR8 bfdffffef20a4123 (f: 4060758272.000000, d: -4.999997e-01)
12:00:03  FPR9 bfd00ea348b88334 (f: 1220051712.000000, d: -2.508934e-01)
12:00:03  FPR10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR13 00000000002b0e00 (f: 2821632.000000, d: 1.394071e-317)
12:00:03  FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
12:00:03  Module=/home/jenkins/workspace/Test_openjdk22_j9_sanity.openjdk_ppc64le_linux_Release_testList_2/jdkbinary/j2sdk-image/lib/default/libj9trc29.so
12:00:03  Module_base_address=00007FFF9D4A0000
12:00:03  Target=2_90_20240331_6 (Linux 4.18.0-535.el8.ppc64le)
12:00:03  CPU=ppc64le (4 logical CPUs) (0x1dbbc0000 RAM)
12:00:03  ----------- Stack Backtrace -----------
12:00:03  compareAndSwapU32+0x10 (0x00007FFF9D4CBBA0 [libj9trc29.so+0x2bba0])
12:00:03  freeBuffers+0x54 (0x00007FFF9D4B3A94 [libj9trc29.so+0x13a94])
12:00:03  traceV+0x1bc (0x00007FFF9D4B4C5C [libj9trc29.so+0x14c5c])
12:00:03  doTracePoint+0x8ac (0x00007FFF9D4B6B6C [libj9trc29.so+0x16b6c])
12:00:03  javaTrace+0x4c (0x00007FFF9D4AC9BC [libj9trc29.so+0xc9bc])
12:00:03  walkStackFrames+0xb8 (0x00007FFF9DCBC778 [libj9vm29.so+0x9c778])
12:00:03  Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0+0xe8 (0x00007FFF97E16E58 [libjclse29.so+0x76e58])
12:00:03   (0x00007FFF7DF36A94 [<unknown>+0x0])
12:00:03  runJavaThread+0x250 (0x00007FFF9DC38040 [libj9vm29.so+0x18040])
12:00:03  javaProtectedThreadProc+0xc8 (0x00007FFF9DCD79C8 [libj9vm29.so+0xb79c8])
12:00:03  omrsig_protect+0x3e4 (0x00007FFF9DB8AC74 [libj9prt29.so+0x3ac74])
12:00:03  javaThreadProc+0x60 (0x00007FFF9DCD3120 [libj9vm29.so+0xb3120])
12:00:03  thread_wrapper+0x190 (0x00007FFF9DB1D820 [libj9thr29.so+0xd820])
12:00:03  start_thread+0xf8 (0x00007FFF9E669678 [libpthread-2.28.so+0x9678])
12:00:03  clone+0x74 (0x00007FFF9E558968 [libc-2.28.so+0x138968])
12:00:03  ---------------------------------------
ChengJin01 commented 6 months ago

@babsingh, is the crash related to the recent changes with ScopedMemoryAccess at https://github.com/eclipse-openj9/openj9/pull/19167?

babsingh commented 6 months ago

re https://github.com/eclipse-openj9/openj9/issues/18091#issuecomment-2029874038:

It seems like an infra/machine issue. jdk_foreign_0 started at 11.30 pm. TestMemorySession didn't start till 12.00 am. While TestMemorySession was running, the test scripts triggered the timeout scripts and signalled the java process to terminate. Only 30 milliseconds had passed since TestMemorySession began execution. The shutdown handlers were invoked which freed the trace buffers. Freeing the trace buffers resulted in the crash in ScopedMemoryAccess_closeScope0. There is no hang, otherwise the crash in ScopedMemoryAccess_closeScope0 won't have occurred. The infra machine might not have sufficient resources due to which the test execution was slow and led to a timeout.

@ChengJin01 @tajila This is not a blocker for Java 22, and it doesn't look similar to the original failure reported in the issue.

pshipton commented 6 months ago

Another crash in a grinder for https://github.com/eclipse-openj9/openj9/issues/19266

https://openj9-jenkins.osuosl.org/job/Grinder_iteration_0/468/ - cent8-ppcle-5 jdk_foreign_1

https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Grinder_iteration_0/468/openjdk_test_output.tar.gz

10:45:25  Unhandled exception
10:45:25  Type=Segmentation error vmState=0x00000000
10:45:25  J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
10:45:25  Handler1=00007FFFB0E81550 Handler2=00007FFFB0DA9820
10:45:25  R0=00007FFFB06D3A94 R1=00007FFF69AFAF00 R2=00007FFFB0717D00 R3=00007FFFB0DC2108
10:45:25  R4=00000000FBE1FFF8 R5=000000007BE10000 R6=00007FFFAC0EDA80 R7=0000000000002000
10:45:25  R8=0000000000007FFF R9=00000000FBE1FFF8 R10=0000000000000000 R11=00007FFF69AFAFA0
10:45:25  R12=00007FFFB172B864 R13=00007FFF69B068E0 R14=00007FFFB1571F90 R15=0000000000000000
10:45:25  R16=00007FFFB10BA1B0 R17=0000000000000000 R18=0000000000000000 R19=0000000000000004
10:45:25  R20=00007FFFB1571F90 R21=0000000000000004 R22=0000000000007FFF R23=00007FFFB1579FF8
10:45:25  R24=000000000002AA02 R25=00007FFFB0711AA8 R26=00007FFFB1123818 R27=0000000000000000
10:45:25  R28=000000000003AB02 R29=00007FFFB0DC2108 R30=00007FFFB0DC20E0 R31=00000000FBE1FFF8
10:45:25  NIP=00007FFFB06EBBA0 MSR=800000000280F033 ORIG_GPR3=00007FFFB06E799C CTR=00007FFFB1960554
10:45:25  LINK=00007FFFB06E79A0 XER=0000000000000000 CCR=0000000024884884 SOFTE=0000000000000001
10:45:25  TRAP=0000000000000300 DAR=00007FFFB0DC2108 dsisr=000000000A000000 RESULT=0000000000000000
10:45:25  FPR0 0000000000000004 (f: 4.000000, d: 1.976263e-323)
10:45:25  FPR1 40516fa540000000 (f: 1073741824.000000, d: 6.974446e+01)
10:45:25  FPR2 41d0000000000000 (f: 0.000000, d: 1.073742e+09)
10:45:25  FPR3 4010000000000000 (f: 0.000000, d: 4.000000e+00)
10:45:25  FPR4 3fe8000000000000 (f: 0.000000, d: 7.500000e-01)
10:45:25  FPR5 bfe7154748bef6c8 (f: 1220474624.000000, d: -7.213475e-01)
10:45:25  FPR6 3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
10:45:25  FPR7 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR8 322d646165726854 (f: 1701996672.000000, d: 5.451070e-67)
10:45:25  FPR9 bfd00ea348b88334 (f: 1220051712.000000, d: -2.508934e-01)
10:45:25  FPR10 0000004400000000 (f: 0.000000, d: 1.442957e-312)
10:45:25  FPR11 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR12 0000000000000044 (f: 68.000000, d: 3.359646e-322)
10:45:25  FPR13 00007fffac4c2000 (f: 2890670080.000000, d: 6.953286e-310)
10:45:25  FPR14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR16 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR17 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR18 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR19 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR20 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR21 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR22 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR23 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR24 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR25 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR26 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR27 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR28 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR29 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR30 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  FPR31 0000000000000000 (f: 0.000000, d: 0.000000e+00)
10:45:25  Module=/home/jenkins/workspace/Grinder_iteration_0/jdkbinary/j2sdk-image/lib/default/libj9trc29.so
10:45:25  Module_base_address=00007FFFB06C0000
10:45:25  Target=2_90_20240402_209 (Linux 4.18.0-535.el8.ppc64le)
10:45:25  CPU=ppc64le (4 logical CPUs) (0x1dbbc0000 RAM)
10:45:25  ----------- Stack Backtrace -----------
10:45:25  compareAndSwapU32+0x10 (0x00007FFFB06EBBA0 [libj9trc29.so+0x2bba0])
10:45:25  freeBuffers+0x54 (0x00007FFFB06D3A94 [libj9trc29.so+0x13a94])
10:45:25  traceV+0x1bc (0x00007FFFB06D4C5C [libj9trc29.so+0x14c5c])
10:45:25  doTracePoint+0x8ac (0x00007FFFB06D6B6C [libj9trc29.so+0x16b6c])
10:45:25  javaTrace+0x4c (0x00007FFFB06CC9BC [libj9trc29.so+0xc9bc])
10:45:25  walkStackFrames+0xb8 (0x00007FFFB0EDC218 [libj9vm29.so+0x9c218])
10:45:25  hasMemoryScope+0x74 (0x00007FFFB0E521A4 [libj9vm29.so+0x121a4])
10:45:25  Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0+0xac (0x00007FFFAAFD6D1C [libjclse29.so+0x76d1c])
10:45:25   (0x00007FFF70DF8DFC [<unknown>+0x0])
10:45:25  runJavaThread+0x250 (0x00007FFFB0E57F80 [libj9vm29.so+0x17f80])
10:45:25  javaProtectedThreadProc+0xc8 (0x00007FFFB0EF7528 [libj9vm29.so+0xb7528])
10:45:25  omrsig_protect+0x3e4 (0x00007FFFB0DAACD4 [libj9prt29.so+0x3acd4])
10:45:25  javaThreadProc+0x60 (0x00007FFFB0EF2C80 [libj9vm29.so+0xb2c80])
10:45:25  thread_wrapper+0x190 (0x00007FFFB0D3D820 [libj9thr29.so+0xd820])
10:45:25  start_thread+0xf8 (0x00007FFFB1889678 [libpthread-2.28.so+0x9678])
10:45:25  clone+0x74 (0x00007FFFB1778968 [libc-2.28.so+0x138968])
babsingh commented 6 months ago

The recent failure has the same symptoms as https://github.com/eclipse-openj9/openj9/issues/18091#issuecomment-2030529739. 81 tests are run under jdk_foreign; there are insufficient details to identify the slow test. I can add a shutdown check in ScopedMemoryAccess_closeScope0, which will exit the stack walk and prevent the crash.

JasonFengJ9 commented 3 weeks ago

JDK17 x86-64_windows(win10x86-svl-rt3-1)

[2024-09-07T22:23:40.416Z] variation: Mode650
[2024-09-07T22:23:40.893Z] JVM_OPTIONS:  -XX:-UseCompressedOops -Xverbosegclog 

[2024-09-07T23:05:20.939Z] TEST: java/foreign/TestSegmentAllocators.java

[2024-09-07T23:05:20.940Z] Timeout signalled after 960 seconds
[2024-09-07T23:05:20.940Z] STDERR:
[2024-09-07T23:05:20.940Z] WARNING: Using incubator modules: jdk.incubator.foreign
[2024-09-07T23:05:20.940Z] Unhandled exception
[2024-09-07T23:05:20.940Z] Type=Segmentation error vmState=0x00000000
[2024-09-07T23:05:20.940Z] Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00007FF84EF70761 ContextFlags=0010005f
[2024-09-07T23:05:20.940Z] Handler1=00007FF84836CF30 Handler2=00007FF84F00AC60 InaccessibleReadAddress=0000000000000030
[2024-09-07T23:05:20.940Z] RDI=0000000000000010 RSI=00007FF84848D500 RAX=0000000000000000 RBX=000001357A3EF21F
[2024-09-07T23:05:20.940Z] RCX=000000006D76396A RDX=00007FF8484900C8 R8=0000000000000004 R9=00007FF85329131A
[2024-09-07T23:05:20.940Z] R10=00007FF853280000 R11=0000000000000246 R12=0000000000000010 R13=0000000000000000
[2024-09-07T23:05:20.940Z] R14=000001357A3EF217 R15=000001357A401AA8
[2024-09-07T23:05:20.940Z] RIP=00007FF84EF70761 RSP=00000022E747E8D0 RBP=00000022E747E959 EFLAGS=0000000000010212
[2024-09-07T23:05:20.940Z] FS=0053 ES=002B DS=002B
[2024-09-07T23:05:20.940Z] XMM0=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM1=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM4=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM6=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM8=4045000000000000 (f: 0.000000, d: 4.200000e+01)
[2024-09-07T23:05:20.940Z] XMM9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] XMM15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2024-09-07T23:05:20.940Z] Module=C:\Users\jenkins\workspace\Test_openjdk17_j9_sanity.openjdk_x86-64_windows_testList_2\jdkbinary\j2sdk-image\bin\default\j9trc29.dll
[2024-09-07T23:05:20.940Z] Module_base_address=00007FF84EF60000 Offset_in_DLL=0000000000010761
[2024-09-07T23:05:20.940Z] Target=2_90_20240907_759 (Windows 10 10.0 build 19045)
[2024-09-07T23:05:20.940Z] CPU=amd64 (4 logical CPUs) (0x1fff78000 RAM)
[2024-09-07T23:05:20.940Z] ----------- Stack Backtrace -----------
[2024-09-07T23:05:20.940Z] JVM_OnUnload+0x7761 (0x00007FF84EF70761 [j9trc29+0x10761])
[2024-09-07T23:05:20.940Z] JVM_OnUnload+0x7f0d (0x00007FF84EF70F0D [j9trc29+0x10f0d])
[2024-09-07T23:05:20.940Z] JVM_OnUnload+0x3a69 (0x00007FF84EF6CA69 [j9trc29+0xca69])
[2024-09-07T23:05:20.940Z] JVM_OnUnload+0x1571 (0x00007FF84EF6A571 [j9trc29+0xa571])
[2024-09-07T23:05:20.940Z] J9_GetInterface+0x39175 (0x00007FF8483B39D5 [j9vm29+0x1139d5])
[2024-09-07T23:05:20.940Z] (0x00007FF848342BDB [j9vm29+0xa2bdb])
[2024-09-07T23:05:20.940Z] Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0+0x7c (0x00007FF84858F77C [jclse29+0x4f77c])
[2024-09-07T23:05:20.940Z] (0x00007FF829652035)
[2024-09-07T23:05:20.940Z] (0x00007FF41CE1D688)
[2024-09-07T23:05:20.940Z] (0x00007FF8292032EF)
[2024-09-07T23:05:20.940Z] (0x00000022E747F0A0)
[2024-09-07T23:05:20.940Z] ---------------------------------------
[2024-09-07T23:05:20.940Z] JVMDUMP039I Processing dump event "gpf", detail "" at 2024/09/07 15:37:06 - please wait.

[2024-09-07T23:05:20.940Z] TEST RESULT: Error. Program `C:\Users\jenkins\workspace\Test_openjdk17_j9_sanity.openjdk_x86-64_windows_testList_2\jdkbinary\j2sdk-image\bin\java' timed out (timeout set to 960000ms, elapsed time including timeout handling was 1718322ms).
[2024-09-07T23:05:20.940Z] --------------------------------------------------
[2024-09-07T23:05:20.940Z] Test results: passed: 65; error: 1
[2024-09-07T23:06:20.840Z] Report written to C:\Users\jenkins\workspace\Test_openjdk17_j9_sanity.openjdk_x86-64_windows_testList_2\aqa-tests\TKG\output_17257351681932\jdk_foreign_1\report\html\report.html
[2024-09-07T23:06:20.840Z] Results written to C:\Users\jenkins\workspace\Test_openjdk17_j9_sanity.openjdk_x86-64_windows_testList_2\aqa-tests\TKG\output_17257351681932\jdk_foreign_1\work
[2024-09-07T23:06:20.840Z] Error: Some tests failed or other problems occurred.
[2024-09-07T23:06:20.840Z] -----------------------------------
[2024-09-07T23:06:20.840Z] jdk_foreign_1_FAILED

50x grinder - passed

babsingh commented 2 weeks ago

The failure occurred in j9trc29.dll, but the stack trace does not align with the library where the issue was triggered. This is a known problem on Windows, where incorrect stack traces can sometimes be reported.

The symptoms resemble those described in https://github.com/eclipse-openj9/openj9/issues/18091#issuecomment-2037612025. The recent crash was caused by a timeout on a slow Windows machine. If this failure becomes more frequent, we could consider adding a shutdown check in ScopedMemoryAccess_closeScope0, which would terminate the stack walk and prevent the crash.

For now, I will refrain from taking any action, as the issue did not reproduce in the last grinder run.