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

JVM failed with "Unable to unmap shared space" even when -Xshare:on is specified.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 9
    • 9
    • hotspot

      When -Xshare:auto is specified, the JVM should try to map the CDS archive. If the mapping fails, it should continue run without the archive. However, we have a failure:

      Command line: [C:\\...\\nightly\\fastdebug\\rt_baseline\\windows-amd64\\bin\\java.exe -server -Xshare:auto -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=./sample.jsa -XX:+PrintSharedSpaces -version ]
      ----------System.err:(34/1335)----------
       stdout: [UseSharedSpaces: %s
      Error occurred during initialization of VM
      Unable to use shared archive.
      ];
       stderr: [An error has occurred while processing the shared archive file.
      Unable to unmap shared space.
      ]
       exitValue = 1

       stdout: [UseSharedSpaces: %s
      Error occurred during initialization of VM
      Unable to use shared archive.
      ];
       stderr: [An error has occurred while processing the shared archive file.
      Unable to unmap shared space.
      ]
       exitValue = 1

      java.lang.RuntimeException: Expected to get exit value of [0]

      at com.oracle.java.testlibrary.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:308)
      at XShareAuto.main(XShareAuto.java:69)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
      at java.lang.Thread.run(Thread.java:745)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

      JavaTest Message: shutting down test

            hseigel Harold Seigel (Inactive)
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: