CheckpointException

Huseyin Akdogan hakdogan75 at gmail.com
Tue May 23 14:28:55 UTC 2023


Hi all,

I'm playing with CRaC through a simple example as follows:

private static int counter;

public static void main(String[] args) throws InterruptedException {

while (true){
System.out.println(String.format("%sth greetings from Istanbul", ++counter
));
Thread.sleep(1000);
}
}

javac org/jugistanbul/crac/Greetings.java
jar cfm greetings.jar manifest.txt org/jugistanbul/crac/Greetings.class

java -jar greetings.jar
1th greetings from Istanbul
2th greetings from Istanbul
3th greetings from Istanbul
...

everything as expected, then
java -XX:CRaCCheckpointTo=image -jar greetings.jar(or java
-XX:CRaCCheckpointTo=image -cp ./greetings.jar
org.jugistanbul.crac.Greetings)
jcmd greetings.jar JDK.checkpoint

getting this error

1th greetings from Istanbul
2th greetings from Istanbul
3th greetings from Istanbul
4th greetings from Istanbul
5th greetings from Istanbul
May 23, 2023 2:14:04 PM jdk.internal.util.jar.PersistentJarFile
beforeCheckpoint
INFO: /home/ubuntu/greetings/greetings.jar is recorded as always available
on restore
JVM: invalid info for restore provided: queued code -1
An exception during a checkpoint operation:
jdk.crac.CheckpointException
at java.base/jdk.crac.Core.checkpointRestore1(Core.java:141)
at java.base/jdk.crac.Core.checkpointRestore(Core.java:246)
at java.base/jdk.crac.Core.checkpointRestoreInternal(Core.java:262)
6th greetings from Istanbul
7th greetings from Istanbul
8th greetings from Istanbul
9th greetings from Istanbul
10th greetings from Istanbul

This is the line pointed to in the exception output:
https://github.com/openjdk/crac/blob/ed3efac0d047d7822203536df851ccdea585d8ac/src/java.base/share/classes/jdk/crac/Core.java#L141

However, the relevant line did not help me to have a clear idea of what the
problem was.

Any ideas to enlighten me?

java -version
openjdk version "17-crac" 2021-09-14
OpenJDK Runtime Environment (build 17-crac+5-19)
OpenJDK 64-Bit Server VM (build 17-crac+5-19, mixed mode, sharing)

uname -v
#26~22.04.1-Ubuntu SMP Mon Apr 24 01:58:15 UTC 2023

Sorry if this mail list is the wrong address to post the question and
ignore this message

Best
-- 
*Hüseyin Akdoğan*
Expert Software Consultant
<http://www.amazon.com/gp/product/1783987022?keywords=Elasticsearch%20indexing&qid=1452083482&ref_=sr_1_1&sr=8-1>
GitHub <https://github.com/hakdogan> Medium <https://hakdogan.medium.com/>
Foojay.io <https://foojay.io/today/author/huseyin-akdogan/> Dzone
<https://dzone.com/users/1161493/hakdogan.html> JavaAdvent
<https://www.javaadvent.com/author/hakdogan> Twitter
<https://twitter.com/hakdoganhoca> Linkedin
<http://tr.linkedin.com/in/hakdogan>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/crac-dev/attachments/20230523/33216815/attachment.htm>


More information about the crac-dev mailing list