Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202854 Hybrid archiving
  3. JDK-8199807

AppCDS performs overly restrictive path matching check

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 9, 10, 11
    • hotspot
    • b15

        In JDK 11 (and all prior versions), the path matching check performed by AppCDS is overly restrictive, which invalidates a previously generated archive unnecessarily in certain cases.

        Following is one use case that is currently prohibited by the overly restrictive path matching check:

        1. Dump the shared archive with -Xshare:dump using a specific JDK 11 image
        2. Copy the JDK image and generated archive to another device (with different path) or another location
        3. Run with -Xshare:on or -Xshare:auto using the same JDK image and archive

        The shared archive generated by step 1 can not be used by step 3. With -Xshare:on, the following error is reported:

        An error has occurred while processing the shared archive file.
        shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)
        Error occurred during initialization of VM
        Unable to use shared archive.

        NOTE: The check is only done when -XX:+UseAppCDS is enabled, and not with the basic CDS.

              jiangli Jiangli Zhou
              jiangli Jiangli Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: