Skip to content
Snippets Groups Projects
Commit ece2347d authored by Moe Jette's avatar Moe Jette
Browse files

Fix bug in srun when using --no-shell option if not running under debugger

 (was causing segmentation fault).
Verify that a connection remains before trying to send a return code.
parent b1a3ac44
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,8 @@ documents those changes that are of interest to users and admins.
-- Create new allocation as needed for debugger in case old allocation
has been purged
-- Add Blue Gene User Guide to html documents
-- Fix srun bug that could cause seg fault with --no-shell option if not
running under a debugger
* Changes in SLURM 0.4.0-pre2
=============================
......
......@@ -115,13 +115,13 @@ DESTDIR="$RPM_BUILD_ROOT" make install
install -D -m755 etc/init.d.slurm $RPM_BUILD_ROOT/etc/rc.d/init.d/slurm
install -D -m644 etc/slurm.conf.example $RPM_BUILD_ROOT/etc/slurm/slurm.conf
# Delete unpackaged files:
rm -f $RPM_BUILD_ROOT/usr/lib/slurm/*.{a,la}
rm -f $RPM_BUILD_ROOT/%{_libdir}/slurm/*.{a,la}
# Build file lists for optional plugin packages
for plugin in auth_munge auth_authd switch_elan; do
LIST=./${plugin}.files
touch $LIST
test -f $RPM_BUILD_ROOT/usr/lib/slurm/${plugin}.so &&
test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/${plugin}.so &&
echo %{_libdir}/slurm/${plugin}.so > $LIST
done
......
......@@ -930,6 +930,9 @@ int slurm_send_rc_msg(slurm_msg_t *msg, int rc)
slurm_msg_t resp_msg;
return_code_msg_t rc_msg;
if (msg->conn_fd < 0)
return (ENOTCONN);
rc_msg.return_code = rc;
resp_msg.address = msg->address;
......
......@@ -222,8 +222,12 @@ static void _join_attached_threads (int nthreads, thd_t *th)
{
int i;
void *retval;
for (i = 0; i < nthreads; i++)
pthread_join (th[i].thread, &retval);
if (!opt.parallel_debug)
return;
for (i = 0; i < nthreads; i++) {
if (th[i].thread != (pthread_t) NULL)
pthread_join (th[i].thread, &retval);
}
return;
}
......@@ -294,6 +298,7 @@ static void _p_launch(slurm_msg_t *req, job_t *job)
if (job->ntask[i] == 0) { /* No tasks for this node */
debug("Node %s is unused",job->host[i]);
job->host_state[i] = SRUN_HOST_REPLIED;
thd[i].thread = (pthread_t) NULL;
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment