[CRIU] [PATCH] seize: do not try to detach dead tasks
Dmitry Safonov
dsafonov at odin.com
Tue Dec 15 03:16:00 PST 2015
unseize_task_and_threads sends SIGKILL in unseize_task under condition
(st == TASK_DEAD). Which obviously kills task. Later there is attempt
to PTRACE_DETACH in freezer_detach(), that results in following errors:
(00.242163) Error (seize.c:223): Unable to detach from 23064
: No such process
(00.242177) Error (seize.c:223): Unable to detach from 23065
: No such process
Fix it by detaching in freezer_detach only those tasks, which we previously
didn't kill. (st != TASK_DEAD)
Signed-off-by: Dmitry Safonov <dsafonov at odin.com>
---
seize.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/seize.c b/seize.c
index c0f8d7b..d275ce5 100644
--- a/seize.c
+++ b/seize.c
@@ -447,9 +447,9 @@ void pstree_switch_state(struct pstree_item *root_item, int st)
for_each_pstree_item(item)
unseize_task_and_threads(item, st);
- freezer_detach();
-
- if (st == TASK_DEAD)
+ if (st != TASK_DEAD)
+ freezer_detach();
+ else
pstree_wait(root_item);
}
--
2.6.3
More information about the CRIU
mailing list