<div dir="ltr"><div>Hi, Cyrill,</div><div><br></div>I did not go that far... I looked at the other lines that handle files under /proc and I didn&#39;t see anything special being done about those. The only problem is that criu returns error code for the /proc folder itself, due to what I think is a minor bug. As it is now, if a process does fopen(&quot;/proc&quot;, &quot;r&quot;), criu will fail to dump it and I found that a little odd since it has no problem with files/folders that are under /proc.<div>If I understand correctly what you are saying, then procfs would not be mounted in /proc, but instead in some /path/to/proc, as seen by the process, right? In that case then the code might need other patches to handle that.</div><div><br></div><div>Thank you,</div><div>Andrei</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-28 10:49 GMT+03:00 Cyrill Gorcunov <span dir="ltr">&lt;<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jun 28, 2016 at 10:02:22AM +0300, Andrei Tuicu wrote:<br>
&gt; CRIU fails to dump processes that have a file descriptor pointing<br>
&gt; to the /proc folder, because check_path_remap returns error code<br>
&gt; in that case. Fix: return 0 instead.<br>
&gt;<br>
&gt; Signed-off-by: Andrei Tuicu &lt;<a href="mailto:andrei.tuicu@gmail.com">andrei.tuicu@gmail.com</a>&gt;<br>
</span><span class="">&gt;  1 file changed, 2 insertions(+), 2 deletions(-)<br>
&gt;<br>
&gt; diff --git a/criu/files-reg.c b/criu/files-reg.c<br>
&gt; index 899dcf6..0fcef6d 100644<br>
&gt; --- a/criu/files-reg.c<br>
&gt; +++ b/criu/files-reg.c<br>
&gt; @@ -975,8 +975,8 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,<br>
&gt;               if (!start)<br>
&gt;                       return -1;<br>
&gt;               start = strstr(start + 1, &quot;/&quot;);<br>
&gt; -             if (!start)<br>
&gt; -                     return -1;<br>
&gt; +             if (!start) /* it&#39;s /proc */<br>
&gt; +                     return 0;<br>
&gt;               pid = strtol(start + 1, &amp;end, 10);<br>
&gt;<br>
&gt;               /* If strtol didn&#39;t convert anything, then we are looking at<br>
<br>
</span>What if the process sitting in some mountnamespace with procfs mounted inside,<br>
then instead of exiting early we&#39;ve to fallthrough and check for ns root, ie<br>
down to line mntns_root = mntns_get_root_fd(nsid);, if only I&#39;m not missing<br>
somthing obvious. avagin@?<br>
</blockquote></div><br></div>