[CRIU] CRIU Docker Restore with Error: Bad File Size

Z F full015zf at yahoo.com
Tue Aug 4 19:24:19 PDT 2015


Hi,
About file sizes: 
//In containersbash-4.2# ls -lt /usr/bin/bash-rwxr-xr-x. 1 root root 960392 Sep 25  2014 /usr/bin/bashbash-4.2# //In host[root at compute2 dockerbins]# ls -lt /usr/bin/bash-rwxr-xr-x. 1 root root 960384 Sep 26  2014 /usr/bin/bash[root at compute2 dockerbins]# 


About FS: I am using VFS.


As explained in the http://criu.org/Docker, --root is necessary for AUFS only. Then I suppose --root is not necessary for VFS, then the container's root filesystem would be at the default /var/lib/docker/containers/<container-id>/. Is that correct?
About mount, 3 cases tested:
1. No --root, no mount --rbind:  bad file size error.2. No --root, mount --rbind: bad file size error.3. docker_cr.sh:(00.011447)      1: Error (mount.c:1861): Can't mount at ./proc: No such file or directory
(00.034211) Error (cr-restore.c:1219): 63981 exited, status=1(00.034228) Error (cr-restore.c:1912): Restoring FAILED.
The logs about mount failure attached. Thank you very much!

      From: Saied Kazemi <saied at google.com>
 To: full015zf at yahoo.com 
Cc: "criu at openvz.org" <criu at openvz.org>; Pavel Emelyanov <xemul at parallels.com> 
 Sent: Wednesday, August 5, 2015 3:17 AM
 Subject: Re: [CRIU] CRIU Docker Restore with Error: Bad File Size
   
Hi Zhang,
Since you're not using AUFS, I assume you're using VFS.  Can you confirm please?
As http://criu.org/Docker explains, you need to bind mount the container's root filesystem before attempting to restore.  Also, can you try the docker_cr.sh helper script that is in the contrib subdirectory of CRIU sources to checkpoint and restore your container?
--Saied

On Tue, Aug 4, 2015 at 10:21 AM, Pavel Emelyanov <xemul at parallels.com> wrote:

On 08/04/2015 11:04 AM, Z F wrote:
> Hi,
>
> I am trying criu docker checkpoint/restore  external example (without AUFS) provided by Docker <http://criu.org/Docker#Restore_Prework_for_External_C.2FR>
>
>
>
>
>
>
>
>
>
>
> Docker <http://criu.org/Docker#Restore_Prework_for_External_C.2FR>
> This HOWTO page describes how to checkpoint and restore a Docker container.
> View on criu.org <http://criu.org/Docker#Restore_Prework_for_External_C.2FR>
>
> Preview by Yahoo
>
>
>
> The experiment was in the same host. And the restore failed with error:
>
> (00.210352)      1: Error (files-reg.c:1055): File usr/bin/bash has bad size 960384 (expect 960392)
> (00.210357)      1: Error (cr-restore.c:255): Can't fixup VMA's fd
> (00.214642) Error (cr-restore.c:1912): Restoring FAILED.
>
>
> The cause is that the /usr/bin/bash in host and container have different size.

That's weird. CRIU should pick the bash from container. So which bash is which? Is
the actual size the host's one and expected the container's or vice-versa?

> While in my mind, restore of container would load the container's image and file system and load the container's bash. Anything wrong with my experiment?
>
> Test log and criu log attached. Thank you very much!
>
>
>
> Best Regards
> Zhang Fan
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


>

_______________________________________________
CRIU mailing list
CRIU at openvz.org
https://lists.openvz.org/mailman/listinfo/criu




  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150805/abfc7833/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logs.zip
Type: application/x-zip-compressed
Size: 15210 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150805/abfc7833/attachment-0001.bin>


More information about the CRIU mailing list