[CRIU] test for external mounts
Tycho Andersen
tycho.andersen at canonical.com
Tue Apr 21 13:21:42 PDT 2015
On Tue, Apr 21, 2015 at 09:59:07PM +0300, Pavel Emelyanov wrote:
> On 04/21/2015 06:21 PM, Tycho Andersen wrote:
> > Hi Pavel,
> >
> > On Tue, Apr 21, 2015 at 02:41:18PM +0300, Pavel Emelyanov wrote:
> >> On 04/17/2015 11:34 PM, Tycho Andersen wrote:
> >>> Hi all,
> >>>
> >>> I'm having a problem getting my test for external sharing to work
> >>> correctly. The patch is attached, and when I run it I get:
> >>>
> >>> sudo ./zdtm.sh -r ns/static/external_shared_mounts
> >>> Execute ns/static/external_shared_mounts
> >>> mkdir: cannot create directory ‘/tmp/criu-root.utSwRv/dev’: File exists
> >>> mknod: ‘/tmp/criu-root.utSwRv/dev/tty’: File exists
> >>> ./external_shared_mounts --pidfile=external_shared_mounts.pid --outfile=external_shared_mounts.out --dirname=external_shared_mounts.test
> >>> /home/ubuntu/criu/test
> >>> Dump 2644
> >>> Restore
> >>> Test: zdtm/live/static/external_shared_mounts, Result: FAIL
> >>> ==================================== ERROR ====================================
> >>> Test: zdtm/live/static/external_shared_mounts, Namespace: 1
> >>> Dump log : /home/ubuntu/criu/test/dump/ns/static/external_shared_mounts/2644/1/dump.log
> >>> --------------------------------- grep Error ---------------------------------
> >>> ------------------------------------- END -------------------------------------
> >>> Restore log: /home/ubuntu/criu/test/dump/ns/static/external_shared_mounts/2644/1/restore.log
> >>> --------------------------------- grep Error ---------------------------------
> >>> (00.007393) 1: Error (mount.c:276): Mountpoint 84 w/o parent 83 found @.criu.mntns.aDwkKj/12/ (root found)
> >>
> >> The mountpoint 84 from the image doesn't have the parent (83) in the image.
> >> Can you check what's there in the images with mountpoints? The crit decode -i mountpoints-$id.img --pretty does this.
> >
> > Yes, see below. The child process (12) is the one I actually care about
> > dumping, and the parent (11) I guess is the process criu is invoked from?
>
> These numbers are not PIDs, these are IDs of namespaces. Link from task to namespace
> is in ids-$pid.img file :) So you have two mount namespaces dumped -- 11 and 12.
Ah, good to know :)
> And while in the 11'th I see the 84'th mountpoint, here it is
>
> > {
> > "shared_id": 0,
> > "parent_mnt_id": 49,
> > "root_dev": 265289729,
> > "fstype": 0,
> > "source": "/dev/disk/by-uuid/6c5a78e0-95fa-49a8-aa91-a8093d295e58",
> > "flags": "0x200000",
> > "mountpoint": "/",
> > "master_id": 0,
> > "root": "/home/ubuntu/criu/test",
> > "options": "data=ordered",
> > "mnt_id": 84
> > }
>
> Its parent is not 83 as in logs, but 49. And 49 is not in the images too.
Yes, what I don't understand is exactly how the test suite sets these
up. I guess this is because of one of my unshare() calls? Anyway, this
test won't work if we merge the pivot root test patch, so I'll wait
and see about that :)
Tycho
> -- Pavel
More information about the CRIU
mailing list