[CRIU] Pty-related Dump Failure
Cyrill Gorcunov
gorcunov at gmail.com
Tue Mar 10 12:29:09 PDT 2015
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.
More information about the CRIU
mailing list