[crac] RFR: Add Checkpoint timeout

Radim Vansa rvansa at openjdk.org
Fri Dec 8 14:15:44 UTC 2023


On Fri, 8 Dec 2023 09:14:19 GMT, KIRIYAMA Takuya <duke at openjdk.org> wrote:

> Java process sometimes hangs when checkpoint for some reasons.
> For example, this problems occurs if you specify certain options for CRAC_CRIU_OPTS.
> 
> 
> # export CRAC_CRIU_OPTS=-V
> # java -XX:CRaCCheckpointTo=/work/cp CRACTest
> CR: Checkpoint ...
> 
> CRACTest process is not killed and is waiting for checkpoint.
> 
> 
> # ls /work/cp
> cppath  perfdata
> 
> 
> To avoid this problem, I want to add the checkpoint timeout.
> Can I submit a pull request to this repository? I would like you to review this change.

You're right that it does not accept `jstack`; the VM is in a safepoint (blocking all Java threads) when it calls into CRIU. Also I think that `jps`/`jcmd` won't list it at all, because it has already unmapped the perfdata file which these tools rely upon. Practically the only way to get some info would be `gdb -p <pid>`, but that will work only if CRIU is not working on the process itself at that moment.

My question was about another options (something practical), that you might have used and made CRIU stuck, rather than successfully complete without shutting the process down. If it's really *only* about `-V` (or `--help` and alike...) I don't think it's worth.

-------------

PR Comment: https://git.openjdk.org/crac/pull/147#issuecomment-1847231096


More information about the crac-dev mailing list