[CRIU] [PATCH] pre-dump: skip dead tasks

Andrey Vagin avagin at openvz.org
Sun Jul 10 09:52:02 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x0000000000435744 in cr_pre_dump_finish (ret=0) at cr-dump.c:1452
1452			pr_info("\tPre-dumping %d\n", ctl->pid.virt);
(gdb) bt
 #0  0x0000000000435744 in cr_pre_dump_finish (ret=0) at cr-dump.c:1452
 #1  cr_pre_dump_tasks (pid=pid at entry=24) at cr-dump.c:1556
 #2  0x000000000041f665 in main (argc=<optimized out>, argv=0x7ffda430e818, envp=<optimized out>) at crtools.c:753

https://github.com/xemul/criu/issues/189

Cc: Mike Rapoport <rppt at linux.vnet.ibm.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 criu/cr-dump.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 9e2a33e..febef16 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1449,6 +1449,9 @@ static int cr_pre_dump_finish(int ret)
 		struct parasite_ctl *ctl = dmpi(item)->parasite_ctl;
 		struct page_xfer xfer;
 
+		if (!task_alive(item))
+			continue;
+
 		pr_info("\tPre-dumping %d\n", ctl->pid.virt);
 		timing_start(TIME_MEMWRITE);
 		ret = open_page_xfer(&xfer, CR_FD_PAGEMAP, ctl->pid.virt);
-- 
2.7.4



More information about the CRIU mailing list