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

assert in MetaspaceShared::map_archives

XMLWordPrintable

    • b27

        Specifying both base and dynamic archives during runtime could result in the following assert if the base archive wasn't the one used for creating the dynamic archive.

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/ws/curr_jdk/open/src/hotspot/share/memory/metaspaceShared.cpp:2165), pid=21016, tid=21017
        # assert(static_mapinfo->mapping_end_offset() == dynamic_mapinfo->mapping_base_offset()) failed: no gap
        #
        # JRE version: (15.0) (fastdebug build )
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-internal+0-2020-04-27-2351581.cccheung..., mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x129e4b3] MetaspaceShared::map_archives(FileMapInfo*, FileMapInfo*, bool)+0x83

        Steps to reproduce:
        (Create a jar with Hello.class)
        jar cvf hello.jar Hello.class
        (Create a class list)
        java -cp hello.jar -XX:DumpLoadedClassList=mylist Hello
        (Create a base archive using the class list)
        java -cp hello.jar -Xshare:dump -XX:SharedArchiveFile=base.jsa -XX:ExtraSharedClassListFile=mylist Hello
        (Create a dynamic archive)
        java -cp hello.jar -XX:ArchiveClassesAtExit=dyn.jsa Hello

        Runtime
        -----------
        (Specify dynamic archive only, passed)
        java -XX:SharedArchiveFile=dyn.jsa -cp hello.jar -Xshare:on Hello
        Hello World
        (Specify both base and dynamic archives, failed)
        java -XX:SharedArchiveFile=base.jsa:dyn.jsa -cp hello.jar -Xshare:on Hello

              ccheung Calvin Cheung
              ccheung Calvin Cheung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: