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

JVM should print a warning message that -Xshare:on may cause VM to abort start-up

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P3
    • Resolution: Withdrawn
    • 9, 10
    • 11
    • hotspot

    Description

      CDS maps the archive file at a fixed address. On some platforms, especially Windows and 32-bit Linux, there's a chance that, with address space layout randomization, the CDS address may have been occupied by a system DLL before the JVM starts. In this case, CDS mapping will fail. -Xshare:auto continue to execute (with CDS enabled), but -Xshare:on will exit the JVM.

      The mapping failure is much more rare on 64-bit Linux, but nevertheless, in a production environment, you should use -Xshare:auto and not -Xshare:on.

      This behavior -Xshare:on option is very much a legacy feature that was not well designed.

      The JVM should at least print out a warning message. Or better, make -Xshare:on behave the same as -Xshare:auto (but a lot of our tests depend on the -Xshare:on failure mode), so doing that would require more work.

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: