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

[TESTBUG] Some CDS tests don't respect JVM variant being tested

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      2 tests in particular fail when non-default JVM variant is being tested:
        runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
        runtime/SharedArchiveFile/NonBootLoaderClasses.java

      Proper flags are used when creating CDS archive, but aren't passed to the consequent JVM which tries to load the archive. Wrong JVM is used and archive loading fails due to JVM version mismatch.

      Excerpt from test log:
      Command line: [ .../bin/java -cp ... -XX:MaxRAMPercentage=6 -server -Xcomp -myjvmvariant -Xshare:dump -Xlog:cds,cds+hashtables -XX:SharedArchiveFile=./PrintSharedArchiveAndExit.jsa ]
      [ELAPSED: 2352 ms]
      [logging stdout to PrintSharedArchiveAndExit-0000-dump.stdout]
      [logging stderr to PrintSharedArchiveAndExit-0000-dump.stderr]
      [STDERR]

      Command line: [.../bin/java -cp ... -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=./PrintSharedArchiveAndExit.jsa -XX:+PrintSharedArchiveAndExit -version ]
      [ELAPSED: 32 ms]
      [logging stdout to PrintSharedArchiveAndExit-0001-print-shared-archive-and-version.stdout]
      [logging stderr to PrintSharedArchiveAndExit-0001-print-shared-archive-and-version.stderr]
      [STDERR]
      An error has occurred while processing the shared archive file.
      The shared archive file was created by a different version or build of HotSpot
        

        Attachments

          Activity

            People

            Assignee:
            ccheung Calvin Cheung
            Reporter:
            vlivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: