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

C2: assert(no_dead_loop) failed: dead loop detected

    XMLWordPrintable

Details

    • b09

    Backports

      Description

        The attached fuzzer test hits the following assertion failure.

        To reproduce:
        $ java -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly=Test Test.java

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/christian/jdk/open/src/hotspot/share/opto/phaseX.cpp:923), pid=23357, tid=23369
        # assert(no_dead_loop) failed: dead loop detected
        #
        # JRE version: Java(TM) SE Runtime Environment (16.0) (slowdebug build 16-internal+0-2020-07-13-1111353.christian...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 16-internal+0-2020-07-13-1111353.christian..., compiled mode, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0xf02e58] PhaseGVN::dead_loop_check(Node*)+0x18e
        ..........
        Command Line: -Xmx1G -Xcomp -Xbatch -XX:-TieredCompilation -XX:CompileOnly=Test --add-modules=ALL-DEFAULT jdk.compiler/com.sun.tools.javac.launcher.Main Test.java
        ..........
        Current thread (0x00007f4bfc343fc0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=23369, stack(0x00007f4bf8005000,0x00007f4bf8106000)]


        Current CompileTask:
        C2: 12334 93 b Test::lMeth (228 bytes)

        Stack: [0x00007f4bf8005000,0x00007f4bf8106000], sp=0x00007f4bf81013c0, free space=1008k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0xf02e58] PhaseGVN::dead_loop_check(Node*)+0x18e
        V [libjvm.so+0xf040c2] PhaseIterGVN::transform_old(Node*)+0x26c
        V [libjvm.so+0xf03ce4] PhaseIterGVN::optimize()+0x148
        V [libjvm.so+0x6d5d82] Compile::Optimize()+0x18a
        V [libjvm.so+0x6cfaca] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1090
        V [libjvm.so+0x5ce7a7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x15b
        V [libjvm.so+0x6ea926] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x88e
        V [libjvm.so+0x6e95b3] CompileBroker::compiler_thread_loop()+0x3df
        V [libjvm.so+0x10a0bdf] compiler_thread_entry(JavaThread*, Thread*)+0x69
        V [libjvm.so+0x109bd90] JavaThread::thread_main_inner()+0x146
        V [libjvm.so+0x109bc41] JavaThread::run()+0x11f
        V [libjvm.so+0x1097eca] Thread::call_run()+0x180
        V [libjvm.so+0xea6716] thread_native_entry(Thread*)+0x1e4

        Attachments

          1. after_PhiNode_Ideal.png
            after_PhiNode_Ideal.png
            6 kB
          2. before_PhiNode_Ideal.png
            before_PhiNode_Ideal.png
            13 kB
          3. FuzzerUtils.java
            13 kB
          4. replay_pid23357.log
            173 kB
          5. Test.java
            15 kB

          Issue Links

            Activity

              People

                chagedorn Christian Hagedorn
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: