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

C1: -XX:AbortVMOnException does not work if all methods in the call stack are compiled with C1 and there are no exception handlers

XMLWordPrintable

    • b03

        The method foo() in the attached Test.java throws MyException.

        $ java -XX:AbortVMOnException=MyException Test.java
        $ java -XX:AbortVMOnException=MyException -XX:-TieredCompilation Test.java

        successfully results in the expected VM assertion failure:

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/christian/jdk/open/src/hotspot/share/utilities/exceptions.cpp:544), pid=116514, tid=116515
        # fatal error: Saw MyException, aborting
        #
        # JRE version: Java(TM) SE Runtime Environment (17.0) (slowdebug build 17-internal+0-LTS-2021-03-25-1609321.christian...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 17-internal+0-LTS-2021-03-25-1609321.christian..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x8f6906] Exceptions::debug_check_abort(char const*, char const*)+0x8a

        However, running it with -Xcomp and C1 only (TieredStopAtLevel) will not abort the VM:

        $ java -XX:AbortVMOnException=MyException -Xcomp Test.java
        $ java -XX:AbortVMOnException=MyException -Xcomp -XX:TieredStopAtLevel=1,2,3 Test.java

        Exception in thread "main" MyException
        at Test.foo(Test.java:7)
        at Test.main(Test.java:3)

              dfenacci Damon Fenacci
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: