<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 5:22 PM, Cyrill Gorcunov <span dir="ltr">&lt;<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Aug 12, 2015 at 07:36:22PM +0000, Hui Kang wrote:<br>
&gt; Signed-off-by: Hui Kang &lt;<a href="mailto:hkang.sunysb@gmail.com">hkang.sunysb@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  cgroup.c | 4 ++++<br>
&gt;  1 file changed, 4 insertions(+)<br>
&gt;<br>
&gt; diff --git a/cgroup.c b/cgroup.c<br>
&gt; index a4e0146..51348ca 100644<br>
&gt; --- a/cgroup.c<br>
&gt; +++ b/cgroup.c<br>
&gt; @@ -992,6 +992,10 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e<br>
&gt;               CgroupDirEntry *e = ents[i];<br>
&gt;               size_t off2 = off;<br>
&gt;<br>
&gt; +             if (strcmp(e-&gt;dir_name, &quot;&quot;) ==0)  {<br>
&gt; +                     continue;<br>
&gt; +             }<br>
&gt; +<br>
&gt;               off2 += sprintf(path + off, &quot;/%s&quot;, e-&gt;dir_name);<br>
&gt;               if (e-&gt;n_properties &gt; 0) {<br>
&gt;                       for (j = 0; j &lt; e-&gt;n_properties; ++j) {<br>
<br>
</span>Could you please explain how we end up having empty dir_name here?<br></blockquote><div><br></div><div>This happens when restoring a process with cgroup using --manage-cgroup=full.  <br></div></div><br></div><div class="gmail_extra">To reproduce this error<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">1. start a process<br></div><div class="gmail_extra">2. mkdir /sys/fs/cgroups/cpusets/foo<br></div><div class="gmail_extra">3. echo PID &gt;  /sys/fs/cgroups/cpusets/foo/tasks<br></div><div class="gmail_extra">4. checkpoint the process<br>5. rmdir /sys/fs/cgroups/cpusets/foo or copy the checkedpoint images to a different host<br>5. /root/criu/criu restore --log-file ./restore.log -vvvv -j  --manage-cgroup=full<br></div><div class="gmail_extra"><br><br><br><br></div></div>