[CRIU] [PATCH] cgroups: Add ability to reuse existing cgroup yard directory
Pavel Emelyanov
xemul at parallels.com
Thu Jul 23 05:27:49 PDT 2015
> Hello Cyrill,
>
> I found a new error which is appeared with this patch.
>
> [root at avagin-fc19-cr criu]# bash test/zdtm.sh -r static/env00
> Execute static/env00
> ./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST
> Dump 3599
> Restore
> Test: zdtm/live/static/env00, Result: FAIL
> ==================================== ERROR ====================================
> Test: zdtm/live/static/env00, Namespace:
> Dump log : /root/git/criu/test/dump/static/env00/3599/1/dump.log
> --------------------------------- grep Error ---------------------------------
> ------------------------------------- END -------------------------------------
> Restore log: /root/git/criu/test/dump/static/env00/3599/1/restore.log
> --------------------------------- grep Error ---------------------------------
> (00.009820) 3599: Error (cgroup.c:901): cg: Can't move into cpuset,cpu,cpuacct,blkio///tasks (-1/-1): Bad file descriptor
> (00.009888) Error (cr-restore.c:1912): Restoring FAILED.
> ------------------------------------- END -------------------------------------
> ================================= ERROR OVER =================================
>
>
> Steps to reproduce:
>
> 1. Apply this patch
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index d8a3a70..245c827 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -565,6 +565,7 @@ start_test()
> (
> # Here is no way to set FD_CLOEXEC on 3
> exec 3>&-
> + echo 0 > /sys/fs/cgroup/freezer/test/tasks
> make -C $tdir $tname.pid
> )
> 2. mkdir /sys/fs/cgroup/freezer/test
> 3. bash test/zdtm.sh -r static/env00
>
> Additional information:
> [root at avagin-fc19-cr criu]# cat /proc/self/cgroup
> 7:perf_event:/
> 6:net_cls:/
> 5:freezer:/
> 4:devices:/user.slice
> 3:memory:/
> 2:cpuset,cpu,cpuacct,blkio:/
> 1:name=systemd:/user.slice/user-0.slice/session-1.scope
> [root at avagin-fc19-cr criu]# cat /proc/self/mountinfo | grep cgroup
> 23 16 0:20 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:8 - tmpfs tmpfs ro,mode=755
> 24 23 0:21 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:9 - cgroup cgroup rw,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
> 26 23 0:23 / /sys/fs/cgroup/cpu,cpuacct,cpuset,blkio rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,cpuset,cpu,cpuacct,blkio
> 27 23 0:24 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:11 - cgroup cgroup rw,memory
> 28 23 0:25 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgroup rw,devices
> 29 23 0:26 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:13 - cgroup cgroup rw,freezer
> 30 23 0:27 / /sys/fs/cgroup/net_cls rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,net_cls
> 31 23 0:28 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:15 - cgroup cgroup rw,perf_event
The quick summary of the problem: in existing /sys/fs directory with merged controllers
looks like A,B,C,D, while in CRIU the path can be constructed to be B,A,D,C or any other
combination ;)
-- Pavel
More information about the CRIU
mailing list