diff --git a/opal/mca/pmix/native/pmix_native.c b/opal/mca/pmix/native/pmix_native.c index 32ca245fe8..42633f3df6 100644 --- a/opal/mca/pmix/native/pmix_native.c +++ b/opal/mca/pmix/native/pmix_native.c @@ -308,7 +308,7 @@ static int native_abort(int flag, const char msg[]) /* wait for the release */ PMIX_WAIT_FOR_COMPLETION(cb->active); - + OBJ_RELEASE(cb); return OPAL_SUCCESS; } diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 73a5091d4f..9a56c5906a 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -1488,6 +1488,28 @@ void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(&proc->name), (long)proc->pid); + /* if the proc called "abort", then we just need to flag that it + * came thru here */ + if (ORTE_FLAG_TEST(proc, ORTE_PROC_FLAG_ABORT)) { + /* even though the process exited "normally", it happened + * via an orte_abort call + */ + OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, + "%s odls:waitpid_fired child %s died by call to abort", + ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), + ORTE_NAME_PRINT(&proc->name))); + state = ORTE_PROC_STATE_CALLED_ABORT; + /* since we are going down a different code path, we need to + * flag that this proc has had its waitpid fired */ + ORTE_FLAG_SET(proc, ORTE_PROC_FLAG_WAITPID); + /* if IOF_COMPLETE has already been recvd, then we need + * to mark this proc as no longer alive */ + if (ORTE_FLAG_TEST(proc, ORTE_PROC_FLAG_IOF_COMPLETE)) { + ORTE_FLAG_UNSET(proc, ORTE_PROC_FLAG_ALIVE); + } + goto MOVEON; + } + /* if the child was previously flagged as dead, then just * update its exit status and * ensure that its exit state gets reported to avoid hanging @@ -1531,27 +1553,6 @@ void odls_base_default_wait_local_proc(orte_proc_t *proc, void* cbdata) /* determine the state of this process */ if (WIFEXITED(proc->exit_code)) { - /* if the proc called "abort", then we just need to flag that it - * came thru here */ - if (ORTE_FLAG_TEST(proc, ORTE_PROC_FLAG_ABORT)) { - /* even though the process exited "normally", it happened - * via an orte_abort call - */ - OPAL_OUTPUT_VERBOSE((5, orte_odls_base_framework.framework_output, - "%s odls:waitpid_fired child %s died by call to abort", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&proc->name))); - state = ORTE_PROC_STATE_CALLED_ABORT; - /* since we are going down a different code path, we need to - * flag that this proc has had its waitpid fired */ - ORTE_FLAG_SET(proc, ORTE_PROC_FLAG_WAITPID); - /* if IOF_COMPLETE has already been recvd, then we need - * to mark this proc as no longer alive */ - if (ORTE_FLAG_TEST(proc, ORTE_PROC_FLAG_IOF_COMPLETE)) { - ORTE_FLAG_UNSET(proc, ORTE_PROC_FLAG_ALIVE); - } - goto MOVEON; - } /* set the exit status appropriately */ proc->exit_code = WEXITSTATUS(proc->exit_code);