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

assert(cnt++ < 40) failed: infinite cycle in loop optimization

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        ADDITIONAL SYSTEM INFORMATION :
        OS: Ubuntu18.04

        JDK8
        $ java -version
        openjdk version "1.8.0-internal-fastdebug"
        OpenJDK Runtime Environment (build 1.8.0-internal-fastdebug-user_2022_03_11_16_03-b00)
        OpenJDK 64-Bit Server VM (build 25.71-b00-fastdebug, mixed mode)

        JDK11
        $ java -version
        openjdk version "11.0.15-internal" 2022-04-19
        OpenJDK Runtime Environment (fastdebug build 11.0.15-internal+0-adhoc.user.jdk11u)
        OpenJDK 64-Bit Server VM (fastdebug build 11.0.15-internal+0-adhoc.user.jdk11u, mixed mode, sharing)

        JDK17
        $ java -version
        openjdk version "17.0.3-internal" 2022-04-19
        OpenJDK Runtime Environment (fastdebug build 17.0.3-internal+0-adhoc.user.jdk17u)
        OpenJDK 64-Bit Server VM (fastdebug build 17.0.3-internal+0-adhoc.user.jdk17u, mixed mode, sharing)

        A DESCRIPTION OF THE PROBLEM :
        JVM crashed when running the test case with option -XX:-PartialPeelLoop under jdk8, jdk11, jdk17.

        Reproduce:
        $ java -Xcomp -XX:-PartialPeelLoop Test
        i i10 i11 = 125,270,93
        i12 i13 i14 = 72879,2,2
        i15 i16 i17 = 174,0,148
        i18 fArr iArr1 = 173,-4543399874554511360,-327513
        Test.instanceCount Test.fFld Test.bFld = 6542009568855372046,1092616192,1
        dFld Test.dArrFld Test.lArrFld = 4613701581922619432,4668565628057730655,-6269174457476628831
        vMeth1_check_sum: -27854160
        lMeth_check_sum: 1587511662398500560
        vMeth_check_sum: 2853594718
        i i10 i11 = 125,270,93
        i12 i13 i14 = 72879,2,2
        i15 i16 i17 = 174,0,148
        i18 fArr iArr1 = 173,-4543399874554511360,-327513
        Test.instanceCount Test.fFld Test.bFld = 6542009568855372046,1092616192,1
        dFld Test.dArrFld Test.lArrFld = 4615953381736304680,4668565628057730655,-6269174457476628831
        vMeth1_check_sum: -55708320
        lMeth_check_sum: 3175023324796980640
        vMeth_check_sum: 5707189439
        # To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=/compile.cpp:2021
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/user/jdk_source/jdk17u/src/hotspot/share/opto/compile.cpp:2021), pid=44309, tid=44322
        # assert(cnt++ < 40) failed: infinite cycle in loop optimization
        #
        # JRE version: OpenJDK Runtime Environment (17.0.3) (fastdebug build 17.0.3-internal+0-adhoc.user.jdk17u)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 17.0.3-internal+0-adhoc.user.jdk17u, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x950bc6] Compile::Optimize()+0x1006
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # An error report file with more information is saved as:
        # /home/user/hs_err_pid44309.log
        #
        # Compiler replay data is saved as:
        # /home/user/replay_pid44309.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #

        hs_err.log:
        --------------- T H R E A D ---------------

        Current thread (0x00007f5cf021c000): JavaThread "C2 CompilerThread6" daemon [_thread_in_native, id=44761, stack(0x00007f5c3a456000,0x00007f5c3a556000)]

        Stack: [0x00007f5c3a456000,0x00007f5c3a556000], sp=0x00007f5c3a550ab0, free space=1002k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x121fcac] VMError::report_and_die()+0x2ec
        V [libjvm.so+0x797f81] report_vm_error(char const*, int, char const*, char const*)+0x61
        V [libjvm.so+0x6fcb74] Compile::Optimize()+0xcf4
        V [libjvm.so+0x6fe9c5] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool)+0xe05
        V [libjvm.so+0x59ba70] C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0xe0
        V [libjvm.so+0x70bdf2] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x8b2
        V [libjvm.so+0x70d3e0] CompileBroker::compiler_thread_loop()+0x710
        V [libjvm.so+0x118b188] JavaThread::thread_main_inner()+0x1c8
        V [libjvm.so+0x118b54d] JavaThread::run()+0x37d
        V [libjvm.so+0xf19ca2] java_start(Thread*)+0x102
        C [libpthread.so.0+0x76db] start_thread+0xdb


        Current CompileTask:
        C2: 6921 1042 !b 4 Test::mainTest (767 bytes)




        FREQUENCY : always


          Attachments

          1. hs_err_pid15984.log
            44 kB
          2. Output TraceLoopOpts.txt
            187 kB
          3. replay_pid15984.log
            135 kB
          4. Reproducer.java
            0.5 kB
          5. TestPartialPeelLoop.zip
            104 kB

            Issue Links

              Activity

                People

                Assignee:
                tholenstein Tobias Holenstein
                Reporter:
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: