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

[lworld] C2 compilation fails with empty program detected during loop optimization

XMLWordPrintable

      Running the test from JDK-8357105 with '-XX:-TieredCompilation -XX:+StressUnstableIfTraps' in Valhalla still triggers the issue:

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/loopnode.cpp:4652), pid=447723, tid=447737
      # assert(false) failed: empty program detected during loop optimization
      #
      # JRE version: Java(TM) SE Runtime Environment (26.0) (fastdebug build 26-lworldea2-2025-09-10-1323163.tobias...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-lworldea2-2025-09-10-1323163.tobias..., mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x15a7416] PhaseIdealLoop::build_and_optimize()+0xba6

      Current CompileTask:
      C2:287 27 b compiler.stringopts.TestStackedConcatsAppendUncommonTrap::f (53 bytes)

      Stack: [0x00007b9e59500000,0x00007b9e59600000], sp=0x00007b9e595facd0, free space=1003k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x15a7416] PhaseIdealLoop::build_and_optimize()+0xba6 (loopnode.cpp:4652)
      V [libjvm.so+0xb81890] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x4c0 (loopnode.hpp:1173)
      V [libjvm.so+0xb787a4] Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0xb4 (compile.cpp:2734)
      V [libjvm.so+0xb7bf3c] Compile::Optimize()+0x16ac (compile.cpp:3010)
      V [libjvm.so+0xb7e79f] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x201f (compile.cpp:882)
      V [libjvm.so+0x989f34] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x484 (c2compiler.cpp:143)
      V [libjvm.so+0xb8dcf8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58 (compileBroker.cpp:2323)
      V [libjvm.so+0xb8eeb8] CompileBroker::compiler_thread_loop()+0x568 (compileBroker.cpp:1967)
      V [libjvm.so+0x110e58b] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:773)
      V [libjvm.so+0x1bb65a6] Thread::call_run()+0xb6 (thread.cpp:243)
      V [libjvm.so+0x17fdad8] thread_native_entry(Thread*)+0x128 (os_linux.cpp:868)

            dfenacci Damon Fenacci
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: