<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"><<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 Wed, Aug 12, 2015 at 07:36:22PM +0000, Hui Kang wrote:<br>
> Signed-off-by: Hui Kang <<a href="mailto:hkang.sunysb@gmail.com">hkang.sunysb@gmail.com</a>><br>
> ---<br>
> cgroup.c | 4 ++++<br>
> 1 file changed, 4 insertions(+)<br>
><br>
> diff --git a/cgroup.c b/cgroup.c<br>
> index a4e0146..51348ca 100644<br>
> --- a/cgroup.c<br>
> +++ b/cgroup.c<br>
> @@ -992,6 +992,10 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e<br>
> CgroupDirEntry *e = ents[i];<br>
> size_t off2 = off;<br>
><br>
> + if (strcmp(e->dir_name, "") ==0) {<br>
> + continue;<br>
> + }<br>
> +<br>
> off2 += sprintf(path + off, "/%s", e->dir_name);<br>
> if (e->n_properties > 0) {<br>
> for (j = 0; j < e->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 > /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>