<div dir="ltr">Attached the failure log. It's quite short, though. I don't think I've changed anything else, but if this makes no sense then I can try rebuilding everything to ensure I've got the right setup.<div><br></div><div><a href="https://gist.github.com/boucher/74805891264e042881aa">https://gist.github.com/boucher/74805891264e042881aa</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 30, 2015 at 8:29 AM, Andrew Vagin <span dir="ltr"><<a href="mailto:avagin@odin.com" target="_blank">avagin@odin.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Boucher,<br>
<br>
Could you try out the attached patch?<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Jun 30, 2015 at 05:00:36PM +0300, Andrew Vagin wrote:<br>
> On Wed, Jun 24, 2015 at 12:34:51PM -0700, Ross Boucher wrote:<br>
> > Here's the output same procedure without the restore-sibling option:<br>
> > <a href="https://gist.githubusercontent.com/boucher/b18593b9da2782d17e95/raw/strace.txt" rel="noreferrer" target="_blank">https://gist.githubusercontent.com/boucher/b18593b9da2782d17e95/raw/strace.txt</a><br>
> ><br>
> > It's rather long. I'm not really sure how to read the strace output.<br>
><br>
> Thank you.<br>
><br>
> 16272 write(1023, "(00.139818) 1: \t\tCreate transport fd /crtools-fd-1-5\n", 58) = 58<br>
> 16272 socket(PF_LOCAL, SOCK_DGRAM, 0) = 0<br>
> 16272 bind(0, {sa_family=AF_LOCAL, sun_path=@"/crtools-fd-1-5"}, 18) = 0<br>
> 16272 fcntl(5, F_GETFD) = -1 EBADF (Bad file descriptor)<br>
> 16272 dup2(0, 5) = 5<br>
><br>
> 16272 write(1023, "(00.142054) 1: Found id pipe:[122747] (fd 8) in inherit fd list\n", 69) = 69<br>
> 16272 dup(8) = 9<br>
> 16272 write(1023, "(00.142074) 1: File pipe:[122747] will be restored from fd 9 duped from inherit fd 8\n", 90) = 90<br>
> 16272 fcntl(5, F_GETFD) = 0<br>
> 16272 write(1023, "(00.142095) 1: Error (util.c:131): fd 5 already in use (called at files.c:872)\n", 84) = 84<br>
><br>
> Looks like we meet both ends of an inhereted pipe.<br>
><br>
> The same problem can be reproduced by the pipes test with the following<br>
> path:<br>
><br>
> diff --git a/test/pipes/pipe.c b/test/pipes/pipe.c<br>
> index cb34703..03efccc 100644<br>
> --- a/test/pipes/pipe.c<br>
> +++ b/test/pipes/pipe.c<br>
> @@ -232,7 +232,7 @@ int main(int argc, char *argv[])<br>
><br>
> child_pid = getpid();<br>
><br>
> - close_safe(pipefd[READ_FD]);<br>
> +// close_safe(pipefd[READ_FD]);<br>
> setsid();<br>
> logfd = open_safe(OLD_LOG_FILE, O_WRONLY | O_APPEND | O_CREAT);<br>
> dup2_safe(logfd, 1);<br>
><br>
> ><br>
> > On Tue, Jun 23, 2015 at 11:39 PM, Pavel Emelyanov <<a href="mailto:xemul@parallels.com">xemul@parallels.com</a>> wrote:<br>
> ><br>
> > On 06/24/2015 01:42 AM, Ross Boucher wrote:<br>
> > > If I run strace on the docker daemon, criu fails to restore with a<br>
> > different error:<br>
> > ><br>
> > > <a href="https://gist.github.com/boucher/bef6e944ae700526a979" rel="noreferrer" target="_blank">https://gist.github.com/boucher/bef6e944ae700526a979</a><br>
> > > (I included both the restore log and the strace)<br>
> > ><br>
> > > Without strace, I get the same fd already in use error.<br>
> ><br>
> > Hm... The new error is because criu tries to PTRACE_SEIZE the init to do<br>
> > the<br>
> > --restore-sibling restore and can't do it since strace is already there.<br>
> ><br>
> > Can you (for experiment only) patch out the --restore-sibling option from<br>
> > the<br>
> > code that calls criu? Or (!) call criu restore manually on the existing<br>
> > images<br>
> > with all the options being "correct" by yet again w/o the<br>
> > --restore-sibling?<br>
> ><br>
> > -- Pavel<br>
> ><br>
> ><br>
> ><br>
><br>
> > _______________________________________________<br>
> > CRIU mailing list<br>
> > <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
> > <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
><br>
> _______________________________________________<br>
> CRIU mailing list<br>
> <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
> <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
</div></div></blockquote></div><br></div>