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

[JDK11 OJDK-MH] openj9_jsr292Test_JitCount0_0 SegFault #14545

Closed babsingh closed 1 year ago

babsingh commented 2 years ago

The below failure(s) is(are) only seen when OJDK MHs are enabled in OpenJ9.

Errors

[2022-02-10T17:53:38.930Z] ... TestNG 6.14.2 by Cédric Beust (cedric@beust.com)
[2022-02-10T17:53:38.930Z] ...
[2022-02-10T17:53:38.930Z]
[2022-02-10T17:53:38.930Z] Unhandled exception
[2022-02-10T17:53:38.930Z] Type=Segmentation error vmState=0x00000000
[2022-02-10T17:53:38.930Z] J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000080
[2022-02-10T17:53:38.930Z] Handler1=00007FD93A8BFA40 Handler2=00007FD93A61CBF0 InaccessibleAddress=0000000000000000
[2022-02-10T17:53:38.930Z] RDI=00007FD93CB22520 RSI=0000000000016F00 RAX=0000000040000000 RBX=00007FD93CB22520
[2022-02-10T17:53:38.930Z] RCX=00007FD9340124C0 RDX=FFF6CE40FFF6CD80 R8=00000000000443C0 R9=00000000000F8368
[2022-02-10T17:53:38.930Z] R10=0000000000000014 R11=00000000FFF7C070 R12=00000000000F8360 R13=00000000FFF6CE20
[2022-02-10T17:53:38.931Z] R14=00000000000F8360 R15=00007FD93AA3A484
[2022-02-10T17:53:38.931Z] RIP=00007FD93A913419 GS=0000 FS=0000 RSP=00007FD93CB221C0
[2022-02-10T17:53:38.931Z] EFlags=0000000000010286 CS=0033 RBP=0000000000016F00 ERR=0000000000000000
[2022-02-10T17:53:38.931Z] TRAPNO=000000000000000D OLDMASK=0000000000000000 CR2=0000000000000000
[2022-02-10T17:53:38.931Z] xmm0 0000000000000005 (f: 5.000000, d: 2.470328e-323)
[2022-02-10T17:53:38.931Z] xmm1 002f002f002f002f (f: 3080239.000000, d: 8.622361e-308)
[2022-02-10T17:53:38.931Z] xmm2 50656d61532f6970 (f: 1395616128.000000, d: 1.984886e+79)
[2022-02-10T17:53:38.931Z] xmm3 2f396a2f6d62692f (f: 1835165952.000000, d: 3.349096e-81)
[2022-02-10T17:53:38.931Z] xmm4 2e000000bebafeca (f: 3199926016.000000, d: 4.021532e-87)
[2022-02-10T17:53:38.931Z] xmm5 00000000fff7b6a8 (f: 4294424320.000000, d: 2.121727e-314)
[2022-02-10T17:53:38.931Z] xmm6 000000003ea88fb1 (f: 1051234240.000000, d: 5.193787e-315)
[2022-02-10T17:53:38.931Z] xmm7 000000000000004f (f: 79.000000, d: 3.903119e-322)
[2022-02-10T17:53:38.931Z] xmm8 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] xmm9 000000003e17cee7 (f: 1041747712.000000, d: 5.146917e-315)
[2022-02-10T17:53:38.931Z] xmm10 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] xmm11 0000ff0000000000 (f: 0.000000, d: 1.385239e-309)
[2022-02-10T17:53:38.931Z] xmm12 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] xmm13 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] xmm14 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] xmm15 0000000000000000 (f: 0.000000, d: 0.000000e+00)
[2022-02-10T17:53:38.931Z] Module=/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/openjdkbinary/j2sdk-image/lib/default/libj9vm29.so
[2022-02-10T17:53:38.931Z] Module_base_address=00007FD93A880000
[2022-02-10T17:53:38.931Z] Target=2_90_20220210_3703 (Linux 3.10.0-1160.53.1.el7.x86_64)
[2022-02-10T17:53:38.931Z] CPU=amd64 (4 logical CPUs) (0x1e8d0d000 RAM)
[2022-02-10T17:53:38.931Z] ----------- Stack Backtrace -----------
[2022-02-10T17:53:38.931Z] (0x00007FD93A913419 [libj9vm29.so+0x93419])
[2022-02-10T17:53:38.931Z] (0x00007FD93A910EE5 [libj9vm29.so+0x90ee5])
[2022-02-10T17:53:38.931Z] (0x00007FD93A9AEEC2 [libj9vm29.so+0x12eec2])
[2022-02-10T17:53:38.931Z] ---------------------------------------
[2022-02-10T17:53:38.931Z] JVMDUMP039I Processing dump event "gpf", detail "" at 2022/02/10 09:53:38 - please wait.
[2022-02-10T17:53:38.931Z] JVMDUMP032I JVM requested System dump using '/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_j
sr292Test_JitCount0_0/core.20220210.095338.21922.0001.dmp' in response to an event
[2022-02-10T17:53:39.332Z] JVMDUMP010I System dump written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr292Test_
JitCount0_0/core.20220210.095338.21922.0001.dmp
[2022-02-10T17:53:39.332Z] JVMDUMP032I JVM requested Java dump using '/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr
292Test_JitCount0_0/javacore.20220210.095338.21922.0002.txt' in response to an event
[2022-02-10T17:53:39.332Z] JVMDUMP010I Java dump written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr292Test_Ji
tCount0_0/javacore.20220210.095338.21922.0002.txt
[2022-02-10T17:53:39.333Z] JVMDUMP032I JVM requested Snap dump using '/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr
292Test_JitCount0_0/Snap.20220210.095338.21922.0003.trc' in response to an event
[2022-02-10T17:53:39.333Z] JVMDUMP010I Snap dump written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr292Test_Ji
tCount0_0/Snap.20220210.095338.21922.0003.trc
[2022-02-10T17:53:39.333Z] JVMDUMP032I JVM requested JIT dump using '/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr2
92Test_JitCount0_0/jitdump.20220210.095338.21922.0004.dmp' in response to an event
[2022-02-10T17:53:39.333Z] JVMDUMP051I JIT dump occurred in 'main' thread 0x0000000000016F00
[2022-02-10T17:53:39.333Z] JVMDUMP010I JIT dump written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal_testList_0/aqa-tests/TKG/output_16445111065975/openj9_jsr292Test_Jit
Count0_0/jitdump.20220210.095338.21922.0004.dmp
[2022-02-10T17:53:39.333Z] JVMDUMP013I Processed dump event "gpf", detail "".

Failing Test Targets

How-to Run Tests?

https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md

Steps to build an OpenJ9 JDK11 with OJDK MHs enabled

Refer to https://github.com/eclipse-openj9/openj9/issues/14540.

ThanHenderson commented 1 year ago

I'm not sure if the tests have changed since this issue, but with the current infrastructure the failure occurs in test: jsr292_MethodHandleAPI_Test_JitCount1_0

babsingh commented 1 year ago

Hard to say ... my guess

openj9_jsr292Test_JitCount0 still exists in the test suite. This failure might have been fixed by one of the previous solutions. Now, we are probably seeing a different failure. https://github.com/eclipse-openj9/openj9/issues/13167 has documentation for a previous failure related jsr292_MethodHandleAPI_Test_JitCount1_0, which was fixed in JDK17+; there might be a relationship.

ThanHenderson commented 1 year ago

Testing openj9_jsr292Test_JitCount0_0 locally passes on master so maybe we can close this. But I will first test to see if it is intermittent.

ThanHenderson commented 1 year ago

Hard to say ... my guess

openj9_jsr292Test_JitCount0 still exists in the test suite. This failure might have been fixed by one of the previous solutions. Now, we are probably seeing a different failure. #13167 has documentation for a previous failure related jsr292_MethodHandleAPI_Test_JitCount1_0, which was fixed in JDK17+; there might be a relationship.

Could be. I'll open a new issue.

babsingh commented 1 year ago

But I will first test to see if it is intermittent.

True, the failure can also be intermittent. I would run the test ~250 times locally or in a grinder to confirm that the test is fixed. -Xjit:count=0 will force the JIT to compile the method before its first invocation. So, this failure might be related to the JIT. If you can confirm this ... by showing that the failure doesn't occur with -Xint (JIT disabled), then we can request the JIT team's assistance.

ThanHenderson commented 1 year ago

I've ran locally: make _testList TESTLIST=openj9_jsr292Test_JitCount0_0 TEST_ITERATIONS=1000 EXTRA_OPTIONS=-Xjit:count=0 and make _testList TESTLIST=openj9_jsr292Test_JitCount0_0 TEST_ITERATIONS=1000 EXTRA_OPTIONS=-Xint and both pass. It seem that this test failure is no longer an issue for OJDK MHs in JDK11.

babsingh commented 1 year ago

Closing as per https://github.com/eclipse-openj9/openj9/issues/14545#issuecomment-1766538941.