Skip to content
Commit 1ff2500b authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov
Browse files

restore: use root_as_sibling only after defining it



root_as_sibling was used in criu_signals_setup(), but was only defined later
(when forking the root task for the first time). This meant that the
SA_NOCLDSTOP was never masked off, which meant SIGCHLD was never delivered
after ptracing the root task. Thus, when the a child of the root task died
(e.g. from cr_system), the root task sat in PTRACE_STOP, and the restore task
never PTRACE_CONT'd, resulting in a deadlock.

Instead, we only unmask SA_NOCLDSTOP right before we PTRACE_SEIZE, after the
value is defined.

v2: re-work the condition for CLONE_PARENT
v3: move unmasking of SA_NOCLDSTOP to restore_root_task
v4: keep all the comments in the original code

Signed-off-by: default avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent f45060e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment