slurmstepd: unblock all signals before invoking user job
It was found that slurmstepd was intermittently leaving SIGPIPE blocked when launching user tasks. This may have something to do with the fact that the xsignal_unblock() call in _fork_all_tasks() is referencing an extern array (nominally this should have unblocked SIGPIPE), but I didn't spend the time to fully track this issue down. Instead, I figured there is probably no reason we would _not_ want to unblock *all* signals, so this patch does that. Before this change, the following program fails every once in awhile: #include <stdio.h> #include <signal.h> int main (int ac, char **av) { int i, rc = 0; struct sigaction act; for (i = 1; i < SIGRTMAX; i++) { sigaction (i, NULL, &act); if (act.sa_handler == SIG_DFL) continue; fprintf (stderr, "Signal %d appears to be ignored!\n", i); rc = 1; } return (rc); } with: srun -N1 -n1 ./test Signal 13 appears to be ignored! after the change, the program succeeds.
Please register or sign in to comment