diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index f312f8824874eb40e74f9237233ab038e11cd63a..add5e0374b09ca335952457dc2bf5c993c54384e 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -2474,7 +2474,16 @@ _rpc_file_bcast(slurm_msg_t *msg) /* The child actually performs the I/O and exits with * a return code, do not return! */ - /* set the child's group list */ + /*********************************************************************\ + * NOTE: It would be best to do an exec() immediately after the fork() + * in order to help prevent a possible deadlock in the child process + * due to locks being set at the time of the fork and being freed by + * the parent process, but not freed by the child process. Performing + * the work inline is done for simplicity. Note that the logging + * performed by error() should be safe due to the use of + * atfork_install_handlers() as defined in src/common/log.c. + * Change the code below with caution. + \*********************************************************************/ if (setgroups(ngroups, groups) < 0) { error("sbcast: uid: %u setgroups: %s", req_uid, strerror(errno));