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

java.exe -Xshare:on failed in Windows command window if the CDS archive was created under cygwin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9
    • 8u40, 9
    • hotspot
    • x86
    • windows

      (or vice versa).

      See http://stackoverflow.com/questions/3264665/c-stat-and-daylight-savings

      *** first do this inside Cygwin window ***
      pc /cygdrive/d/tmp/jdk1.8.0_40$ bin/java -Xshare:dump
      Allocated shared space: 27394048 bytes at 0x14600000
      Loading classes to share ...
      Preload Warning: Cannot find javax/swing/JComponent$2
      Preload Warning: Cannot find javax/swing/RepaintManager$1$1
      Preload Warning: Cannot find javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue
      Preload Warning: Cannot find javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1
      Preload Warning: Cannot find javax/swing/text/AbstractDocument$InsertStringResult
      Preload Warning: Cannot find sun/awt/windows/WToolkit$3$1
      Preload Warning: Cannot find sun/java2d/Disposer$2
      Preload Warning: Cannot find sun/java2d/d3d/D3DScreenUpdateManager$1
      Preload Warning: Cannot find sun/java2d/d3d/D3DScreenUpdateManager$1$1
      Loading classes to share: done.
      Rewriting and linking classes ...
      Rewriting and linking classes: done
      Number of classes 2383
          instance classes = 2369
          obj array classes = 6
          type array classes = 8
      Calculating fingerprints ... done.
      Removing unshareable information ... done.
      Shared Lookup Cache Table Buckets = 4108 bytes
      Shared Lookup Cache Table Body = 50352 bytes
      ro space: 6009512 [ 48.9% of total] out of 12582912 bytes [47.8% used] at 0x14600000
      rw space: 5467544 [ 44.5% of total] out of 12582912 bytes [43.5% used] at 0x15200000
      md space: 772336 [ 6.3% of total] out of 2097152 bytes [36.8% used] at 0x15e00000
      mc space: 34032 [ 0.3% of total] out of 131072 bytes [26.0% used] at 0x16000000
      total : 12283424 [100.0% of total] out of 27394048 bytes [44.8% used]
      pc /cygdrive/d/tmp/jdk1.8.0_40$ bin/java -Xshare:on -version
      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
      Java HotSpot(TM) Client VM (build 25.40-b25, mixed mode, sharing)

      *** then do this in a CMD window ***

      D:\tmp\jdk1.8.0_40>bin\java -Xshare:on -version
      An error has occurred while processing the shared archive file.
      shared class paths mismatch (hint: enable -XX:+TraceClassPaths to diagnose the failure)
      Error occurred during initialization of VM
      Unable to use shared archive.

      *** re-dumping the archive inside the CMD window fixes it ***

      D:\tmp\jdk1.8.0_40>bin\java -Xshare:dump
      Allocated shared space: 27394048 bytes at 0x14800000
      Loading classes to share ...
      Preload Warning: Cannot find javax/swing/JComponent$2
      Preload Warning: Cannot find javax/swing/RepaintManager$1$1
      Preload Warning: Cannot find javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue
      Preload Warning: Cannot find javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1
      Preload Warning: Cannot find javax/swing/text/AbstractDocument$InsertStringResult
      Preload Warning: Cannot find sun/awt/windows/WToolkit$3$1
      Preload Warning: Cannot find sun/java2d/Disposer$2
      Preload Warning: Cannot find sun/java2d/d3d/D3DScreenUpdateManager$1
      Preload Warning: Cannot find sun/java2d/d3d/D3DScreenUpdateManager$1$1
      Loading classes to share: done.
      Rewriting and linking classes ...
      Rewriting and linking classes: done
      Number of classes 2383
          instance classes = 2369
          obj array classes = 6
          type array classes = 8
      Calculating fingerprints ... done.
      Removing unshareable information ... done.
      Shared Lookup Cache Table Buckets = 4108 bytes
      Shared Lookup Cache Table Body = 50352 bytes
      ro space: 6009512 [ 48.9% of total] out of 12582912 bytes [47.8% used] at 0x14800000
      rw space: 5467544 [ 44.5% of total] out of 12582912 bytes [43.5% used] at 0x15400000
      md space: 772336 [ 6.3% of total] out of 2097152 bytes [36.8% used] at 0x16000000
      mc space: 34032 [ 0.3% of total] out of 131072 bytes [26.0% used] at 0x16200000
      total : 12283424 [100.0% of total] out of 27394048 bytes [44.8% used]

      D:\tmp\jdk1.8.0_40>bin\java -Xshare:on -version
      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b27)
      Java HotSpot(TM) Client VM (build 25.40-b25, mixed mode, sharing)

      *** switch back to the cygwin window -- now it's broken in cygwin window ***

      pc /cygdrive/d/tmp/jdk1.8.0_40$ bin/java -Xshare:on -version
      Error occurred during initialization of VM
      Unable to use shared archive.
      An error has occurred while processing the shared archive file.
      shared class paths mismatch (hint: enable -XX:+TraceClassPaths to diagnose the failure)

      ===================
      pc /cygdrive/d/tmp/jdk1.8.0_40$ uname -a
      CYGWIN_NT-6.1-WOW64 xxxxx 1.7.31(0.272/5/3) 2014-07-25 11:08 i686 Cygwin

      Windows 7 Professional, Service Pack 1

            jiangli Jiangli Zhou
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: