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

Launching java with "-Xlog:gc*=trace,safepoint*=trace,class*=trace" crashes the JVM

XMLWordPrintable

    • b17

        Consider the following trivial command:

        java "-Xlog:gc*=trace,safepoint*=trace,class*=trace" -version

        This results in a JVM crash:

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (logOutput.cpp:266), pid=16136, tid=9219
        # guarantee(n_selections > 0) failed: Cannot find maximal selection.
        #
        # JRE version: (17.0.2+8) (build )
        # Java VM: OpenJDK 64-Bit Server VM (17.0.2+8-86, mixed mode, sharing, tiered, unknown gc, bsd-aarch64)
        # 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:
        # /private/tmp/hs_err_pid16136.log
        #
        #

        The complete hs_err log is attached to this issue.

        The above error was reproduced on a Mac M1 with 12.2.1 version of the OS, against a Java 17 instance. This is also reproducible against latest master branch of JDK.

        Do note that it's the combination of gc, class and safepoint tags which triggers this. Using each of them individually (like gc*=trace) or as a couple (like gc*=trace,safepoint*=trace) doesn't cause any crash.

              dholmes David Holmes
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: