<div dir="ltr">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.<div><br></div><div><div>$ /home/saied/work/crtools/criu --version</div><div>Version: 1.5</div><div>GitID: ad6e9b9</div><div><br></div><div>With --shell-job:</div><div><br></div><div><div>$ sudo nsinit -criu /home/saied/work/crtools/criu restore</div><div>>>> Restore(): []string{"restore", "-v4", "-D", "nsinit/checkpoint", "-o", "restore.log", "--root", "/home/saied/work/busybox", "--manage-cgroups", "--evasive-devices", "--shell-job"}</div><div>exit status 1: </div><div>$ sudo grep Error nsinit/checkpoint/restore.log</div><div>(00.000645) Error (tty.c:1584): tty: Standard stream is not a terminal, aborting</div></div><div>$ </div><div><br></div><div>Without --shell-job:</div><div><br></div><div><div>$ sudo nsinit -criu /home/saied/work/crtools/criu restore</div><div>>>> Restore(): []string{"restore", "-v4", "-D", "nsinit/checkpoint", "-o", "restore.log", "--root", "/home/saied/work/busybox", "--manage-cgroups", "--evasive-devices"}</div><div>exit status 1: </div></div><div><div>$ sudo grep Error nsinit/checkpoint/restore.log</div><div>(00.051530) 1: Error (tty.c:335): tty: Found slave peer index 7 without correspond master peer</div><div>(00.051590) Error (cr-restore.c:1860): Restoring FAILED.</div></div><div>$ </div><div><br></div><div>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.</div><div><br></div><div>With --shell-job and --ext-mount-map:</div><div><br></div><div><div>$ sudo nsinit -criu /home/saied/work/crtools/criu restore</div><div>>>> 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"}</div><div>exit status 1: </div><div>$ sudo grep Error nsinit/checkpoint/restore.log</div><div>(00.044778) 1: Error (tty.c:335): tty: Found slave peer index 7 without correspond master peer</div><div>(00.044821) Error (cr-restore.c:1860): Restoring FAILED.</div></div><div>$ </div><div><br></div></div><div>Sorry if I am missing something obvious.</div><div><br></div><div>--Saied</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 10, 2015 at 10:04 AM, Cyrill Gorcunov <span dir="ltr"><<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Mar 10, 2015 at 09:48:57AM -0700, Saied Kazemi wrote:<br>
> Hi Cyrill,<br>
> As you know, we're trying to add checkpoint restore functionality to<br>
> Docker using CRIU. The first step in the process is to add C/R to<br>
> libcontainer and test the result with the standalone nsinit utility that<br>
> uses libcontainer.<br>
> We need your help in resolving an issue related to pseudo terminals. <br>
> Below is how you can reproduce the problem. Attached is a tarball of<br>
> nsinit and CRIU image and log files (in checkpoint directory). Please<br>
> let me know if you need instructions on how to build nsinit yourself.<br>
<br>
</span>Hi Saied! Look, the message "Found slave peer index ..." comes from<br>
fact that CRIU get only slave peer of tty and master peer is hosting<br>
outside of process tree so we don't see it. We have --shell-job option<br>
for that so on restore the slave get inherited from the shell criu<br>
restore procedure initiated from (at least that was the idea). Have<br>
you tried to pass --shell-job option on both dump and restore?<br>
<br>
(Note I didn't look into dump images itself at the moment, cause<br>
out of time, but give --shell-job option a try)<br>
</blockquote></div><br></div>