Skip to content

Commit 9ad02b5

Browse files
author
Ralph Castain
authored
Merge pull request #2718 from rhc54/topic/leaks
Don't remove the IOF framework's tracking info for a proc until the state machine tells it to do so.
2 parents 110840f + fa419d3 commit 9ad02b5

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

orte/mca/iof/hnp/iof_hnp_read.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2014-2016 Intel Corporation. All rights reserved.
15+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
1616
* $COPYRIGHT$
1717
*
1818
* Additional copyrights may follow
@@ -262,9 +262,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
262262
NULL == proct->revstderr &&
263263
NULL == proct->revstddiag) {
264264
/* this proc's iof is complete */
265-
opal_list_remove_item(&mca_iof_hnp_component.procs, &proct->super);
266265
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
267-
OBJ_RELEASE(proct);
268266
}
269267
return;
270268
}

orte/mca/iof/iof_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
13-
* Copyright (c) 2016 Intel, Inc. All rights reserved.
13+
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
1414
* $COPYRIGHT$
1515
*
1616
* Additional copyrights may follow
@@ -40,6 +40,7 @@ typedef uint16_t orte_iof_tag_t;
4040
#define ORTE_IOF_STDMERGE 0x0006
4141
#define ORTE_IOF_STDDIAG 0x0008
4242
#define ORTE_IOF_STDOUTALL 0x000e
43+
#define ORTE_IOF_STDALL 0x000f
4344
#define ORTE_IOF_EXCLUSIVE 0x0100
4445

4546
/* flow control flags */

orte/mca/iof/orted/iof_orted_read.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata)
167167
NULL == proct->revstderr &&
168168
NULL == proct->revstddiag) {
169169
/* this proc's iof is complete */
170-
opal_list_remove_item(&mca_iof_orted_component.procs, &proct->super);
171170
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
172-
OBJ_RELEASE(proct);
173171
}
174172
if (NULL != buf) {
175173
OBJ_RELEASE(buf);

orte/mca/state/base/state_base_fns.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
3-
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
3+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
44
* $COPYRIGHT$
55
*
66
* Additional copyrights may follow
@@ -632,13 +632,9 @@ void orte_state_base_track_procs(int fd, short argc, void *cbdata)
632632
if (pdata->state < ORTE_PROC_STATE_TERMINATED) {
633633
pdata->state = state;
634634
}
635-
/* Release only the stdin IOF file descriptor for this child, if one
636-
* was defined. File descriptors for the other IOF channels - stdout,
637-
* stderr, and stddiag - were released when their associated pipes
638-
* were cleared and closed due to termination of the process
639-
*/
635+
/* Release the IOF file descriptors */
640636
if (NULL != orte_iof.close) {
641-
orte_iof.close(proc, ORTE_IOF_STDIN);
637+
orte_iof.close(proc, ORTE_IOF_STDALL);
642638
}
643639
ORTE_FLAG_SET(pdata, ORTE_PROC_FLAG_IOF_COMPLETE);
644640
if (ORTE_FLAG_TEST(pdata, ORTE_PROC_FLAG_WAITPID)) {

0 commit comments

Comments
 (0)