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

C2 compilation fails with assert(!x->as_Loop()->is_loop_nest_inner_loop()) failed: loop was transformed

XMLWordPrintable

    • b27
    • 16
    • b15

        Attached Test.java fails since JDK-8256655 in JDK 16 b27.

        java -Xcomp -XX:CompileCommand=compileonly,Test::test* -XX:-TieredCompilation Test.java

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/opt/mach5/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S10108/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/64ecc42e-c311-4cbc-9f8c-cdb54670fe43/runs/6ce1ca2a-f2b6-4d79-a919-946bcfa599e7/workspace/open/src/hotspot/share/opto/loopnode.cpp:1812), pid=3454163, tid=3454177
        # assert(!x->as_Loop()->is_loop_nest_inner_loop()) failed: loop was transformed
        #
        # JRE version: Java(TM) SE Runtime Environment (23.0+4) (fastdebug build 23-ea+4-173)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-ea+4-173, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:

        Current CompileTask:
        C2:2991 83 b Test::test (22 bytes)

        Stack: [0x00007fc08a9a9000,0x00007fc08aaaa000], sp=0x00007fc08aaa4a00, free space=1006k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x12a64c2] PhaseIdealLoop::is_counted_loop(Node*, IdealLoopTree*&, BasicType)+0x28e2 (loopnode.cpp:1812)
        V [libjvm.so+0x12a66e0] IdealLoopTree::counted_loop(PhaseIdealLoop*)+0x40
        V [libjvm.so+0x12a6752] IdealLoopTree::counted_loop(PhaseIdealLoop*)+0xb2
        V [libjvm.so+0x12a6752] IdealLoopTree::counted_loop(PhaseIdealLoop*)+0xb2
        V [libjvm.so+0x12ab537] PhaseIdealLoop::build_and_optimize()+0x867
        V [libjvm.so+0x9f19d8] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x388
        V [libjvm.so+0x9ecae6] Compile::Optimize()+0xb96
        V [libjvm.so+0x9f050b] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1beb
        V [libjvm.so+0x83dc57] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1e7
        V [libjvm.so+0x9fbacc] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c
        V [libjvm.so+0x9fc758] CompileBroker::compiler_thread_loop()+0x468
        V [libjvm.so+0xeb99ec] JavaThread::thread_main_inner()+0xcc
        V [libjvm.so+0x179ea66] Thread::call_run()+0xb6
        V [libjvm.so+0x14a92e7] thread_native_entry(Thread*)+0x127

          1. Test.java
            1 kB
          2. replay_pid3454163.log
            231 kB
          3. hs_err_pid3454163.log
            81 kB

              roland Roland Westrelin
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: