[CRIU] Pty-related Dump Failure

Saied Kazemi saied at google.com
Tue Mar 10 12:06:58 PDT 2015


Thanks for your quick reply Cyrill.  You're right, the --shell-job flag was
missing in the nsinit version I was using.  Dump succeeds now but restore
still fails with different errors.

$ /home/saied/work/crtools/criu --version
Version: 1.5
GitID: ad6e9b9

With --shell-job:

$ sudo nsinit -criu /home/saied/work/crtools/criu restore
>>> Restore(): []string{"restore", "-v4", "-D", "nsinit/checkpoint", "-o",
"restore.log", "--root", "/home/saied/work/busybox", "--manage-cgroups",
"--evasive-devices", "--shell-job"}
exit status 1:
$ sudo grep Error nsinit/checkpoint/restore.log
(00.000645) Error (tty.c:1584): tty: Standard stream is not a terminal,
aborting
$

Without --shell-job:

$ sudo nsinit -criu /home/saied/work/crtools/criu restore
>>> Restore(): []string{"restore", "-v4", "-D", "nsinit/checkpoint", "-o",
"restore.log", "--root", "/home/saied/work/busybox", "--manage-cgroups",
"--evasive-devices"}
exit status 1:
$ sudo grep Error nsinit/checkpoint/restore.log
(00.051530)      1: Error (tty.c:335): tty: Found slave peer index 7
without correspond master peer
(00.051590) Error (cr-restore.c:1860): Restoring FAILED.
$

I also get the same error even when I add --ext-mount-map
/dev/console:/dev/console on dump and --ext-mount-map
/dev/console:/dev/pts/7 on restore.

With --shell-job and --ext-mount-map:

$ sudo nsinit -criu /home/saied/work/crtools/criu restore
>>> Restore(): []string{"restore", "-v4", "-D", "nsinit/checkpoint", "-o",
"restore.log", "--root", "/home/saied/work/busybox", "--manage-cgroups",
"--evasive-devices", "--ext-mount-map", "/dev/console:/dev/pts/7"}
exit status 1:
$ sudo grep Error nsinit/checkpoint/restore.log
(00.044778)      1: Error (tty.c:335): tty: Found slave peer index 7
without correspond master peer
(00.044821) Error (cr-restore.c:1860): Restoring FAILED.
$

Sorry if I am missing something obvious.

--Saied


On Tue, Mar 10, 2015 at 10:04 AM, Cyrill Gorcunov <gorcunov at gmail.com>
wrote:

> On Tue, Mar 10, 2015 at 09:48:57AM -0700, Saied Kazemi wrote:
> >    Hi Cyrill,
> >    As you know, we're trying to add checkpoint restore functionality to
> >    Docker using CRIU.  The first step in the process is to add C/R to
> >    libcontainer and test the result with the standalone nsinit utility
> that
> >    uses libcontainer.
> >    We need your help in resolving an issue related to pseudo terminals.
> >    Below is how you can reproduce the problem.  Attached is a tarball of
> >    nsinit and CRIU image and log files (in checkpoint directory).  Please
> >    let me know if you need instructions on how to build nsinit yourself.
>
> Hi Saied! Look, the message "Found slave peer index ..." comes from
> fact that CRIU get only slave peer of tty and master peer is hosting
> outside of process tree so we don't see it. We have --shell-job option
> for that so on restore the slave get inherited from the shell criu
> restore procedure initiated from (at least that was the idea). Have
> you tried to pass --shell-job option on both dump and restore?
>
> (Note I didn't look into dump images itself at the moment, cause
>  out of time, but give --shell-job option a try)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150310/4c80cb39/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nsinit
Type: application/octet-stream
Size: 6350704 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150310/4c80cb39/attachment-0001.obj>


More information about the CRIU mailing list