restore: Split restore_one_helper() and wait exiting zombie children
Zombie is also can be choosen as a parent for task helper like any other task. If the task helper exits between restore_finish_stage(CR_STATE_RESTORE) and zombie_prepare_signals()->SIG_UNBLOCK, the standard criu SIGCHLD handler is called, and the restore fails: (00.057762) 41: Error (criu/cr-restore.c:1557): 40 exited, status=0 (00.057815) Error (criu/cr-restore.c:2465): Restoring FAILED. This patch makes restore_one_zombie() behave as restore_one_helper() and to wait children exits before allowing SIGCHLD. This makes us safe against races with exiting children. See next patch for test details. Signed-off-by:Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
Showing
Please
register
or
sign in
to comment