[CRIU] [PATCH] net/ip: print fd link of the image we fail to restore from

Andrew Vagin avagin at virtuozzo.com
Fri Aug 17 01:59:31 MSK 2018


On Wed, Aug 08, 2018 at 12:19:53PM +0300, Pavel Tikhomirov wrote:
> > These "ip addr restore < some_ip_addr_dump.img" fails because wrong
> > magic in image, it is 0x666f7270 but should be 0x47361222, may be we
> > somehow gave the wrong file to ip util?
> > 
> 
> Finally I got reproduce on my own travis test
> https://travis-ci.org/Snorch/criu/jobs/413103226 :
> 
> ========================= Run zdtm/static/env00 in ns
> ==========================
> Start test
> ./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST
> Run criu dump
> Run criu restore
> Fail RESTORE failed: Error(0): Unknown
> =[log]=> dump/zdtm/static/env00/85/1/restore.log
> ------------------------ grep Error ------------------------
> (00.000031) Version: 3.10 (gitid c3ba917)
> (00.000048) Running on travis-job-9486da43-0fa9-41cf-b230-af61bff5f2ac Linux
> 4.4.0-51-generic #72~14.04.1-Ubuntu SMP Thu Nov 24 19:22:30 UTC 2016 x86_64
> profiling:/home/travis/build/Snorch/criu/criu/sk-unix.gcda:Merge mismatch
> for function 26

Each time when a log contains such ^^^^ messages, criu fails with
random errors. I think we have some memory corruptions in this case.

I tried to fix this issue in this patch:

commit 3e66125e9bf2e1150eecf7f68bbb1234ef561009
Author: Andrei Vagin <avagin at virtuozzo.com>
Date:   Fri Mar 2 00:49:12 2018 +0300

    [v2] criu: add -fprofile-update=atomic for builds with gcov

But it doesn't help. Maybe you will have other ideas where problem is
and how to fix it.

> Magic mismatch (1 elems, 666f7270 magic)
>      1: Error (criu/util.c:834): exited, status=255
>      1: Error (criu/net.c:1732): IP tool failed on addr restore
>      1: Error (criu/net.c:1735): failed restore from image
> /home/travis/build/Snorch/criu/test/dump/zdtm/static/env00/85/1/ifaddr-9.img
>      1: Error (criu/util.c:1535): Can't wait or bad status: errno=0,
> status=65280
> (00.000048) Error (criu/mount.c:3273): mnt: Can't remove the directory
> /tmp/.criu.mntns.EsrXyB: No such file or directory
> (00.000048) Error (criu/cr-restore.c:2308): Restoring FAILED.
> ------------------------ ERROR OVER ------------------------
> ################# Test zdtm/static/env00 FAIL at CRIU restore
> ##################
> 
> The image file is right ifaddr-9.img, but why it has wrong magic, may be we
> did something wrong on dump? Will try adding more debug.


More information about the CRIU mailing list