[CRIU] Pty-related Dump Failure

Saied Kazemi saied at google.com
Tue Mar 10 12:38:39 PDT 2015


Yup, ttys are painful :(  I'll dig deeper too and check back with you.
Please let me know if you need instructions to reproduce the problem.

--Saied


On Tue, Mar 10, 2015 at 12:29 PM, Cyrill Gorcunov <gorcunov at gmail.com>
wrote:

> On Tue, Mar 10, 2015 at 12:06:58PM -0700, Saied Kazemi wrote:
> >    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.
>
> IIRC, we've had something similar before -- ie the CRIU on restore
> tries to grab stdin
>
> int tty_prep_fds(void)
> {
>         if (!opts.shell_job)
>                 return 0;
>
>         if (!isatty(STDIN_FILENO)) {
>                 pr_err("Standard stream is not a terminal, aborting\n");
>                 return -1;
>         }
> ...
> }
>
> which we might need to inherit terminals if --shell-job option is passed.
> But the restore envinronment you're running criu in has stdin pointing
> to something different but tty so we abort.
>
> Pavel, do you remember anything about it? I've a vague memory that
> we have met this problem before...
>
> As to "Found slave peer index 7 ithout correspond master peer" it's beause
> we don't know how to restore the master peer, it's not in image and we're
> not inheriting terminal. (sigh, ttys are always such a painfull thing :)
>
> If some idea pop up I'll ping you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150310/8b3898b4/attachment.html>


More information about the CRIU mailing list