Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336779

[lworld] C2 compilations hits "what's left behind is null" assert in do_checkcast

XMLWordPrintable

      When running test java/lang/ModuleTests/access/AccessTest.java with --enable-preview and -Xcomp, the VM crashes with the following message:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/open/src/hotspot/share/opto/parseHelper.cpp:92), pid=622663, tid=622680
      # assert(stopped() || _gvn.type(peek())->higher_equal(TypePtr::NULL_PTR)) failed: what's left behind is null
      #
      # JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-lworld5ea-2024-06-21-1558186.fred...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-lworld5ea-2024-06-21-1558186.fred..., compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x15d4bf2] Parse::do_checkcast()+0x3a2

      Stack trace:

      Current thread (0x000078a2b446e5e0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=622680, stack(0x000078a292e00000,0x000078a292f00000) (1024K)]


      Current CompileTask:
      C2:258045 23239 b 4 com.sun.tools.javac.jvm.Gen::loadIntConst (23 bytes)

      Stack: [0x000078a292e00000,0x000078a292f00000], sp=0x000078a292efb950, free space=1006k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x15d4bf2] Parse::do_checkcast()+0x3a2 (parseHelper.cpp:92)
      V [libjvm.so+0x15cc689] Parse::do_one_bytecode()+0x2c79 (parse2.cpp:3516)
      V [libjvm.so+0x15b1e1a] Parse::do_one_block()+0x20a (parse1.cpp:1675)
      V [libjvm.so+0x15b32d6] Parse::do_all_blocks()+0x136 (parse1.cpp:745)
      V [libjvm.so+0x15b7ae6] Parse::Parse(JVMState*, ciMethod*, float)+0xe46 (parse1.cpp:649)
      V [libjvm.so+0x87bebc] ParseGenerator::generate(JVMState*)+0x16c (callGenerator.cpp:100)
      V [libjvm.so+0xbd62ea] Parse::do_call()+0x6ba (doCall.cpp:695)
      V [libjvm.so+0x15c9e20] Parse::do_one_bytecode()+0x410 (parse2.cpp:3513)
      V [libjvm.so+0x15b1e1a] Parse::do_one_block()+0x20a (parse1.cpp:1675)
      V [libjvm.so+0x15b32d6] Parse::do_all_blocks()+0x136 (parse1.cpp:745)
      V [libjvm.so+0x15b7ae6] Parse::Parse(JVMState*, ciMethod*, float)+0xe46 (parse1.cpp:649)
      V [libjvm.so+0x87bebc] ParseGenerator::generate(JVMState*)+0x16c (callGenerator.cpp:100)
      V [libjvm.so+0x87e847] PredictedCallGenerator::generate(JVMState*)+0x327 (callGenerator.cpp:1051)
      V [libjvm.so+0xbd62ea] Parse::do_call()+0x6ba (doCall.cpp:695)
      V [libjvm.so+0x15c9e20] Parse::do_one_bytecode()+0x410 (parse2.cpp:3513)
      V [libjvm.so+0x15b1e1a] Parse::do_one_block()+0x20a (parse1.cpp:1675)
      V [libjvm.so+0x15b32d6] Parse::do_all_blocks()+0x136 (parse1.cpp:745)
      V [libjvm.so+0x15b7ae6] Parse::Parse(JVMState*, ciMethod*, float)+0xe46 (parse1.cpp:649)
      V [libjvm.so+0x87bebc] ParseGenerator::generate(JVMState*)+0x16c (callGenerator.cpp:100)
      V [libjvm.so+0xa3a941] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1781 (compile.cpp:804)
      V [libjvm.so+0x878ce2] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f2 (c2compiler.cpp:143)
      V [libjvm.so+0xa46cec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c (compileBroker.cpp:2305)
      V [libjvm.so+0xa47968] CompileBroker::compiler_thread_loop()+0x458 (compileBroker.cpp:1964)
      V [libjvm.so+0xf4987c] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:722)
      V [libjvm.so+0x1875f56] Thread::call_run()+0xb6 (thread.cpp:221)
      V [libjvm.so+0x155fd87] thread_native_entry(Thread*)+0x127 (os_linux.cpp:816)
      C [libc.so.6+0x9ca94]
      Registers:
      RAX=0x000078a2baa52000, RBX=0x000078a2480180a0, RCX=0x000078a2b9d9ca64, RDX=0x000078a2b9ee5838
      RSP=0x000078a292efb950, RBP=0x000078a292efb9b0, RSI=0x000000000000005c, RDI=0x000078a2b9ee5888
      R8 =0x0000000000000001, R9 =0x000078a24aa64df8, R10=0x000078a24aa64d01, R11=0x000078a24aa64df8
      R12=0x000078a2480180a0, R13=0x000078a24b41c3f0, R14=0x000078a1d46ae160, R15=0x000000000000000a
      RIP=0x000078a2b97d4bf2, EFLAGS=0x0000000000010202, CSGSFS=0x002b000000000033, ERR=0x0000000000000006
        TRAPNO=0x000000000000000e


      The crash occurs on both x64 and aarch64.

            thartmann Tobias Hartmann
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: