Closed michelou closed 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?
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.
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.
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
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
.
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.
Using TravaOpenJDK version
Dcevm-11.0.1+7 (2019-01-01)
on Windows:I get the following internal error with option
-Xshare:dump
:The errorr report file looks as follows: