[CRIU] [PATCH] cgroups: allow to execute fini_cgroups a few times

Andrey Vagin avagin at openvz.org
Thu Sep 4 05:21:05 PDT 2014


It is called from prepare_cgroup_sfd() and cr_restore_tasks().

+ criu restore --file-locks --tcp-established --evasive-devices --link-remap --root /var/lib/vz/root/101 --restore-detached --action-script /usr/local/libexec/vzctl/scripts/vps-rst-env -D /vz/dump/Dump.101 -o restore.log -vvvv --pidfile /var/lib/vzctl/vepid/101
*** Error in `criu': double free or corruption (fasttop): 0x00000000006bcd40 ***

Program terminated with signal 6, Aborted.
Missing separate debuginfos, use: debuginfo-install glibc-2.17-20.fc19.x86_64 libgcc-4.8.3-1.fc19.x86_64 protobuf-c-0.15-7.fc19.x86_64
(gdb) bt
 #0  0x00007ffff72179e9 in raise () from /lib64/libc.so.6
 #1  0x00007ffff72190f8 in abort () from /lib64/libc.so.6
 #2  0x00007ffff7257d17 in __libc_message () from /lib64/libc.so.6
 #3  0x00007ffff725f0b8 in _int_free () from /lib64/libc.so.6
 #4  0x0000000000426971 in cr_restore_tasks () at cr-restore.c:1833
 #5  0x0000000000418426 in main (argc=<optimized out>, argv=0x7fffffffeb38, envp=<optimized out>) at crtools.c:479

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cgroup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cgroup.c b/cgroup.c
index e76b295..1bc3ee8 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -999,6 +999,7 @@ void fini_cgroup(void)
 	umount2(cg_yard, MNT_DETACH);
 	rmdir(cg_yard);
 	xfree(cg_yard);
+	cg_yard = NULL;
 }
 
 static int restore_cgroup_prop(const CgroupPropEntry * cg_prop_entry_p,
-- 
1.9.3



More information about the CRIU mailing list