Unable to create snapshots with Java modules

Anton Kozlov akozlov at azul.com
Tue Nov 29 16:11:11 UTC 2022


On 11/29/22 00:04, Nikola Grcevski wrote:
> However, if I try the same thing with the modules usage, the snapshot
> creation fails:
> ~/work/simplemodule$ /<path>/openjdk-17-crac+3_linux-x64/bin/java
> -XX:CRaCCheckpointTo=/tmp/simple --module-path lib --module
> simplemodule/co.elastic.simple.SimpleModule

Hi Nikola,

I've reproduced the problem. It seems JDK misses a piece of code for modules that is there for class loaders. It looks easy to fix, I'm looking at this.

Meanwhile, while you're experimenting, you may disable CheckpointException by -XX:+UnlockExperimentalVMOptions -XX:-CRDoThrowCheckpointException. Of course, it's not recommended for anything beyond experiments :)

Thanks,
Anton


More information about the crac-dev mailing list