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

AppCDS performs overly restrictive path matching check

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10, 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b15

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: