JDK-6991245 : "Mark mismatch while restoring from shared file." on windows-amd64 virtual host
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs20,7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,windows_7
  • CPU: generic
  • Submitted: 2010-10-12
  • Updated: 2012-02-01
  • Resolved: 2010-11-23
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
JDK 7 b113 successfully dumps shared archive on windows-amd64, but fails to use it:

$ ./java -Xshare:dump
Loading classes to share ... done.
Rewriting and unlinking classes ... done.
Calculating hash values for String objects .. done.
Calculating fingerprints ... done.
Removing unshareable information ... done.
Moving pre-ordered read-only objects to shared space at 0x000000006b110000 ... d
one.
Moving read-only objects to shared space at 0x000000006b638948 ... done.
Moving common symbols to shared space at 0x000000006b63b488 ... done.
Moving remaining symbols to shared space at 0x000000006b725120 ... done.
Moving string char arrays to shared space at 0x000000006b726a30 ... done.
Moving additional symbols to shared space at 0x000000006b7c7828 ... done.
Read-only space ends at 0x000000006b834e10, 7491088 bytes.
Moving pre-ordered read-write objects to shared space at 0x000000006bb10000 ...
done.
Moving read-write objects to shared space at 0x000000006c5c2ed8 ... done.
Moving String objects to shared space at 0x000000006c62dc18 ... done.
Read-write space ends at 0x000000006c694580, 12076416 bytes.
Updating references to shared objects ... done.

root@jfx-vm444 /cygdrive/c/local/common/jdk/baseline/windows-amd64/bin
$ ./java -Xshare:on -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b113)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b01, mixed mode, sharing)

root@jfx-vm444 /cygdrive/c/local/common/jdk/baseline/windows-amd64/bin
$ ./java -version
An error has occurred while processing the shared archive file.
Mark mismatch while restoring from shared file.
Error occurred during initialization of VM
Unable to use shared archive.

This error only happens on this particular machine, on other machines java -version seems to work and does not turn on sharing.
With b111 and earlier, -Xshare:dump would have failed:
.../bin/java -Xshare:dump
Error occurred during initialization of VM
Dumping a shared archive is not supported on the Server JVM.

This message actually means that it is not supported on 64-bit VM (see 6739899).