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

C2: assert(wq.size() - before == EMPTY_LOOP_SIZE) failed: expect the EMPTY_LOOP_SIZE nodes of this body if empty

    XMLWordPrintable

Details

    • b14

    Backports

      Description

        The following Java Fuzzer test starts to fail after JDK-8297724:

        To reproduce:
        $ java -XX:CompileCommand=compileonly,Test::* -XX:-TieredCompilation Test.java
        $ java -Xbatch -XX:CompileCommand=compileonly,Reduced::* -XX:-TieredCompilation Reduced.java

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/opt/mach5/mesos/work_dir/slaves/cd627e65-f015-4fb1-a1d2-b6c9b8127f98-S141865/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8a11c2a6-dc3b-42a8-a1bf-5f4afa468e45/runs/9fc53209-cfb4-45ef-bad1-2b89080d866c/workspace/open/src/hotspot/share/opto/loopTransform.cpp:3540), pid=1765465, tid=1765479
        # assert(wq.size() - before == EMPTY_LOOP_SIZE) failed: expect the EMPTY_LOOP_SIZE nodes of this body if empty
        #
        # JRE version: Java(TM) SE Runtime Environment (22.0) (fastdebug build 22-internal-2023-08-25-1459578.christian.hagedorn.jdk)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-internal-2023-08-25-1459578.christian.hagedorn.jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x126fb18] IdealLoopTree::collect_loop_core_nodes(PhaseIdealLoop*, Unique_Node_List&) const+0x348
        .............
        Command Line: -XX:CompileCommand=quiet -XX:-TieredCompilation Test
        .............
        Stack: [0x00007f123d399000,0x00007f123d499000], sp=0x00007f123d493a40, free space=1002k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x126fb18] IdealLoopTree::collect_loop_core_nodes(PhaseIdealLoop*, Unique_Node_List&) const+0x348 (loopTransform.cpp:3540)
        V [libjvm.so+0x126fbbf] IdealLoopTree::enqueue_data_nodes(PhaseIdealLoop*, Unique_Node_List&, Unique_Node_List&) const+0x1f
        V [libjvm.so+0x126fe23] IdealLoopTree::process_safepoint(PhaseIdealLoop*, Unique_Node_List&, Unique_Node_List&, Node*) const+0x113
        V [libjvm.so+0x1270310] IdealLoopTree::empty_loop_with_data_nodes(PhaseIdealLoop*) const [clone .part.0]+0x490
        V [libjvm.so+0x12710f5] IdealLoopTree::do_remove_empty_loop(PhaseIdealLoop*) [clone .part.0]+0x9b5
        V [libjvm.so+0x12a3411] PhaseIdealLoop::build_and_optimize()+0xec1
        V [libjvm.so+0x9ef5d9] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x3b9
        V [libjvm.so+0x9ea590] Compile::Optimize()+0x820
        V [libjvm.so+0x9ee3a0] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1bb0
        V [libjvm.so+0x84949b] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x13b
        V [libjvm.so+0x9fa2b7] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x977
        V [libjvm.so+0x9faff8] CompileBroker::compiler_thread_loop()+0x5f8
        V [libjvm.so+0xeb65cc] JavaThread::thread_main_inner()+0xcc
        V [libjvm.so+0x17a09fa] Thread::call_run()+0xba
        V [libjvm.so+0x149fe9a] thread_native_entry(Thread*)+0x12a

        Attachments

          1. FuzzerUtils.java
            13 kB
          2. hs_err_pid1765465.log
            63 kB
          3. Reduced.java
            0.5 kB
          4. Test.java
            8 kB

          Issue Links

            Activity

              People

                roland Roland Westrelin
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: