Skip to content

Commit 01a6713

Browse files
authored
Merge pull request #7337 from jjhursey/no-ssh-core
plm/rsh: Fix segv on missing agent.
2 parents e9a54e8 + 62d0058 commit 01a6713

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

orte/mca/errmgr/base/errmgr_base_fns.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2014 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2020 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -119,7 +120,9 @@ void orte_errmgr_base_abort(int error_code, char *fmt, ...)
119120
/* if I am a daemon or the HNP... */
120121
if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) {
121122
/* whack my local procs */
122-
orte_odls.kill_local_procs(NULL);
123+
if( NULL != orte_odls.kill_local_procs ) {
124+
orte_odls.kill_local_procs(NULL);
125+
}
123126
/* whack any session directories */
124127
orte_session_dir_cleanup(ORTE_JOBID_WILDCARD);
125128
}

orte/mca/plm/rsh/plm_rsh_component.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Copyright (c) 2010 Oracle and/or its affiliates. All rights
1717
* reserved.
1818
* Copyright (c) 2009-2018 Cisco Systems, Inc. All rights reserved
19-
* Copyright (c) 2011-2019 IBM Corporation. All rights reserved.
19+
* Copyright (c) 2011-2020 IBM Corporation. All rights reserved.
2020
* Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
2121
* $COPYRIGHT$
2222
*
@@ -371,6 +371,10 @@ char **orte_plm_rsh_search(const char* agent_list, const char *path)
371371
char **tokens, *tmp;
372372
char cwd[OPAL_PATH_MAX];
373373

374+
if (NULL == agent_list && NULL == mca_plm_rsh_component.agent) {
375+
return NULL;
376+
}
377+
374378
if (NULL == path) {
375379
getcwd(cwd, OPAL_PATH_MAX);
376380
} else {
@@ -421,6 +425,14 @@ static int rsh_launch_agent_lookup(const char *agent_list, char *path)
421425
char *bname;
422426
int i;
423427

428+
if (NULL == agent_list && NULL == mca_plm_rsh_component.agent) {
429+
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
430+
"%s plm:rsh_lookup on agent (null) path %s - No agent specified.",
431+
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
432+
(NULL == path) ? "NULL" : path));
433+
return ORTE_ERR_NOT_FOUND;
434+
}
435+
424436
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
425437
"%s plm:rsh_lookup on agent %s path %s",
426438
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),

0 commit comments

Comments
 (0)