-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 25
-
Component/s: hotspot
-
arm
-
linux
JVM crashes when run compiler.loopopts.superword.TestMemorySegment test. Particularly all test with native buffers are affected:
- byte-buffer-direct
- native
- native-AlignVector
==================
Error mixing types: rawptr:BotPTR and int:0
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:1328), pid=519706, tid=519723
# Error: ShouldNotReachHere()
==================
The stack trace is the following:
==================
#0 0xf752aa78 in Type::typerr (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:1328
#1 0xf752f2a2 in TypeRawPtr::xmeet (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:3357
#2 0xf7529ffe in Type::meet_helper (this=0xb0e1c7f0, t=0xb0e1bed0, include_speculative=false) at /home/ubuntu/zulu/src/hotspot/share/opto/type.cpp:1022
#3 0xf6a6986c in Type::meet (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.hpp:236
#4 0xf6a8f5fe in Type::higher_equal (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.hpp:226
#5 0xf72dd3c0 in MulNode::Value (this=0xb022b800, phase=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/mulnode.cpp:197
#6 0xf72de24c in AndINode::Value (this=0xb022b800, phase=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/mulnode.cpp:715
#7 0xf73a19da in PhaseIterGVN::transform_old (this=0xb09fd1e8, n=0xb022b800) at /home/ubuntu/jdk/src/hotspot/share/opto/phaseX.cpp:1252
#8 0xf73a114a in PhaseIterGVN::optimize (this=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/phaseX.cpp:1054
#9 0xf6d041ac in PhaseIdealLoop::optimize (igvn=..., mode=LoopOptsDefault) at /home/ubuntu/jdk/src/hotspot/share/opto/loopnode.hpp:1273
#10 0xf6cf7370 in Compile::optimize_loops (this=0xb09fddf8, igvn=..., mode=LoopOptsDefault) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:2262
#11 0xf6cf847e in Compile::Optimize (this=0xb09fddf8) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:2511
#12 0xf6cf202e in Compile::Compile (this=0xb09fddf8, ci_env=0xb09fe738, target=0xb0483310, osr_bci=-1, options=..., directive=0xb01a56e8) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:868
#13 0xf6bf4c22 in C2Compiler::compile_method (this=0xb0e19150, env=0xb09fe738, target=0xb0483310, entry_bci=-1, install_code=true, directive=0xb01a56e8) at /home/ubuntu/jdk/src/hotspot/share/opto/c2compiler.cpp:141
#14 0xf6d0f098 in CompileBroker::invoke_compiler_on_method (task=0xb0e30948) at /home/ubuntu/jdk/src/hotspot/share/compiler/compileBroker.cpp:2331
#15 0xf6d0dea2 in CompileBroker::compiler_thread_loop () at /home/ubuntu/jdk/src/hotspot/share/compiler/compileBroker.cpp:1974
==================
The crash happens on the MulI node that is inserted by "VTransform::adjust_pre_loop_limit_to_align_main_loop_vectors()" function [1]. I see that this block is never visited by arm64 JDK.
Workaround would be disable scalar ops
```
-XX:-UseSuperWord
```
[1] https://github.com/openjdk/jdk/blob/8095e33ee88759cf2fbe61e2284d95f6b7fb9a3a/src/hotspot/share/opto/superword.cpp#L2992
- byte-buffer-direct
- native
- native-AlignVector
==================
Error mixing types: rawptr:BotPTR and int:0
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:1328), pid=519706, tid=519723
# Error: ShouldNotReachHere()
==================
The stack trace is the following:
==================
#0 0xf752aa78 in Type::typerr (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:1328
#1 0xf752f2a2 in TypeRawPtr::xmeet (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.cpp:3357
#2 0xf7529ffe in Type::meet_helper (this=0xb0e1c7f0, t=0xb0e1bed0, include_speculative=false) at /home/ubuntu/zulu/src/hotspot/share/opto/type.cpp:1022
#3 0xf6a6986c in Type::meet (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.hpp:236
#4 0xf6a8f5fe in Type::higher_equal (this=0xb0e1c7f0, t=0xb0e1bed0) at /home/ubuntu/jdk/src/hotspot/share/opto/type.hpp:226
#5 0xf72dd3c0 in MulNode::Value (this=0xb022b800, phase=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/mulnode.cpp:197
#6 0xf72de24c in AndINode::Value (this=0xb022b800, phase=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/mulnode.cpp:715
#7 0xf73a19da in PhaseIterGVN::transform_old (this=0xb09fd1e8, n=0xb022b800) at /home/ubuntu/jdk/src/hotspot/share/opto/phaseX.cpp:1252
#8 0xf73a114a in PhaseIterGVN::optimize (this=0xb09fd1e8) at /home/ubuntu/jdk/src/hotspot/share/opto/phaseX.cpp:1054
#9 0xf6d041ac in PhaseIdealLoop::optimize (igvn=..., mode=LoopOptsDefault) at /home/ubuntu/jdk/src/hotspot/share/opto/loopnode.hpp:1273
#10 0xf6cf7370 in Compile::optimize_loops (this=0xb09fddf8, igvn=..., mode=LoopOptsDefault) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:2262
#11 0xf6cf847e in Compile::Optimize (this=0xb09fddf8) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:2511
#12 0xf6cf202e in Compile::Compile (this=0xb09fddf8, ci_env=0xb09fe738, target=0xb0483310, osr_bci=-1, options=..., directive=0xb01a56e8) at /home/ubuntu/jdk/src/hotspot/share/opto/compile.cpp:868
#13 0xf6bf4c22 in C2Compiler::compile_method (this=0xb0e19150, env=0xb09fe738, target=0xb0483310, entry_bci=-1, install_code=true, directive=0xb01a56e8) at /home/ubuntu/jdk/src/hotspot/share/opto/c2compiler.cpp:141
#14 0xf6d0f098 in CompileBroker::invoke_compiler_on_method (task=0xb0e30948) at /home/ubuntu/jdk/src/hotspot/share/compiler/compileBroker.cpp:2331
#15 0xf6d0dea2 in CompileBroker::compiler_thread_loop () at /home/ubuntu/jdk/src/hotspot/share/compiler/compileBroker.cpp:1974
==================
The crash happens on the MulI node that is inserted by "VTransform::adjust_pre_loop_limit_to_align_main_loop_vectors()" function [1]. I see that this block is never visited by arm64 JDK.
Workaround would be disable scalar ops
```
-XX:-UseSuperWord
```
[1] https://github.com/openjdk/jdk/blob/8095e33ee88759cf2fbe61e2284d95f6b7fb9a3a/src/hotspot/share/opto/superword.cpp#L2992