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

Unable to run gtests with CDS enabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • b13

      Running gtests with -Xshare:on gives us a VM exit with
      "Unable to use shared archive"

      See:

      ```
      thomas@starfish$ ./hotspot/variant-server/libjvm/gtest/gtestLauncher -jdk:./images/jdk -Xshare:on -Xlog:cds*=debug
      Note: Google Test filter = Compressed*
      [==========] Running 8 tests from 1 test suite.
      [----------] Global test environment set-up.
      [----------] 8 tests from CompressedKlass
      [ RUN ] CompressedKlass.basics_vm
      [0.021s][info][cds] trying to map /shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa
      [0.021s][info][cds] Specified shared archive not found (/shared/projects/openjdk/jdk-jdk/output-fastdebug/images/jdk/lib/hotspot/classes.jsa)
      [0.021s][info][cds] Initialize static archive failed.
      [0.021s][info][cds] Unable to map shared spaces
      [0.021s][error][cds] An error has occurred while processing the shared archive file.
      [0.021s][error][cds] Unable to map shared spaces
      Error occurred during initialization of VM
      Unable to use shared archive.
      ```

      It would be quite useful to be able to use gtests with CDS on since VM setup is different with CDS, so different paths can get exercised.

      At first glance, this seems easily fixable; we just don't seem to be able to find the jsa files, but they already exist, just not under "lib/hotspot"

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

              Created:
              Updated:
              Resolved: