[CRIU] problem restoring process with alternate rootfs

Pavel Emelyanov xemul at parallels.com
Thu Jul 10 02:26:26 PDT 2014


On 07/10/2014 05:56 AM, Tycho Andersen wrote:
> Hi all,
> 
> I'm having a problem restoring a process with an alternate root mount.
> It has a /proc/$pid/mountinfo entry like:
> 
> 66 40 253:1 /var/lib/lxc/u1/rootfs / rw,relatime - ext4 /dev/disk/by-uuid/86de4daf-7810-4422-804f-d1ab23ffd9fa rw,data=ordered
> 
> and when I try to restore it I get:
> 
> Error (files-reg.c:748): File /lib/x86_64-linux-gnu/libjson-c.so.2.0.0 has bad size 43464 (expect 39328)

Wow, what a useful sanity check it appears to be! :)

> libjson is 43k on my host and 39k in the lxc rootfs, so it seems criu
> is trying to mmap the host's libjson instead of the container's. I'm
> not entirely clear on what the bug is here, though; it looks like
> __mntns_get_root_fd is looking at /proc/$pid/root, which for the
> container process is just a link to /. I guess something about this /
> remapping needs to be saved, but I'm not entirely sure what the right
> approach is.
> 
> Thoughts?

What's the command you use for restore? In case tasks live in mount namespace
_and_ chroot (well, pivot_root) the --root option should be used to tell criu
where it is.

Thanks,
Pavel



More information about the CRIU mailing list