Skip to content

Commit

Permalink
job-exec: fix confusing "job shell exec error" log message
Browse files Browse the repository at this point in the history
Problem: When the job-exec module detects an exec error for a job
shell it emits a confusing error message that includes either
the path to the job shell or the IMP (if a multiuser job), and
only the result of `strerror()` for the errno returned from
libsubprocess. When using sdexec, this errno is always `ENOENT`,
resulting in a confusing error message that seems to indicate
that `flux-imp` was not found.

It is unhelpful to include `argv[0]` in this error message. It will
always be the job shell or the IMP and we all know it. Drop this
from the log message.

Also, sdexec will provide extra information in the subprocess error
string available from `flux_subprocess_fail_error (p)`. Log this
instead of `strerror (errno)`.

Fixes #6568
  • Loading branch information
grondo committed Jan 24, 2025
1 parent 7ff6160 commit 9d1af0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/job-exec/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,12 @@ static void error_cb (struct bulk_exec *exec, flux_subprocess_t *p, void *arg)
}
else {
jobinfo_fatal_error (job,
errnum,
0,
"%s on broker %s (rank %d): %s",
"job shell exec error",
hostname,
rank,
flux_cmd_arg (cmd, 0));
flux_subprocess_fail_error (p));
}
}
else
Expand Down

0 comments on commit 9d1af0e

Please sign in to comment.