<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 16, 2016 at 1:46 PM, Andrei Vagin <span dir="ltr">&lt;<a href="mailto:avagin@virtuozzo.com" target="_blank">avagin@virtuozzo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Sep 14, 2016 at 05:06:15PM +0200, Adrian Reber wrote:<br>
&gt; On Wed, Sep 14, 2016 at 05:45:49AM -0700, Andrei Vagin wrote:<br>
&gt; &gt; On Mon, Sep 12, 2016 at 07:41:29PM +0200, Adrian Reber wrote:<br>
&gt; &gt; &gt; I was trying to checkpoint and restore a runc container and so far I had<br>
&gt; &gt; &gt; two smaller problems. My runc container has<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   &quot;terminal&quot;: false<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and I am starting it detached &#39;-d&#39;. Checkpointing this container fails<br>
&gt; &gt; &gt; if I run &#39;runc checkpoint --shell-job test&#39; or without &#39;--shell-job&#39;<br>
&gt; &gt; &gt; with following error:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (00.003008) 29213 fdinfo 0: pos: 0x               0 flags: 102002/0<br>
&gt; &gt; &gt; (00.003022) tty: Dumping tty 8 with id 0x7<br>
&gt; &gt; &gt; (00.003026) Error (files-reg.c:1141): Can&#39;t lookup mount=22 for fd=0 path=/dev/pts/2<br>
&gt; &gt; &gt; (00.003029) ------------------------------<wbr>----------<br>
&gt; &gt; &gt; (00.003071) Error (cr-dump.c:1296): Dump files (pid: 29213) failed with -1<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I get the same error using criu-2.4 and latest master. If I start the<br>
&gt; &gt; &gt; container without &#39;-d&#39; I can checkpoint it without any problem.<br>
&gt; &gt;<br>
&gt; &gt; Could you try to run ./runc ... &amp;&gt; /dev/null  &lt; /dev/null? Will it help?<br>
&gt;<br>
&gt; Yes, that works.<br>
&gt;<br>
&gt; &gt; Could you show lsof -p for an init process of a container?<br>
&gt;<br>
&gt; This is without the /dev/null redirection you suggested:<br>
&gt;<br>
&gt; COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF      NODE NAME<br>
&gt; start   7464 root  cwd    DIR  252,1     4096   9129255 /<br>
&gt; start   7464 root  rtd    DIR  252,1     4096   9129255 /<br>
&gt; start   7464 root  txt    REG  252,1   960376 192967906 /usr/bin/bash<br>
&gt; start   7464 root  mem    REG  252,1          193825299 /usr/lib64/<a href="http://libnss_files-2.17.so" rel="noreferrer" target="_blank">libnss_files-2.17.<wbr>so</a> (path inode=16885464)<br>
&gt; start   7464 root  mem    REG  252,1          193773498 /usr/lib64/<a href="http://libc-2.17.so" rel="noreferrer" target="_blank">libc-2.17.so</a> (path inode=16883722)<br>
&gt; start   7464 root  mem    REG  252,1          193825248 /usr/lib64/<a href="http://libdl-2.17.so" rel="noreferrer" target="_blank">libdl-2.17.so</a> (path inode=16884707)<br>
&gt; start   7464 root  mem    REG  252,1          193825325 /usr/lib64/libtinfo.so.5.9 (path inode=16860633)<br>
&gt; start   7464 root  mem    REG  252,1          193773472 /usr/lib64/<a href="http://ld-2.17.so" rel="noreferrer" target="_blank">ld-2.17.so</a> (path inode=16820578)<br>
&gt; start   7464 root    0u   CHR  136,2      0t0         5 /dev/pts/2<br>
&gt; start   7464 root    1u   CHR  136,2      0t0         5 /dev/pts/2<br>
&gt; start   7464 root    2u   CHR  136,2      0t0         5 /dev/pts/2<br>
&gt; start   7464 root  255r   REG  252,1       83   8550670 /start<br>
&gt;<br>
&gt;<br>
&gt; &gt; &gt; Another problem I have seen is using runc with<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;   &quot;readonly&quot;: true<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; this gives me following error:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; (00.079785) Dumping task cwd id 0xb root id 0xb<br>
&gt; &gt; &gt; (00.079931) mnt: Dumping mountpoints<br>
&gt; &gt; &gt; (00.079934) mnt:  213: 2b:/null @ ./proc/sched_debug<br>
&gt; &gt; &gt; (00.079934) mnt: Something is mounted on top of ./dev<br>
&gt; &gt; &gt; (00.080004) Error (criu/mount.c:1044): mnt: Can&#39;t create a temporary directory: Read-only file system<br>
&gt; &gt;<br>
&gt; &gt; It&#39;s known issue. Yesterday I started to rework mount.c to support this<br>
&gt; &gt; case. I will try to prepare draft patches before Friday.<br>
&gt;<br>
&gt; Great, good to know.<br>
<br>
I pushed my changes on github, but I don&#39;t test them with runc.<br>
<a href="https://github.com/avagin/criu/commits/mntns_for_adrian" rel="noreferrer" target="_blank">https://github.com/avagin/<wbr>criu/commits/mntns_for_adrian</a></blockquote><div><br></div><div>I can give it a try and let u know how it goes Andrei.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
&gt;<br>
&gt;               Adrian<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/criu</a><br>
</blockquote></div><br></div></div>