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

Out of order app classpath in AppCDS

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • None
    • tools
    • generic
    • linux

      Create on behalf of lingjun.cg@alibaba-inc.com

      Some Java applications use wildcard classpaths like this:
      java -cp "lib/*", JVM expand "lib/*" to concrete a jar list by call readdir() on linux.
      But the file order that is returned by readdir() is undefined, it depends on the underlying filesystem.
      Suppose this case:
      1. Dump AppCDS archive on a host, the classpath expand to: a.jar,b.jar,c.jar...
      2. Copy the previous archive to other hosts, then use shared space,
          but the classpath may expand to: b.jar:c.jar:a.jar
      3. AppCDS check app classpath mismatch and report error
      "shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)".

      Because of the undefined order of readdir(), so the "lib/*" order is undefined also.

            Unassigned Unassigned
            syan Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: