[CRIU] Help dumping and restoring a process

Adrian Reber adrian at lisas.de
Tue Aug 21 12:50:34 MSK 2018


On Sat, Aug 18, 2018 at 02:32:03AM +0000, Jose Atiles wrote:
> Hi, I'm interested in using criu to do debugging in games, saving a checkpoint to recreate bugs. Also to provide saving to games who do not have this feature.
> My end target is saving a game that is being executed with wine. I'm currently using Linux mint 19 Mate 19.
> 
> I have tried to dump a process but have failed.
> Also, criu check --extra says Looks good.
> 
> I did a small test trying to checkpoint a calculator, a text editor and Firefox, but none seem to work. Can you provide me some usage examples? can you tell me one basic type of application which I could use to test CRIU?

Like Radostin said, you cannot checkpoint applications which are using
the GUI without running in VNC. Which makes it pretty unusable for
games. If the game would be two parts, one server without GUI and a
'dumb' GUI you could checkpoint the server. But I doubt any single
player game is written  like that.

> The following is my log file, please help me!
> 
> ies at mint:~$ sudo su
> [sudo] password for aries:
> root at mint:/home/aries# criu dump -D checkpoint -t 7909
> Warn  (criu/kerndat.c:659): Can't load /run/criu.kdat
> Error (criu/image.c:416): Can't open dir checkpoint: No such file or directory

That is easy. The destination directory does not exist.

> root at mint:/home/aries# criu dump -D /home/aries/Documents/test -t 7909
> Error (criu/namespaces.c:408): Can't dump nested net namespace for 8026
> Error (criu/namespaces.c:626): Can't make netns id
> Error (criu/cr-dump.c:1709): Dumping FAILED.
> root at mint:/home/aries# criu dump -D "/home/aries/Documents/test" -t 7909
> Error (criu/namespaces.c:408): Can't dump nested net namespace for 8026
> Error (criu/namespaces.c:626): Can't make netns id
> Error (criu/cr-dump.c:1709): Dumping FAILED.
> root at mint:/home/aries# criu dump -D /home/aries/Documents/test -t 7909
> Error (criu/namespaces.c:408): Can't dump nested net namespace for 8026
> Error (criu/namespaces.c:626): Can't make netns id
> Error (criu/cr-dump.c:1709): Dumping FAILED.
> root at mint:/home/aries# criu dump -D /home/aries/Documents/test -t 17604
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17604 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17608 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17609 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17610 with interrupted system call
> Error (criu/cr-dump.c:431): Task 17604 with SysVIPC shmem map @7fb97f613000 doesn't live in IPC ns
> Error (criu/cr-dump.c:1411): Dump mappings (pid: 17604) failed with -1
> Error (criu/cr-dump.c:1709): Dumping FAILED.

All those attempts failed. Would be interesting to know what you are
trying to dump. You also need to have all processes involved in IPC
communication be part of the checkpoint. Namespaces are an easy way to
solve this.

> root at mint:/home/aries# criu restore -d  -D /home/aries/Documents/test
> Error (criu/util.c:596): Can't read link of fd -404: No such file or directory
> Error (criu/protobuf.c:75): Unexpected EOF on (null)

All your attempts to restore a process make no sense as all checkpoint
attempts failed.

[...]

> root at mint:/home/aries# criu dump -D ./home/aries/Documents/test -t 17604
> Error (criu/image.c:416): Can't open dir ./home/aries/Documents/test: No such file or directory

This is just wrong usage of a directory path.

> root at mint:/home/aries# cd /home/aries/Documents/test
> root at mint:/home/aries/Documents/test# criu dump -D /home/aries/Documents/test -t 17604
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17604 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17608 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17609 with interrupted system call
> Warn  (compel/arch/x86/src/lib/infect.c:249): Will restore 17610 with interrupted system call
> Error (criu/cr-dump.c:431): Task 17604 with SysVIPC shmem map @7fb97f613000 doesn't live in IPC ns
> Error (criu/cr-dump.c:1411): Dump mappings (pid: 17604) failed with -1
> Error (criu/cr-dump.c:1709): Dumping FAILED.
> root at mint:/home/aries/Documents/test# criu check --extra
> Looks good.
> root at mint:/home/aries/Documents/test# test/zdtm.py run -a
> bash: test/zdtm.py: No such file or directory
> root at mint:/home/aries/Documents/test# cd ..
> root at mint:/home/aries/Documents# cd ..
> root at mint:/home/aries# cd ..
> root at mint:/home# cd ..
> root at mint:/# test/zdtm.py run -a
> bash: test/zdtm.py: No such file or directory
> root at mint:/# cd home
> root at mint:/home# test/zdtm.py run -a
> bash: test/zdtm.py: No such file or directory
> root at mint:/home# cd aries
> root at mint:/home/aries# test/zdtm.py run -a
> bash: test/zdtm.py: No such file or directory

Running zdtm also seems wrong unless you have installed CRIU from
source.

Please provide more details about the used CRIU version and the programs
you are trying to checkpoint.

		Adrian


More information about the CRIU mailing list