Reputation: 11
The command criu restore
crashes with a segmentation fault when running the documentation example.
I've installed CRIU using sudo apt-get install criu
on my Ubuntu 22.04.4 LTS Jammy computer.
In addition, I've seen that one should set some additional variables: sudo setcap cap_checkpoint_restore+eip /usr/sbin/criu
.
In the example, I have a file called test.sh
that contains the following:
#!/bin/sh
while :; do
sleep 1
date
done
I'm running it in a different process:
$ ./test.sh &
> [1] 281699
> sam. 27 juil. 2024 09:24:52 CEST
> ...
Then I dump the process: sudo criu dump -t 281699 -v4 -o dump.log -D test_criu/ --shell-job
and I guess it worked fine as dump.log
ends with (00.063286) Dumping finished successfully
.
Finally, when I try to restore the process sudo criu restore --shell-job -D test_criu/ -v2 -o restore.log
it returns:
281699: Error (criu/cr-restore.c:1480): 281777 killed by signal 11: Segmentation fault
Error (criu/cr-restore.c:2447): Restoring FAILED.
Error (criu/cr-restore.c:1480): 281699 killed by signal 9: Killed
The final project is to be able to use it in docker where I experience the same problem.
Does someone have any idea why CRIU does not restore the process as intended?
Upvotes: 1
Views: 216