Comments on: SpringBoot 3.2 + CRaC https://foojay.io/today/springboot-3-2-crac/ a place for friends of OpenJDK Wed, 30 Oct 2024 12:36:35 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Gerrit Grunwald https://foojay.io/today/springboot-3-2-crac/#comment-35865 Wed, 30 Oct 2024 12:36:35 +0000 https://foojay.io/?p=103276#comment-35865 One thing you should keep in mind when creating checkpoints is, that you should always save the checkpoint files to a clean folder. Meaning to say, you need to either wipe out the existing checkpoint or store it in a new folder. Otherwise you might get a mix of different checkpoints in one folder which will lead to problems.

]]>
By: João Esperancinha https://foojay.io/today/springboot-3-2-crac/#comment-35504 Wed, 23 Oct 2024 08:46:29 +0000 https://foojay.io/?p=103276#comment-35504 Hi there Gerrit!
Thanks for this great read! I am struggling with on particular issue with the latest Spring version and the latest JDK 21 on Linux. I can’t seem to get a second checkpoint to work. I’m using java 21.0.4.crac-zulu and spring boot 3.3.4. The error I’m getting on a second restore is: Using java version 21.0.4.crac-zulu in this shell.
23620: Error (criu/files-reg.c:2097): File home/**/crac-service-java/tmp_checkpoint/pages-1.img has bad size 864256 (expect 101888000)
23620: Error (criu/mem.c:1359): `- Can’t open vma
Error (criu/cr-restore.c:2605): Restoring FAILED.
make: *** [Makefile:32: start-checkpoint] Error 1

I’m sure this has to work in some way, but I came across this problem in the versions I pointed out.

]]>
By: Spring Boot 3.2 + CRaC = 王炸!-牛翰网 https://foojay.io/today/springboot-3-2-crac/#comment-33011 Tue, 27 Aug 2024 17:31:35 +0000 https://foojay.io/?p=103276#comment-33011 […] ENDJava后端开发 喜欢就支持一下吧点赞15 分享QQ空间微博QQ好友海报分享复制链接收藏 猿柒关注 108105301.1W+3.8W+ visual studio […]

]]>
By: Paul Pham https://foojay.io/today/springboot-3-2-crac/#comment-17532 Thu, 15 Feb 2024 12:15:25 +0000 https://foojay.io/?p=103276#comment-17532 My code:
https://github.com/hoangphuc2k/graalvm-demo

]]>
By: Paul Pham https://foojay.io/today/springboot-3-2-crac/#comment-17529 Thu, 15 Feb 2024 12:04:36 +0000 https://foojay.io/?p=103276#comment-17529 Hello,
I try on a demo app using a simple controller calling a JPA object in the database Postgres. I get errors:

org.springframework.context.ApplicationContextException: Failed to take CRaC checkpoint on refresh

Caused by: org.crac.CheckpointException: null

Suppressed: jdk.internal.crac.impl.CheckpointOpenSocketException: tcp localAddr 192.168.107.3 localPort 56378 remoteAddr 192.168.107.2 remotePort 5432
Can you help me

]]>
By: Magnus Larsson https://foojay.io/today/springboot-3-2-crac/#comment-17122 Wed, 07 Feb 2024 09:54:52 +0000 https://foojay.io/?p=103276#comment-17122 If you forgot to run the commands:

sudo chown root:root $JAVA_HOME/lib/criu
sudo chmod u+s $JAVA_HOME/lib/criu

You will get an NPE.

Look into the file tmp_checkpoint/dump4.log, if it ends with:

(00.032388) Warn (compel/src/lib/infect.c:129): Unable to interrupt task: 11368 (Operation not permitted)
(00.032398) Unlock network
(00.032408) Unfreezing tasks into 1
(00.032409) Unseizing 11368 into 1
(00.032410) Error (compel/src/lib/infect.c:358): Unable to detach from 11368: No such process
(00.032417) Error (criu/cr-dump.c:2063): Dumping FAILED.

Then you know 🙂

]]>
By: ron https://foojay.io/today/springboot-3-2-crac/#comment-16688 Sun, 28 Jan 2024 07:16:10 +0000 https://foojay.io/?p=103276#comment-16688 Hello Gerrit, what tool did you use to determine the exact startup time in ms. and generate a graph/plot for visual

]]>
By: Gerrit Grunwald https://foojay.io/today/springboot-3-2-crac/#comment-14984 Wed, 13 Dec 2023 13:11:31 +0000 https://foojay.io/?p=103276#comment-14984 In reply to Ciro.

If somehow possible, could you maybe share the code that produces the problem? In this case we could try to reproduce it to get a better undestanding what went wrong.

]]>
By: Gerrit Grunwald https://foojay.io/today/springboot-3-2-crac/#comment-14983 Wed, 13 Dec 2023 13:10:34 +0000 https://foojay.io/?p=103276#comment-14983 In reply to Grégoire.

Hi there, sorry to hear you ran into trouble, because you said it is a demo app, would it be possible to share the code so that we could reproduce the problem and take a look at it?

]]>
By: Ciro https://foojay.io/today/springboot-3-2-crac/#comment-14650 Sun, 03 Dec 2023 15:10:18 +0000 https://foojay.io/?p=103276#comment-14650 I have the same issue of Grégoire.

Suppressed: jdk.internal.crac.impl.CheckpointOpenSocketException: tcp localAddr 172.18.0.6 localPort 46868 remoteAddr 172.18.0.3 remotePort 6379
at java.base/jdk.internal.crac.Core.translateJVMExceptions(Core.java:91)
at java.base/jdk.internal.crac.Core.checkpointRestore1(Core.java:145)
at java.base/jdk.internal.crac.Core.checkpointRestore(Core.java:246)
at java.base/jdk.internal.crac.Core.checkpointRestore(Core.java:231)
at jdk.crac/jdk.crac.Core.checkpointRestore(Core.java:70)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.crac.Core$Compat.checkpointRestore(Core.java:141)
… 18 common frames omitted
Suppressed: jdk.internal.crac.impl.CheckpointOpenSocketException: socket:[272072]

]]>