Skip to content

fix: report queue post-job status correctly - #102

Open
Alkapuce wants to merge 1 commit into
bytedance:devfrom
Alkapuce:fix/issue-92-post-job-status
Open

fix: report queue post-job status correctly#102
Alkapuce wants to merge 1 commit into
bytedance:devfrom
Alkapuce:fix/issue-92-post-job-status

Conversation

@Alkapuce

@Alkapuce Alkapuce commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #92

Problem

A normally completed job can still show Post job process failed in bhist -l <jobid>.

Root Cause

When neither the queue nor the job configures POST_EXEC, mbd.job.c stores an empty postCmd. finishJob() still calls runQPost(), whose previous implementation returned -1 for an empty command. This caused the post-job process to exit with a non-zero status, so jobGone() set JOB_STAT_PERR and bhist reported Post job process failed.

The existing parent-process path also returned -1 after waiting, even when the post-exec command exited successfully.

Changes

  • Treat an empty POST_EXEC as success.
  • Retry waitpid() when interrupted by EINTR.
  • Return success only when the post-exec command exits with status 0.
  • Report non-zero exits, signal termination, and wait failures as errors.
  • Correct the qpre wait error message to qpost.

Validation

  • Clean Ubuntu 20.04 container
  • ./bootstrap.sh
  • ./configure --prefix=/tmp/volclava-install
  • make -j2
  • make check
  • git diff --check
  • git apply --check issue-92-fix.patch

All completed successfully.

@CLAassistant

CLAassistant commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants