Skip to content

jobs: a job's record and its failure say why LSF ended it and what it used - #129

Closed
krokicki wants to merge 1 commit into
mainfrom
lsf-exit-reason
Closed

krokicki wants to merge 1 commit into
mainfrom
lsf-exit-reason

Conversation

@krokicki

@krokicki krokicki commented Dec 1, 2026

Copy link
Copy Markdown
Member

Why

A job that LSF kills at its memory limit ends EXIT (exit 130), and, killed before it could print, with empty logs. Nothing the worker kept said why:

  • The record's usage came from a bjobs call on the worker's host. A host without LSF commands (its jobs go through a csub relay) cannot make that call, so its records had no usage at all.
  • LSF's own reason was not asked for anywhere.

So the debugging agent and the repair agent, which see a job only through what the worker wrote down, could not tell a memory kill from a cancel, and left the dataset to a person.

What

The wait takes both from csub's last status of the job:

  • Usage: peak and average memory, the memory limit, CPU and run time. A record has it wherever the worker runs. lsf_usage is gone.
  • LSF's reason (exit_reason), for example TERM_MEMLIMIT: job killed after reaching LSF memory usage limit: in the record's outcome, and on JobOutcome and JobDone.

Where it shows:

  • A failed job's line of the timeline: crop job N ended EXIT (exit 130; LSF: TERM_MEMLIMIT: …). The debugging agent reads that line in failure.md.
  • The page's job view: an "ended by LSF" row.
  • The repair agent's question says where the reason and the usage are in a job's file.

Notes for review

  • JobOutcome.exit_reason and JobDone.exit_reason are new fields with defaults (activity results are wire format). A history recorded before this replays to the same text: the reason is empty there.
  • The record keeps its usage keys (max_mem, memlimit, …); the values are text with a unit (16076.8 MB), so the page reads records written before and after alike.
  • The reason is kept to 200 characters and comes from csub, which reads it from LSF's bjobs column or from the one line LSF writes above its verdict.
  • Not in this change: autodev's two failure messages (agent job, review judge) do not quote the reason; their job records hold it.

Depends on

csub reports exit_reason from saalfeldlab/csub#23 on. Until the pinned csub has it the field is empty and nothing else changes; usage works with the csub that is pinned now. After that PR merges, the csub pin in pixi.lock needs an update.

Tested

  • test_a_job_lsf_ended_says_why_and_what_it_used (named after the incident): record, outcome and failure line of a job killed at its memory limit.
  • usage_of for a full status, no status, a csub that reports no figures, and values that are not numbers.
  • The page's job view shows the row.
  • Lint, mypy, the replay tests, and the job record, job runner, activity, sweep and repair-agent tests. The workflow scenario tests were not run.

🤖 Generated with Claude Code

… used

A job that LSF killed at its memory limit ended EXIT (exit 130) with
empty logs, and nothing the worker kept said why: the record's usage came
from a `bjobs` call on the worker's host, which a host without LSF (the
jobs go through a csub relay) cannot make.

The wait now takes both from csub's last status of the job:

- usage (peak and average memory, the memory limit, CPU and run time), so
  a record has it wherever the worker runs; `lsf_usage` is gone;
- LSF's own reason (`exit_reason`, such as "TERM_MEMLIMIT: job killed
  after reaching LSF memory usage limit"), in the record's outcome and on
  `JobOutcome` and `JobDone` (new fields with defaults).

The reason is in a failed job's line of the timeline ("crop job N ended
EXIT (exit 130; LSF: TERM_MEMLIMIT: ...)"), which the debugging agent
reads in failure.md; the page's job view shows it, and the repair agent's
question says where it and the usage are in a job's file.

csub reports the reason from saalfeldlab/csub#23 on; until the pinned
csub has it, the field is empty and nothing else changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@krokicki

krokicki commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Closing without merging: this commit is merged onto the dev branch and will reach main with it in one pull request.

@krokicki krokicki closed this Dec 4, 2026
@krokicki
krokicki deleted the lsf-exit-reason branch December 4, 2026 19:50
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.

1 participant