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

JVM crash with -XX:+DumpSharedSpaces

XMLWordPrintable

    • b23
    • 10
    • b27

        The JVM always crashes if running with '-XX:+DumpSharedSpaces'.
        Issue reproduced with
        - 10.0.0+43 (First JDK 10 release) and later,
        - for example, 11.0.2+7, 12-ea+10

        Issue not reproduced with
        - 9.0.4+11 (Last JDK 9 update) and earlier

        Adding '-XX:-UseCompiler' or '-Xshare:dump' can work around the issue.

        I assume the issue was caused by the fix although not still verified much:
        JDK-8186842: Use Java class loaders for creating the CDS archive
        This fix was integrated to 10-ea+23, and 10-ea+22 doesn't crash with the
        option -XX:+DumpSharedSpaces.

        $ java -XX:+DumpSharedSpaces
        narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
        Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000
        Allocated shared space: 3221225472 bytes at 0x0000000800000000
        Loading classes to share ...
        Loading classes to share: done.
        Rewriting and linking classes ...
        Rewriting and linking classes: done
        Number of classes 1229
            instance classes = 1168
            obj array classes = 53
            type array classes = 8
        Updating ConstMethods ... done.
        Removing unshareable information ... #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (instanceKlass.cpp:2288), pid=28024, tid=28031
        # guarantee(_dep_context == DependencyContext::EMPTY) failed: must be
        #
        # JRE version: Java(TM) SE Runtime Environment (11.0.2+7) (build
        11.0.2+7-LTS)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0.2+7-LTS, mixed mode,
        tiered, compressed oops, g1 gc, linux-amd64)
        # Core dump will be written. Default location: Core dumps may be processed
        with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I %h" (or dumping
        to core.28024)
        #
        # An error report file with more information is saved as:
        # /home/yoshiki/hs_err_pid28024.log
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        #
        zsh: abort (core dumped) java -XX:+DumpSharedSpaces

              ccheung Calvin Cheung
              shadowbug Shadow Bug
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: