JDK-8267375 : Aarch64: JVM crashes with option -XX:PrintIdealGraphLevel=3 on SVE backend
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-panama
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: aarch64
  • Submitted: 2021-05-19
  • Updated: 2021-05-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 Other
17Fixed repo-panamaUnresolved
Related Reports
Relates :  
Description
reproduce : 

   run the attechment with option -XX:PrintIdealGraphLevel=3

crash: 

  # A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/wanghuang/repo/panama-vector/src/hotspot/share/opto/type.cpp:1143), pid=12520, tid=12511
#  assert(false) failed: unmatched base type: all base types must be categorized

# Problematic frame:
# V  [libjvm.so+0x1291678]  Type::category() const+0x1cc
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: --add-modules=jdk.incubator.vector -XX:CompileCommand=compileonly,TestVectorInsertByte::* -XX:+UnlockDiagnosticVMOptions -XX:PrintIdealGraphLevel=3 -XX:PrintIdealGraphFile=TestVectorInsertByte1.xml -XX:+PrintIntrinsics TestVectorInsertByte



---------------  T H R E A D  ---------------

Current thread (0x0000fffff041a400):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=12511, stack(0x0000ffff7d1fe000,0x0000ffff7d3fe000)]


Current CompileTask:
C2:  68767   24       4       TestVectorInsertByte::testByteVectorInsert (27 bytes)

Stack: [0x0000ffff7d1fe000,0x0000ffff7d3fe000],  sp=0x0000ffff7d3f8570,  free space=2025k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1291678]  Type::category() const+0x1cc
V  [libjvm.so+0xb403d4]  IdealGraphPrinter::visit_node(Node*, bool, VectorSet*)+0x3bc
V  [libjvm.so+0xb41528]  IdealGraphPrinter::walk_nodes(Node*, bool, VectorSet*)+0x170
V  [libjvm.so+0xb41860]  IdealGraphPrinter::print(char const*, Node*)+0x18c
V  [libjvm.so+0xb416c8]  IdealGraphPrinter::print_method(char const*, int)+0x4c
V  [libjvm.so+0x854440]  Compile::print_method(CompilerPhaseType, char const*, int)+0x8c
V  [libjvm.so+0x854508]  Compile::print_method(CompilerPhaseType, int, int)+0xa4
V  [libjvm.so+0x84dae0]  Compile::Code_Gen()+0x100
V  [libjvm.so+0x8458e0]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1088
V  [libjvm.so+0x7308a4]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0xf8
V  [libjvm.so+0x861484]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x774
V  [libjvm.so+0x860268]  CompileBroker::compiler_thread_loop()+0x360
V  [libjvm.so+0x8814c4]  CompilerThread::thread_entry(JavaThread*, Thread*)+0x7c
V  [libjvm.so+0x1271990]  JavaThread::thread_main_inner()+0x164
V  [libjvm.so+0x127181c]  JavaThread::run()+0x184
V  [libjvm.so+0x126f09c]  Thread::call_run()+0x18c
V  [libjvm.so+0xfd1898]  thread_native_entry(Thread*)+0x178
C  [libpthread.so.0+0x77e4]  start_thread+0x18c
Comments
reason: operand pRegGov() %{ constraint(ALLOC_IN_RC(gov_pr)); match(RegVectMask); op_cost(0); format %{ %} interface(REG_INTER); %} if pRegGov is used as a `TEMP`, like : instruct insertB_small(vReg dst, vReg src, iRegIorL2I val, immI idx, pRegGov pTmp, rFlagsReg cr) %{ predicate(UseSVE > 0 && n->as_Vector()->length() <= 32 && n->bottom_type()->is_vect()->element_basic_type() == T_BYTE); match(Set dst (VectorInsert (Binary src val) idx)); effect(TEMP_DEF dst, TEMP pTmp, KILL cr); // here It will have the type `Type::VectorMask` in MachTempNode which is generated from Expand. However, we miss Type::VectorMask in Type::category() . We can fix this bug simply by adding case Type::VectorMask in Type::category().
19-05-2021