Closed dylanjtuttle closed 1 year ago
Add backtrace
...
#12 <signal handler called>
#13 genSuperClassTest (node=node@entry=0x4000193a8860, instanceClassReg=instanceClassReg@entry=0x400019471ab0,
instanceClassRegCanBeReclaimed=instanceClassRegCanBeReclaimed@entry=true, castClassReg=0x400019471f30, castClassDepth=castClassDepth@entry=-1,
falseLabel=0x4000194719c0, srm=0x4000194718e0, cg=0x40001932cf50)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/openj9/runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp:1828
#14 0x00004000083ed888 in VMarrayStoreCHKEvaluator (cg=0x40001932cf50, helperCallLabel=0x4000194719c0, doneLabel=0x400019471900,
srm=0x4000194718e0, dstReg=0x400019471530, srcReg=0x40001946fc50, node=0x4000193a8860)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/openj9/runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp:4207
#15 J9::ARM64::TreeEvaluator::ArrayStoreCHKEvaluator (node=0x4000193a8860, cg=0x40001932cf50)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/openj9/runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp:4287
#16 0x0000400008410e78 in OMR::CodeGenerator::evaluate (this=this@entry=0x40001932cf50, node=node@entry=0x4000193a8860)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/codegen/NodeEvaluation.cpp:181
#17 0x00004000080e1464 in J9::CodeGenerator::doInstructionSelection (this=this@entry=0x40001932cf50)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/openj9/runtime/compiler/codegen/J9CodeGenerator.cpp:2140
#18 0x000040000841e788 in OMR::CodeGenPhase::performInstructionSelectionPhase (cg=cg@entry=0x40001932cf50, phase=0x40001932d3c8)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/codegen/OMRCodeGenPhase.cpp:414
#19 0x000040000841f538 in OMR::CodeGenPhase::performAll (this=this@entry=0x40001932d3c8)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/codegen/OMRCodeGenPhase.cpp:138
#20 0x000040000841c02c in OMR::CodeGenerator::generateCode (this=0x40001932cf50)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/codegen/OMRCodeGenerator.cpp:1409
#21 0x0000400008448a24 in OMR::Compilation::compile (this=this@entry=0x400019327000)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/omr/compiler/compile/OMRCompilation.cpp:1112
#22 0x0000400008117434 in TR::CompilationInfoPerThreadBase::compile (this=this@entry=0x400003d42080, vmThread=vmThread@entry=0x1f100,
compiler=0x400019327000, compilee=compilee@entry=0x400003f30460, vm=..., optimizationPlan=0x400003db0c70, scratchSegmentProvider=...)
at /home/jenkins/workspace/Build_JDK11_aarch64_linux_Personal/openj9/runtime/compiler/control/CompilationThread.cpp:9988
---Type <return> to continue, or q <return> to quit---q
Quit
@knn-k : FYI
The code in genSuperClassTest()
was implemented in PR #15683.
My local build shows failures with node->getSecondChild()
being NULL in genSuperClassTest()
.
When node->getSecondChild()
happens to be non-NULL, it would fail with the assertion node->getSecondChild()->getOpCodeValue() != TR::loadaddr
.
_ZN2TR4trapEv+0x4c (0x0000FFFFAA2F7820 [libj9jit29.so+0x437820])
(0x0000FFFFAA2F788C [libj9jit29.so+0x43788c])
_ZL17genSuperClassTestPN2TR4NodeEPNS_8RegisterEbS3_iPNS_11LabelSymbolEP30TR_ARM64ScratchRegisterManagerPNS_13CodeGeneratorE+0x51c (0x0000FFFFAA254370 [libj9jit29.so+0x394370])
_ZN2J95ARM6413TreeEvaluator22ArrayStoreCHKEvaluatorEPN2TR4NodeEPNS2_13CodeGeneratorE+0xc74 (0x0000FFFFAA266AA8 [libj9jit29.so+0x3a6aa8])
_ZN3OMR13CodeGenerator8evaluateEPN2TR4NodeE+0x50 (0x0000FFFFAA2827E0 [libj9jit29.so+0x3c27e0])
_ZN2J913CodeGenerator22doInstructionSelectionEv+0x964 (0x0000FFFFA9F9B9A4 [libj9jit29.so+0xdb9a4])
I checked the jitdump in the artifact of failed jenkins build.
ArrayStoreCHK
has only 1 child. I guess it is wrong to assume that node has 2 children.
32003 ------------------------------
32004 n130n ( 0) ArrayStoreCHK [#43] () [ 0x40004ec8186 32004 0] bci=[-1,83,-] rc=0 vc=1482 vn=- li=8 udi=- nc=1 flg=0x20
32005 n129n ( 2) awrtbari <array-shadow>[#210 Shadow] [flags 0x80000607 0x0 ] () [ 0x40004ec8181 32005 0] bci=[-1,83,-] rc=2 vc=1482 vn=- li=8 udi=- nc=3 flg=0x20
32006 n128n ( 1) aladd (X>=0 internalPtr ) [ 0x40004ec817c 32006 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=2 flg=0x8100
32007 n115n ( 2) ==>l2a (in &GPR_ 0x40004eefb5f0) (X!=0 )
32008 n127n ( 1) lsub (X>=0 cannotOverflow ) [ 0x40004ec8177 32008 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=2 flg=0x1100
32009 n125n ( 1) lshl (X>=0 ) [ 0x40004ec816d 32009 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=2 flg=0x100
32010 n124n ( 1) i2l (highWordZero X>=0 ) [ 0x40004ec8168 32010 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=1 flg=0x4100
32011 n585n ( 1) ==>iRegLoad (in GPR_ 0x40004eef7e40) (X>=0 cannotOverflow SeenRealReference )
32012 n123n ( 1) iconst 2 (Unsigned X!=0 X>=0 ) [ 0x40004ec8163 32012 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=0 flg=0x4104
32013 n126n ( 1) lconst -8 (X!=0 X<=0 ) [ 0x40004ec8172 32013 0] bci=[-1,83,-] rc=1 vc=1482 vn=- li=8 udi=- nc=0 flg=0x204
32014 n741n ( 1) l2i [ 0x40004ec8d75 32014 0] bci=[-1,58,-] rc=1 vc=1482 vn=- li=- udi=- nc=1
32015 n740n ( 1) a2l [ 0x40004ec8d70 32015 0] bci=[-1,58,-] rc=1 vc=1482 vn=- li=- udi=- nc=1
32016 n88n ( 1) ==>l2a (in &GPR_ 0x40004eef9030)
32017 n115n ( 2) ==>l2a (in &GPR_ 0x40004eefb5f0) (X!=0 )
32018 ------------------------------
The intention of the assert is to verify that the opcode of the class node is not loadaddr
if the cast class is unknown at compile time. The class node is the second child of the node passed as the first argument when genSuperClassTest
is called from instanceof
or checkcast
evaluator, but that is not true if called from VMarrayStoreCHKEvaluator
.
I opened https://github.com/eclipse-openj9/openj9/pull/17589 to fix this inconsistency.
The assertion at
openj9/runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp:1828: node->getSecondChild()->getOpCodeValue() != TR::loadaddr
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.
For some reason, the assertion message did not print during the build. See the stack trace:
@a7ehuo and I were able to confirm that the problem was in fact an assertion failure (and commenting it out does fix the problem), but we're unsure why the message didn't appear in the console output. Perhaps because it happened while it was building
exploded-image-optimize
?