TravaOpenJDK / trava-jdk-11-dcevm

dcevm-11 built on Travis
Apache License 2.0
403 stars 56 forks source link

Internal error with option -Xshare:dump on Windows #6

Closed michelou closed 5 years ago

michelou commented 5 years ago

Using TravaOpenJDK version Dcevm-11.0.1+7 (2019-01-01) on Windows:

> bin\java -version
Starting HotswapAgent 'c:\opt\jdk-dcevm-11.0.1\lib\hotswap\hotswap-agent.jar'
HOTSWAP AGENT: 13:29:16.318 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 13:29:17.199 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket]
openjdk version "11.0.1.6" 2018-12-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.1.6+7-201901011603)
Dynamic Code Evolution 64-Bit Server VM AdoptOpenJDK (build 11.0.1.6+7-201901011603, mixed mode)

I get the following internal error with option -Xshare:dump:

> bin\java -Xshare:dump                                                                                                
Starting HotswapAgent 'c:\opt\jdk-dcevm-11.0.1\lib\hotswap\hotswap-agent.jar'                                          
narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3                                                         
Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000                                                
Allocated shared space: 3221225472 bytes at 0x0000000800000000                                                         
HOTSWAP AGENT: 13:29:29.164 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.1-SNAPSHOT} - unlimited 
runtime class redefinition.                                                                                            
HOTSWAP AGENT: 13:29:32.336 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin
, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2,
 Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb
, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket]                      
Loading classes to share ...                                                                                           
Loading classes to share: done.                                                                                        
Rewriting and linking classes ...                                                                                      
Rewriting and linking classes: done                                                                                    
Number of classes 1821                                                                                                 
    instance classes   =  1673                                                                                         
    obj array classes  =   140                                                                                         
    type array classes =     8                                                                                         
Updating ConstMethods ... done.                                                                                        
#                                                                                                                      
# A fatal error has been detected by the Java Runtime Environment:                                                     
#                                                                                                                      
#  Internal Error (c:/Users/travis/build/TravaOpenJDK/trava-jdk-11-dcevm/openjdk-build/workspace/build/src/src/hotspot/
share/memory/metaspaceShared.cpp:1624), pid=274972, tid=240396                                                         
#  guarantee(ik->loader_type() != 0) failed: Class loader type must be set for this class com/sun/proxy/$Proxy0        
#                                                                                                                      
# JRE version: OpenJDK Runtime Environment (11.0.1.6+7) (build 11.0.1.6+7-201901011603)                                
# Java VM: Dynamic Code Evolution 64-Bit Server VM (11.0.1.6+7-201901011603, interpreted mode, compressed oops, serial 
gc, windows-amd64)                                                                                                     
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows                     
#                                                                                                                      
# An error report file with more information is saved as:                                                              
# c:\opt\jdk-dcevm-11.0.1\hs_err_pid274972.log                                                                         
#                                                                                                                      
# If you would like to submit a bug report, please visit:                                                              
#   https://github.com/AdoptOpenJDK/openjdk-build/issues                                                               
#                                                                                                                      

The errorr report file looks as follows:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:/Users/travis/build/TravaOpenJDK/trava-jdk-11-dcevm/openjdk-build/workspace/build/src/src/hotspot/share/memory/metaspaceShared.cpp:1624), pid=274972, tid=240396
#  guarantee(ik->loader_type() != 0) failed: Class loader type must be set for this class com/sun/proxy/$Proxy0
#
# JRE version: OpenJDK Runtime Environment (11.0.1.6+7) (build 11.0.1.6+7-201901011603)
# Java VM: Dynamic Code Evolution 64-Bit Server VM (11.0.1.6+7-201901011603, interpreted mode, compressed oops, serial gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-build/issues
#

---------------  S U M M A R Y ------------

Command Line: -Xshare:dump 

Host: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 8 cores, 15G,  Windows 10 , 64 bit Build 17134 (10.0.17134.1)
Time: Wed Feb  6 13:29:35 2019 GMT+1 elapsed time: 7 seconds (0d 0h 0m 7s)

---------------  T H R E A D  ---------------

Current thread (0x000001c3fb6ed750):  VMThread "VM Thread" [stack: 0x000000c1dd200000,0x000000c1dd300000] [id=240396]

Stack: [0x000000c1dd200000,0x000000c1dd300000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000001c3f6fd0bad]

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x5dc29a]
V  [jvm.dll+0x710aaf]
V  [jvm.dll+0x71213b]
V  [jvm.dll+0x712765]
V  [jvm.dll+0x71271b]
V  [jvm.dll+0x5dbb83]
V  [jvm.dll+0x5dbf48]
C  [ntdll.dll+0x9f7dd]
C  [ntdll.dll+0xd856]
C  [ntdll.dll+0x9e70e]
C  0x000001c3f6fd0bad

VM_Operation (0x000000c1dd1ff7e8): PopulateDumpSharedSpace, mode: safepoint, requested by thread 0x000001c3edea82e0

---------------  P R O C E S S  ---------------

Threads class SMR info:
_java_thread_list=0x000001c3fc1e0a90, length=11, elements={
0x000001c3edea82e0, 0x000001c3fb70ec00, 0x000001c3fb713080, 0x000001c3fb7fb3b0,
0x000001c3fb7fcd80, 0x000001c3fb9f3910, 0x000001c3fbe1ace0, 0x000001c3fbe1b5a0,
0x000001c3fbe1be60, 0x000001c3fbe2e9b0, 0x000001c3fc6ad740
}

Java Threads: ( => current thread )
  0x000001c3edea82e0 JavaThread "main" [_thread_blocked, id=281768, stack(0x000000c1dd100000,0x000000c1dd200000)]
  0x000001c3fb70ec00 JavaThread "Reference Handler" daemon [_thread_blocked, id=272508, stack(0x000000c1dd300000,0x000000c1dd400000)]
  0x000001c3fb713080 JavaThread "Finalizer" daemon [_thread_blocked, id=292900, stack(0x000000c1dd400000,0x000000c1dd500000)]
  0x000001c3fb7fb3b0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=292024, stack(0x000000c1dd500000,0x000000c1dd600000)]
  0x000001c3fb7fcd80 JavaThread "Attach Listener" daemon [_thread_blocked, id=261304, stack(0x000000c1dd600000,0x000000c1dd700000)]
  0x000001c3fb9f3910 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=288820, stack(0x000000c1dd700000,0x000000c1dd800000)]
  0x000001c3fbe1ace0 JavaThread "FileSystemWatchService" daemon [_thread_in_native, id=262868, stack(0x000000c1dd800000,0x000000c1dd900000)]
  0x000001c3fbe1b5a0 JavaThread "HotSwap Watcher" daemon [_thread_blocked, id=292256, stack(0x000000c1dd900000,0x000000c1dda00000)]
  0x000001c3fbe1be60 JavaThread "HotSwap Dispatcher" daemon [_thread_blocked, id=286700, stack(0x000000c1dda00000,0x000000c1ddb00000)]
  0x000001c3fbe2e9b0 JavaThread "Thread-2" daemon [_thread_blocked, id=280256, stack(0x000000c1ddb00000,0x000000c1ddc00000)]
  0x000001c3fc6ad740 JavaThread "Service Thread" daemon [_thread_blocked, id=280236, stack(0x000000c1ddc00000,0x000000c1ddd00000)]

Other Threads:
=>0x000001c3fb6ed750 VMThread "VM Thread" [stack: 0x000000c1dd200000,0x000000c1dd300000] [id=240396]
  0x000001c3fbf4ae80 WatcherThread [stack: 0x000000c1ddd00000,0x000000c1dde00000] [id=290600]

Threads with active compile tasks:

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x000001c3edea5550] Threads_lock - owner thread: 0x000001c3fb6ed750

Heap address: 0x00000006c1a00000, size: 4070 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
Narrow klass base: 0x0000000800000000, Narrow klass shift: 3
Compressed class space size: 1073741824 Address: 0x00000008c0000000

Heap:
 def new generation   total 78656K, used 43419K [0x00000006c1a00000, 0x00000006c6f50000, 0x00000007166a0000)
  eden space 69952K,  62% used [0x00000006c1a00000, 0x00000006c4466e18, 0x00000006c5e50000)
  from space 8704K,   0% used [0x00000006c5e50000, 0x00000006c5e50000, 0x00000006c66d0000)
  to   space 8704K,   0% used [0x00000006c66d0000, 0x00000006c66d0000, 0x00000006c6f50000)
 tenured generation   total 174784K, used 0K [0x00000007166a0000, 0x0000000721150000, 0x00000007c0000000)
   the space 174784K,   0% used [0x00000007166a0000, 0x00000007166a0000, 0x00000007166a0200, 0x0000000721150000)
 Metaspace       used 12165K, capacity 12342K, committed 12544K, reserved 1060864K
  class space    used 1198K, capacity 1235K, committed 1280K, reserved 1048576K

Card table byte_map: [0x000001c3f9fd0000,0x000001c3fa7d0000] _byte_map_base: 0x000001c3f69c3000

Polling page: 0x000001c3edfa0000

Metaspace:

Usage:
  Non-class:     10.85 MB capacity,    10.71 MB ( 99%) used,   129.72 KB (  1%) free+waste,    10.75 KB ( <1%) overhead. 
      Class:      1.21 MB capacity,     1.17 MB ( 97%) used,    32.12 KB (  3%) free+waste,     4.19 KB ( <1%) overhead. 
       Both:     12.05 MB capacity,    11.88 MB ( 99%) used,   161.84 KB (  1%) free+waste,    14.94 KB ( <1%) overhead. 

Virtual space:
  Non-class space:       12.00 MB reserved,      11.00 MB ( 92%) committed 
      Class space:        1.00 GB reserved,       1.25 MB ( <1%) committed 
             Both:        1.01 GB reserved,      12.25 MB (  1%) committed 

Chunk freelists:
   Non-Class:  3.63 KB
       Class:  1.63 KB
        Both:  5.25 KB

CodeCache: size=49152Kb used=487Kb max_used=487Kb free=48664Kb
 bounds [0x000001c3f6fd0000, 0x000001c3f7240000, 0x000001c3f9fd0000]
 total_blobs=393 nmethods=0 adapters=341
 compilation: disabled (interpreter mode)
              stopped_count=0, restarted_count=0
 full_count=0

Compilation events (0 events):
No events

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Classes redefined (0 events):
No events

Internal exceptions (0 events):
No events

Events (10 events):
Event: 7.215 loading class org/hotswap/agent/javassist/bytecode/SignatureAttribute$NestedClassType done
Event: 7.221 loading class java/lang/ClassFormatError
Event: 7.226 loading class java/lang/ClassFormatError done
Event: 7.228 loading class org/hotswap/agent/javassist/CtConstructor
Event: 7.228 loading class org/hotswap/agent/javassist/CtConstructor done
Event: 7.246 loading class org/hotswap/agent/javassist/CtField
Event: 7.246 loading class org/hotswap/agent/javassist/CtField done
Event: 7.258 loading class org/hotswap/agent/javassist/compiler/ProceedHandler
Event: 7.258 loading class org/hotswap/agent/javassist/compiler/ProceedHandler done
Event: 7.304 Executing VM operation: PopulateDumpSharedSpace

Dynamic libraries:
0x00007ff68a370000 - 0x00007ff68a3ba000     c:\opt\jdk-dcevm-11.0.1\bin\java.exe
0x00007ffc440f0000 - 0x00007ffc442d1000     C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffc34b60000 - 0x00007ffc34b72000     C:\Program Files\AVG\Antivirus\aswhook.dll
0x00007ffc41d00000 - 0x00007ffc41db2000     C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffc40a70000 - 0x00007ffc40ce3000     C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffc41f40000 - 0x00007ffc420d0000     C:\WINDOWS\System32\USER32.dll
0x00007ffc40810000 - 0x00007ffc40830000     C:\WINDOWS\System32\win32u.dll
0x00007ffc41cd0000 - 0x00007ffc41cf8000     C:\WINDOWS\System32\GDI32.dll
0x00007ffc405c0000 - 0x00007ffc40752000     C:\WINDOWS\System32\gdi32full.dll
0x00007ffc40cf0000 - 0x00007ffc40d8f000     C:\WINDOWS\System32\msvcp_win.dll
0x00007ffc404c0000 - 0x00007ffc405ba000     C:\WINDOWS\System32\ucrtbase.dll
0x00007ffc33820000 - 0x00007ffc33a89000     C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.523_none_fb409dd930672a56\COMCTL32.dll
0x00007ffc42a30000 - 0x00007ffc42ace000     C:\WINDOWS\System32\msvcrt.dll
0x00007ffc420d0000 - 0x00007ffc423f2000     C:\WINDOWS\System32\combase.dll
0x00007ffc41a50000 - 0x00007ffc41b74000     C:\WINDOWS\System32\RPCRT4.dll
0x00007ffc41500000 - 0x00007ffc4157a000     C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffc41720000 - 0x00007ffc4174d000     C:\WINDOWS\System32\IMM32.DLL
0x000000007e110000 - 0x000000007e1e5000     C:\opt\conEmu\ConEmu\ConEmuHk64.dll
0x00007ffc3b1e0000 - 0x00007ffc3b1f5000     c:\opt\jdk-dcevm-11.0.1\bin\vcruntime140.dll
0x00007ffc22d90000 - 0x00007ffc22e2b000     c:\opt\jdk-dcevm-11.0.1\bin\msvcp140.dll
0x00007ffbf2c10000 - 0x00007ffbf36cc000     c:\opt\jdk-dcevm-11.0.1\bin\server\jvm.dll
0x00007ffc41750000 - 0x00007ffc417f1000     C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffc44060000 - 0x00007ffc440bb000     C:\WINDOWS\System32\sechost.dll
0x00007ffc43ff0000 - 0x00007ffc43ff8000     C:\WINDOWS\System32\PSAPI.DLL
0x00007ffc2ed90000 - 0x00007ffc2ed99000     C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffc42400000 - 0x00007ffc4246c000     C:\WINDOWS\System32\WS2_32.dll
0x00007ffc3bfc0000 - 0x00007ffc3bfe3000     C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffc3f550000 - 0x00007ffc3f55a000     C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffc3bf90000 - 0x00007ffc3bfba000     C:\WINDOWS\SYSTEM32\WINMMBASE.dll
0x000001c3ede20000 - 0x000001c3ede69000     C:\WINDOWS\System32\cfgmgr32.dll
0x00007ffc40460000 - 0x00007ffc40471000     C:\WINDOWS\System32\kernel.appcore.dll
0x00007ffc3b4f0000 - 0x00007ffc3b500000     c:\opt\jdk-dcevm-11.0.1\bin\verify.dll
0x00007ffc3eec0000 - 0x00007ffc3f089000     C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007ffc38880000 - 0x00007ffc388a9000     C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007ffc24520000 - 0x00007ffc24548000     c:\opt\jdk-dcevm-11.0.1\bin\java.dll
0x00007ffc22d50000 - 0x00007ffc22d83000     c:\opt\jdk-dcevm-11.0.1\bin\instrument.dll
0x00007ffc33580000 - 0x00007ffc33596000     c:\opt\jdk-dcevm-11.0.1\bin\zip.dll
0x00007ffc3afe0000 - 0x00007ffc3afea000     c:\opt\jdk-dcevm-11.0.1\bin\jimage.dll
0x00007ffc42ad0000 - 0x00007ffc43f10000     C:\WINDOWS\System32\SHELL32.dll
0x00007ffc41800000 - 0x00007ffc418a9000     C:\WINDOWS\System32\shcore.dll
0x00007ffc40d90000 - 0x00007ffc4149d000     C:\WINDOWS\System32\windows.storage.dll
0x00007ffc418b0000 - 0x00007ffc41901000     C:\WINDOWS\System32\shlwapi.dll
0x00007ffc40480000 - 0x00007ffc4049f000     C:\WINDOWS\System32\profapi.dll
0x00007ffc40410000 - 0x00007ffc4045c000     C:\WINDOWS\System32\powrprof.dll
0x00007ffc40400000 - 0x00007ffc4040a000     C:\WINDOWS\System32\FLTLIB.DLL
0x00007ffc32830000 - 0x00007ffc32849000     C:\opt\jdk-dcevm-11.0.1\bin\net.dll
0x00007ffc34ea0000 - 0x00007ffc34f7d000     C:\WINDOWS\SYSTEM32\WINHTTP.dll
0x00007ffc3fc30000 - 0x00007ffc3fc96000     C:\WINDOWS\system32\mswsock.dll
0x00007ffc32810000 - 0x00007ffc32822000     C:\opt\jdk-dcevm-11.0.1\bin\nio.dll

dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;c:\opt\jdk-dcevm-11.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\AVG\Antivirus;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17134.523_none_fb409dd930672a56;C:\opt\conEmu\ConEmu;c:\opt\jdk-dcevm-11.0.1\bin\server

VM Arguments:
jvm_args: -Xshare:dump 
java_command: <unknown>
java_class_path (initial): <not set>
Launcher Type: SUN_STANDARD

[Global flags]
     bool DumpSharedSpaces                         = true                                      {product} {command line}
   size_t InitialHeapSize                          = 268435456                                 {product} {ergonomic}
   size_t MaxHeapSize                              = 4267704320                                {product} {ergonomic}
   size_t MaxNewSize                               = 1422524416                                {product} {ergonomic}
   size_t MinHeapDeltaBytes                        = 196608                                    {product} {ergonomic}
   size_t NewSize                                  = 89456640                                  {product} {ergonomic}
    uintx NonProfiledCodeHeapSize                  = 0                                      {pd product} {ergonomic}
   size_t OldSize                                  = 178978816                                 {product} {ergonomic}
     bool ProfileInterpreter                       = false                                  {pd product} {command line}
    uintx ProfiledCodeHeapSize                     = 0                                      {pd product} {ergonomic}
     bool TieredCompilation                        = false                                  {pd product} {command line}
     bool UseCompressedClassPointers               = true                                 {lp64_product} {ergonomic}
     bool UseCompressedOops                        = true                                 {lp64_product} {ergonomic}
     bool UseLargePagesInMetaspace                 = false                                     {product} {ergonomic}
     bool UseLargePagesIndividualAllocation        = false                                  {pd product} {ergonomic}
     bool UseSerialGC                              = true                                      {product} {ergonomic}

Logging:
Log output configuration:
 #0: stdout all=warning uptime,level,tags
 #1: stderr all=off uptime,level,tags

Environment Variables:
PATH=c:\opt\jdk-dcevm-11.0.1\bin;C:\opt\conEmu\ConEmu\Scripts;C:\opt\conEmu;C:\opt\conEmu\ConEmu;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\user123\scoop\shims;C:\Users\user123\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
USERNAME=user123
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel

---------------  S Y S T E M  ---------------

OS: Windows 10 , 64 bit Build 17134 (10.0.17134.1)

CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma

Memory: 4k page, system-wide physical 16279M (3666M free)
TotalPageFile size 26905M (AvailPageFile size 7826M)
current process WorkingSet (physical memory assigned to process): 77M, peak: 77M
current process commit charge ("private bytes"): 292M, peak: 293M

vm_info: Dynamic Code Evolution 64-Bit Server VM (11.0.1.6+7-201901011603) for windows-amd64 JRE (11.0.1.6+7-201901011603), built on Jan  1 2019 16:31:53 by "travis" with unknown MS VC++:1916

END.
skybber commented 5 years ago

What kind of code modification you did? From stack trace it looks the problem is related to java proxy. What frameworks are you using?

michelou commented 5 years ago

Usage of option -Xshare:dump does not depend on any framework. As a reminder CDS helps reduce the startup time of Java applications as well as reduce their memory footprint.

In my case I wanted to generate file c:\opt\jdk-dcevm-11.0.1\bin\server\classes.jsa on Windows (see this report) before comparing your build of OpenJDK 11 with other builds (see this wip).

PS. I'm experimenting with OpenJDK 11 alongside my contribution to the Dotty project.

skybber commented 5 years ago

Thanks and I'm sorry for misinterpreting your question. It looks the problem is the hotswap-agent.jar in lib/hotswap. The CDS is working without it. But it is strange that it complains on Proxy instance, which as I expect should not be part of CDS at all.

skybber commented 5 years ago

Fixed, thanks for reporting. I've disabled HotswapAgent if -Xshare:dump is presented in params.

https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/releases/tag/dcevm-11.0.1%2B8

michelou commented 5 years ago

Thanks. It looks fine now:

> c:\opt\jdk-dcevm-11.0.1\bin\java -Xshare:dump
[...]
Number of classes 1268
[...]
total    :  18142064 [100.0% of total] out of  18415616 bytes [ 98.5% used]

> dir c:\opt\jdk-dcevm-11.0.1\bin\server | findstr jsa
10.02.2019  17:59        18 481 152 classes.jsa

> c:\opt\jdk-dcevm-11.0.1\bin\java -version
Starting HotswapAgent 'c:\opt\jdk-dcevm-11.0.1\lib\hotswap\hotswap-agent.jar'
HOTSWAP AGENT: 18:01:52.543 INFO [...]
HOTSWAP AGENT: 18:01:52.765 INFO [...]
openjdk version "11.0.1.6" 2018-12-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.1.6+8-201902100759)
Dynamic Code Evolution 64-Bit Server VM AdoptOpenJDK (build 11.0.1.6+8-201902100759, mixed mode, sharing)

Flag sharing now appears on the last line when executing java -version.

skybber commented 5 years ago

Btw, I don't know if HotswapAgent is useful for Scala at all. Probably ClassInitPlugin and AnonymousClassPatch plugin could be useful, otherwise it is better to disable HotswapAgent.