Creating snapshots with dynamically loaded JARs

Anton Kozlov akozlov at azul.com
Wed Dec 7 16:46:44 UTC 2022


On 12/5/22 19:48, Nikola Grcevski wrote:
> It's actually our bug :), which I ported to the simple example, the
> Files.list() stream is never closed. Sorry for the noise.


Thanks for the example to play with. So after closing the stream for Files.list(), the dynamically loaded jar is marked "persistent" and the checkpoint is successful, right? It may be a bit of a problem that the checkpoint implicitly catches everything an application may open. Would it be useful to print all persistent jars, like [1]

Dec 07, 2022 6:32:21 PM jdk.internal.util.jar.PersistentJarFile beforeCheckpoint
INFO: Assuming persistent /home/anton/Downloads/openjdk_CRaC_simplemodule/./lib/ansi-console/jansi-2.4.0.jar
Dec 07, 2022 6:32:21 PM jdk.internal.util.jar.PersistentJarFile beforeCheckpoint
INFO: Assuming persistent /home/anton/Downloads/openjdk_CRaC_simplemodule/./lib/ansi-console/elasticsearch-ansi-console-8.7.0-SNAPSHOT.jar
Dec 07, 2022 6:32:21 PM jdk.internal.util.jar.PersistentJarFile beforeCheckpoint
INFO: Assuming persistent /home/anton/Downloads/openjdk_CRaC_simplemodule/target/simplemodule.jar
CR: Checkpoint ...
Killed

I'm not a big fan of persistent files, but while they are there, some additional information should at least make assumptions that got into the image more visible.

[1] https://github.com/AntonKozlov/crac/commit/492fb87e8371529750701969604a863cacadf724

Thanks,
Anton


More information about the crac-dev mailing list