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

C2: prevent lock region elimination in OSR compilation

XMLWordPrintable

    • b13
    • x86_64
    • linux_ubuntu

        ADDITIONAL SYSTEM INFORMATION :
        # JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.jdk22u)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.jdk22u, compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

        A DESCRIPTION OF THE PROBLEM :
        I ran a modified regression test case on JDK 22.0 and found that the JVM crashed with -Xcomp option.

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/repository/jdk22u/src/hotspot/share/runtime/javaThread.cpp:880), pid=25410, tid=25515
        # assert(held_monitor_count() == jni_monitor_count()) failed: held monitor count should be equal to jni: 1 != 0
        #
        # JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.jdk22u)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.jdk22u, compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x3325baf] JavaThread::exit(bool, JavaThread::ExitType)+0xccf
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        java -Xcomp -XX:CompileCommand="compileonly,compiler.c1.Test8267042::write" compiler.c1.Test8267042

        ACTUAL -
        CompileCommand: compileonly compiler/c1/Test8267042.write bool compileonly = true
        Starting test
        read() before wait
        read() after wait
        read() before wait
        read() after wait
        read() before wait
        read() after wait
        read() before wait
        read() after wait
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/repository/jdk22u/src/hotspot/share/runtime/javaThread.cpp:880), pid=25410, tid=25515
        # assert(held_monitor_count() == jni_monitor_count()) failed: held monitor count should be equal to jni: 1 != 0
        #
        # JRE version: OpenJDK Runtime Environment (22.0) (fastdebug build 22-internal-adhoc.jdk22u)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 22-internal-adhoc.jdk22u, compiled mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x3325baf]Test passed
          JavaThread::exit(bool, JavaThread::ExitType)+0xccf
        #
        # 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/repository/toreport/Test8267042_11_13_22_51_01/hs_err_pid25410.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #

        ---------- BEGIN SOURCE ----------
        The source code file and hs_err file are available at the URL:
        https://drive.google.com/file/d/1Ie3NupEt669LfE2DjCi2boFCRq3iXM3v/view?usp=drive_link

        The modifications I made are in the source code at line 101 through line 113
        ---------- END SOURCE ----------

        FREQUENCY : always


              kvn Vladimir Kozlov
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: