1
1

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.
Этот коммит содержится в:
Ralph Castain 2017-01-12 09:57:17 -08:00 коммит произвёл GitHub
родитель 110840fc87 fa419d3c0d
Коммит 9ad02b5d13
4 изменённых файлов: 6 добавлений и 13 удалений

Просмотреть файл

@ -12,7 +12,7 @@
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2016 Intel Corporation. All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -262,9 +262,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
NULL == proct->revstderr &&
NULL == proct->revstddiag) {
/* this proc's iof is complete */
opal_list_remove_item(&mca_iof_hnp_component.procs, &proct->super);
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
OBJ_RELEASE(proct);
}
return;
}

Просмотреть файл

@ -10,7 +10,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2016 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -40,6 +40,7 @@ typedef uint16_t orte_iof_tag_t;
#define ORTE_IOF_STDMERGE 0x0006
#define ORTE_IOF_STDDIAG 0x0008
#define ORTE_IOF_STDOUTALL 0x000e
#define ORTE_IOF_STDALL 0x000f
#define ORTE_IOF_EXCLUSIVE 0x0100
/* flow control flags */

Просмотреть файл

@ -167,9 +167,7 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata)
NULL == proct->revstderr &&
NULL == proct->revstddiag) {
/* this proc's iof is complete */
opal_list_remove_item(&mca_iof_orted_component.procs, &proct->super);
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
OBJ_RELEASE(proct);
}
if (NULL != buf) {
OBJ_RELEASE(buf);

Просмотреть файл

@ -1,6 +1,6 @@
/*
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -632,13 +632,9 @@ void orte_state_base_track_procs(int fd, short argc, void *cbdata)
if (pdata->state < ORTE_PROC_STATE_TERMINATED) {
pdata->state = state;
}
/* Release only the stdin IOF file descriptor for this child, if one
* was defined. File descriptors for the other IOF channels - stdout,
* stderr, and stddiag - were released when their associated pipes
* were cleared and closed due to termination of the process
*/
/* Release the IOF file descriptors */
if (NULL != orte_iof.close) {
orte_iof.close(proc, ORTE_IOF_STDIN);
orte_iof.close(proc, ORTE_IOF_STDALL);
}
ORTE_FLAG_SET(pdata, ORTE_PROC_FLAG_IOF_COMPLETE);
if (ORTE_FLAG_TEST(pdata, ORTE_PROC_FLAG_WAITPID)) {