Closed dylanjtuttle closed 1 year ago
@knn-k : FYI
I changed the TR_ASSERT()
in isMethodPointerConstant()
to TR_ASSERT_FATAL()
locally, and reproduced the failure in building Java 11.
Method_being_compiled=java/util/stream/Collectors.lambda$partitioningBy$62(Ljava/util/function/BiConsumer;Ljava/util/function/Predicate;Ljava/util/stream/Collectors$Partition;Ljava/lang/Object;)V
Method_being_compiled=java/util/Comparator.lambda$comparing$77a9974f$1(Ljava/util/function/Function;Ljava/lang/Object;Ljava/lang/Object;)I
Method_being_compiled=jdk/tools/jlink/internal/plugins/OrderResourcesPlugin.getOrdinal(Ljdk/tools/jlink/plugin/ResourcePoolEntry;)I
Assertion failed at /home/ubuntu/openj9/openj9-openjdk-jdk11/omr/compiler/il/OMRNode.cpp:7006: (self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi)
VMState: 0x0005ff04
Can only call this for aconst or iaload
All of these assertion failures show the following backtrace with VMcheckcastEvaluator()
. isClassUnloadingConst()
in the backtrace calls isMethodPointerConstant()
.
_ZN2TR4trapEv+0x4c (0x0000FFFFB12969A0 [libj9jit29.so+0x4369a0])
(0x0000FFFFB1296A0C [libj9jit29.so+0x436a0c])
_ZN3OMR4Node21isClassUnloadingConstEv+0x0 (0x0000FFFFB128E810 [libj9jit29.so+0x42e810])
_Z28loadAddressConstantInSnippetPN2TR13CodeGeneratorEPNS_4NodeElPNS_8RegisterE31TR_ExternalRelocationTargetKindbPNS_11InstructionE+0x80 (0x0000FFFFB15ED020 [libj9jit29.so+0x78d020])
_ZL42genInstanceOfOrCheckCastArbitraryClassTestPN2TR4NodeEPNS_8RegisterEP19TR_OpaqueClassBlockP30TR_ARM64ScratchRegisterManagerPNS_13CodeGeneratorE+0xf4 (0x0000FFFFB11F08A4 [libj9jit29.so+0x3908a4])
_ZN2J95ARM6413TreeEvaluator20VMcheckcastEvaluatorEPN2TR4NodeEPNS2_13CodeGeneratorE+0x608 (0x0000FFFFB11FEE1C [libj9jit29.so+0x39ee1c])
_ZN3OMR13CodeGenerator8evaluateEPN2TR4NodeE+0x50 (0x0000FFFFB1220820 [libj9jit29.so+0x3c0820])
_ZN2J913CodeGenerator22doInstructionSelectionEv+0x964 (0x0000FFFFB0F3B864 [libj9jit29.so+0xdb864])
_ZN3OMR12CodeGenPhase32performInstructionSelectionPhaseEPN2TR13CodeGeneratorEPNS1_12CodeGenPhaseE+0x70 (0x0000FFFFB122E4E0 [libj9jit29.so+0x3ce4e0])
@Akira1Saitoh FYI.
A checkcast
node is passed to isMethodPointerConstant()
. The following output is from TR_ASSERT_FATAL_WITH_NODE()
.
Assertion failed at /home/ubuntu/openj9/openj9-openjdk-jdk11/omr/compiler/il/OMRNode.cpp:7006: (self()->getOpCodeValue() ==
TR::aconst)||(self()->getOpCodeValue() == TR::aloadi)
VMState: 0x0005ff04
Node 0xffffb049f690 [checkcast]: Can only call this for aconst or iaload 0xffffb049f690
Node context:
...
n73n checkcast [#86] [ 0xffffb049f690] bci=[0,1,-] rc=0 vc=232 vn=- li=21 udi=- nc=2
n71n aload t<parm 3 Ljava/lang/Object;>[#352 Parm] [flags 0xc0000107 0x0 ] [ 0xffffb049f5f0] bci=[0,0,-] rc=2 vc=232 vn=- li=21 udi=10816 nc=0
n72n loadaddr jdk/tools/jlink/internal/Archive$Entry[#363 Static] [flags 0x18307 0x0 ] [ 0xffffb049f640] bci=[0,1,-] rc=1 vc=232 vn=- li=21 udi=11552 nc=0
...
Can we simply change isMethodPointerConstant()
in loadAddressConstantInSnippet()
to chkMethodPointerConstant()
?
https://github.com/eclipse/omr/blob/efe8caf43537270e978f504215342bfba466f0b0/compiler/aarch64/codegen/OMRTreeEvaluator.cpp#L5355
That solution looks reasonable to me.
I opened PR https://github.com/eclipse/omr/pull/7033 as the fix.
@knn-k : can you open a 0.40 PR in openj9-omr for this fix please?
I opened https://github.com/eclipse-openj9/openj9-omr/pull/176 for v0.40.0.
I think this issue can be closed.
Fixed in 0.40.
The assertion at
/home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/il/OMRNode.cpp:7006: (self()->getOpCodeValue() == TR::aconst)||(self()->getOpCodeValue() == TR::aloadi)
fires when building OpenJDK 11 on
aarch64_linux
with the-DPROD_WITH_ASSUMES
flag enabled inopenj9/runtime/compiler/CMakeLists.txt
.Link to the Jenkins build.
Stack trace: