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

Assertion failure at omr/compiler/compile/OMRCompilation.cpp:2010 with PROD_WITH_ASSUMES #17649

Open knn-k opened 1 year ago

knn-k commented 1 year ago

Assertion failure in running extended.functional with Java 17 for AArch64 macOS with PROD_WITH_ASSUMES:

[2023-06-19T06:07:15.395Z] ===============================================
[2023-06-19T06:07:15.395Z] Running test cmdLineTester_fieldwatchtests_0 ...
[2023-06-19T06:07:15.395Z] ===============================================

[2023-06-19T06:07:32.048Z]  [ERR] Assertion failed at /Users/jenkins/workspace/Build_JDK17_aarch64_mac_Personal/omr/compiler/compile/OMRCompilation.cpp:2010: 0
[2023-06-19T06:07:32.048Z]  [ERR] VMState: 0x00050080
[2023-06-19T06:07:32.048Z]  [ERR]   node (n338n) 0x123821960 is rdbar but not anchored
[2023-06-19T06:07:32.048Z]  [ERR] 
[2023-06-19T06:07:32.048Z]  [ERR] compiling java/lang/String.charAt(I)C at level: cold

Link to the Grinder job

knn-k commented 1 year ago

Changing the TR_ASSERT() to TR_ASSERT_FATAL_WITH_NODE() on AArch64 Linux shows the following:

 [ERR] Assertion failed at /home/ubuntu/openj9/openj9-openjdk-jdk11/omr/compiler/compile/OMRCompilation.cpp:2010: 0
 [ERR] VMState: 0x00050080
 [ERR]  Node 0xffff60874140 [ardbar]: node (n312n) 0xffff60874140 is rdbar but not anchored
 [ERR]
 [ERR] compiling java/lang/String.indexOf(II)I at level: cold

 [ERR] Node context:
 [ERR]
 [ERR] ...
 [ERR] n311n     astore  <temp slot 7>[#381  Auto] (obj1) [flags 0x20000007 0x0 ] (X!=0 privatizedInlinerArg )  [    0xffff608740f0] bci=[-1,72,2002] rc=0 vc=273 vn=- li=-1 udi=- nc=1 flg=0x2004
 [ERR] n312n       ardbar  java/lang/String.helpers Lcom/ibm/jit/JITHelpers;[#360  final Static] (obj1) [flags 0xa0307 0x0 ]  [    0xffff60874140] bci=[-1,72,2002] rc=1 vc=273 vn=- li=-1 udi=- nc=1
 [ERR] n313n         loadaddr  java/lang/String[#358  Static] [flags 0x18307 0x0 ]                   [    0xffff60874190] bci=[-1,72,2002] rc=1 vc=273 vn=- li=-1 udi=- nc=0
 [ERR] ...

 [ERR] _ZN2TR4trapEv+0x4c (0x0000FFFF7B9C71A0 [libj9jit29.so+0x5271a0])
 [ERR] _ZN2TR27fatal_assertion_with_detailERKNS_16AssertionContextEPKciS4_S4_z+0x9c (0x0000FFFF7B9C72AC [libj9jit29.so+0x5272ac])
 [ERR] _ZN3OMR11Compilation24verifyAndFixRdbarAnchorsEv+0x1e8 (0x0000FFFF7B9802B8 [libj9jit29.so+0x4e02b8])
 [ERR] _ZN3OMR11Compilation7compileEv+0x12b8 (0x0000FFFF7B9840D8 [libj9jit29.so+0x4e40d8])
 [ERR] _ZN2TR28CompilationInfoPerThreadBase7compileEP10J9VMThreadPNS_11CompilationEP17TR_ResolvedMethodR11TR_J9VMBaseP19TR_OptimizationPlanRKNS_16SegmentAllocatorE+0x408 (0x0000FFFF7B5D7F2C [libj9jit29.so+0x137f2c])
 [ERR] _ZN2TR28CompilationInfoPerThreadBase14wrappedCompileEP13J9PortLibraryPv+0x2c8 (0x0000FFFF7B5D8D58 [libj9jit29.so+0x138d58])
knn-k commented 1 year ago

I reproduced the assertion failure on x86-64 Linux by running extended.functional:

[2023-06-26T00:41:24.274Z]  [ERR] Assertion failed at /home/jenkins/workspace/Build_JDK11_x86-64_linux_Personal/omr/compiler/compile/OMRCompilation.cpp:2010: 0
[2023-06-26T00:41:24.274Z]  [ERR] VMState: 0x00050080
[2023-06-26T00:41:24.274Z]  [ERR]   Node 0x7faae452b860 [irdbari]: node (n642n) 0x7faae452b860 is rdbar but not anchored
[2023-06-26T00:41:24.274Z]  [ERR] 
[2023-06-26T00:41:24.274Z]  [ERR] compiling java/lang/StringBuilder.append(C)Ljava/lang/StringBuilder; at level: warm

[2023-06-26T00:41:24.275Z]  [ERR] Node context:
[2023-06-26T00:41:24.275Z]  [ERR] 
[2023-06-26T00:41:24.275Z]  [ERR] ...
[2023-06-26T00:41:24.275Z]  [ERR] n640n     istore  <temp slot 5>[#502  Auto] [flags 0x20000003 0x0 ] (privatizedInlinerArg )   [0x7faae452b7c0] bci=[0,6,748] rc=0 vc=1837 vn=- li=- udi=55 nc=1 flg=0x2000
[2023-06-26T00:41:24.275Z]  [ERR] n641n       isub                                                                              [0x7faae452b810] bci=[0,6,748] rc=1 vc=1837 vn=- li=- udi=- nc=2
[2023-06-26T00:41:24.275Z]  [ERR] n642n         irdbari  java/lang/AbstractStringBuilder.count I[#446  Shadow +16] [flags 0x603 0x0 ] (cannotOverflow )  [0x7faae452b860] bci=[0,2,748] rc=1 vc=1837 vn=- li=- udi=- nc=1 flg=0x1000
[2023-06-26T00:41:24.275Z]  [ERR] n1686n          ==>aRegLoad
[2023-06-26T00:41:24.275Z]  [ERR] n644n         iconst -1 (X!=0 X<=0 )                                                          [0x7faae452b900] bci=[0,5,748] rc=1 vc=1837 vn=- li=- udi=- nc=0 flg=0x204
[2023-06-26T00:41:24.275Z]  [ERR] ...

Link to the Grinder job