Skip to content

Commit 37954b5

Browse files
authored
Merge pull request #6010 from ICLDisco/export/orte_crashfini
Export/orte crashfini
2 parents 241b424 + 43bd232 commit 37954b5

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

orte/mca/errmgr/default_app/errmgr_default_app.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
66
*
7-
* Copyright (c) 2004-2006 The University of Tennessee and The University
7+
* Copyright (c) 2004-2018 The University of Tennessee and The University
88
* of Tennessee Research Foundation. All rights
99
* reserved.
1010
* Copyright (c) 2011-2013 Los Alamos National Security, LLC.
@@ -101,14 +101,14 @@ static void notify_cbfunc(int status,
101101
state = ORTE_PROC_STATE_TERMINATED;
102102
}
103103

104+
/* push it into our event base */
105+
ORTE_ACTIVATE_PROC_STATE((orte_process_name_t*)source, state);
106+
104107
/* let the caller know we processed this, but allow the
105108
* chain to continue */
106109
if (NULL != cbfunc) {
107110
cbfunc(ORTE_SUCCESS, NULL, NULL, NULL, cbdata);
108111
}
109-
110-
/* push it into our event base */
111-
ORTE_ACTIVATE_PROC_STATE((orte_process_name_t*)source, state);
112112
}
113113

114114
/************************
@@ -143,6 +143,7 @@ static int finalize(void)
143143
{
144144
if (SIZE_MAX != myerrhandle) {
145145
opal_pmix.deregister_evhandler(myerrhandle, NULL, NULL);
146+
myerrhandle = SIZE_MAX;
146147
}
147148
return ORTE_SUCCESS;
148149
}

orte/mca/ess/base/ess_base_std_orted.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2011 The University of Tennessee and The University
5+
* Copyright (c) 2004-2018 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -669,7 +669,9 @@ int orte_ess_base_orted_finalize(void)
669669
(void) mca_base_framework_close(&orte_filem_base_framework);
670670
(void) mca_base_framework_close(&orte_grpcomm_base_framework);
671671
(void) mca_base_framework_close(&orte_iof_base_framework);
672-
(void) mca_base_framework_close(&orte_errmgr_base_framework);
672+
/* first stage shutdown of the errmgr, deregister the handler but keep
673+
* the required facilities until the rml and oob are offline */
674+
orte_errmgr.finalize();
673675
(void) mca_base_framework_close(&orte_plm_base_framework);
674676
/* make sure our local procs are dead */
675677
orte_odls.kill_local_procs(NULL);
@@ -678,6 +680,7 @@ int orte_ess_base_orted_finalize(void)
678680
(void) mca_base_framework_close(&orte_routed_base_framework);
679681
(void) mca_base_framework_close(&orte_rml_base_framework);
680682
(void) mca_base_framework_close(&orte_oob_base_framework);
683+
(void) mca_base_framework_close(&orte_errmgr_base_framework);
681684
(void) mca_base_framework_close(&orte_state_base_framework);
682685
/* remove our use of the session directory tree */
683686
orte_session_dir_finalize(ORTE_PROC_MY_NAME);

orte/mca/ess/hnp/ess_hnp_module.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
44
* University Research and Technology
55
* Corporation. All rights reserved.
6-
* Copyright (c) 2004-2011 The University of Tennessee and The University
6+
* Copyright (c) 2004-2018 The University of Tennessee and The University
77
* of Tennessee Research Foundation. All rights
88
* reserved.
99
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -799,8 +799,9 @@ static int rte_finalize(void)
799799
(void) mca_base_framework_close(&orte_grpcomm_base_framework);
800800
(void) mca_base_framework_close(&orte_routed_base_framework);
801801
(void) mca_base_framework_close(&orte_plm_base_framework);
802-
(void) mca_base_framework_close(&orte_errmgr_base_framework);
803-
(void) mca_base_framework_close(&orte_state_base_framework);
802+
/* first stage shutdown of the errmgr, deregister the handler but keep
803+
* the required facilities until the rml and oob are offline */
804+
orte_errmgr.finalize();
804805

805806
/* cleanup the pstat stuff */
806807
(void) mca_base_framework_close(&opal_pstat_base_framework);
@@ -816,6 +817,8 @@ static int rte_finalize(void)
816817
/* shutdown the messaging frameworks */
817818
(void) mca_base_framework_close(&orte_rml_base_framework);
818819
(void) mca_base_framework_close(&orte_oob_base_framework);
820+
(void) mca_base_framework_close(&orte_errmgr_base_framework);
821+
(void) mca_base_framework_close(&orte_state_base_framework);
819822

820823
/* remove our use of the session directory tree */
821824
orte_session_dir_finalize(ORTE_PROC_MY_NAME);

orte/mca/iof/hnp/iof_hnp_read.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
33
* University Research and Technology
44
* Corporation. All rights reserved.
5-
* Copyright (c) 2004-2011 The University of Tennessee and The University
5+
* Copyright (c) 2004-2018 The University of Tennessee and The University
66
* of Tennessee Research Foundation. All rights
77
* reserved.
88
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -284,6 +284,8 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
284284
/* if we read 0 bytes from the stdout/err/diag, there is
285285
* nothing to output - release the appropriate event.
286286
* This will delete the read event and close the file descriptor */
287+
/* make sure we don't do recursive delete on the proct */
288+
OBJ_RETAIN(proct);
287289
if (rev->tag & ORTE_IOF_STDOUT) {
288290
orte_iof_base_static_dump_output(proct->revstdout);
289291
OBJ_RELEASE(proct->revstdout);
@@ -305,6 +307,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
305307
/* this proc's iof is complete */
306308
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
307309
}
310+
OBJ_RELEASE(proct);
308311
return;
309312
}
310313

0 commit comments

Comments
 (0)