How Slurm states become observations¶
Find, FindMany and Inspect turn each Slurm job into a dispatch.ObjectObs: an object
state, a cause with a kind, a provenance and a detail, and the facts around them. This page
is the table the adapter applies. The state and cause names are go/dispatch's text forms, such as
gated and node-lost.
A job is read from squeue or scontrol show job JSON while Slurm still holds it. Inspect reads
it from sacct instead once it has left squeue, when AccountingHistory is yes; see
From sacct.
Pending jobs¶
A job whose base state is PENDING is classified by its reason, state_reason, and its restart
count, restart_cnt. The first row that matches applies.
| Reason | Restart count | State | Cause | Provenance | Detail |
|---|---|---|---|---|---|
JobHeldAdmin |
any | gated, with AdminHeld set |
none |
none |
|
JobHeldUser |
0 | gated |
none |
none |
|
JobHeldUser |
above 0 | pending |
requeued |
scheduler |
JobHeldUser |
BeginTime or None, with a start time that decodes as a hold |
0 | held |
none |
none |
|
BeginTime or None, with a start time that decodes as a hold |
above 0 | held |
requeued |
scheduler |
|
BeginTime or None, with a start time at or past the hold base that does not decode |
0 | pending |
none |
none |
start time <epoch seconds> is past the hold base but no dispatch hold |
BeginTime or None, as the row above |
above 0 | pending |
requeued |
scheduler |
the same |
| anything else | 0 | pending |
none |
none |
|
| anything else | above 0 | pending |
requeued |
scheduler |
JobHeldUser with no restart is the gate that sbatch --hold closes. After a requeue Slurm holds
the job with the same reason, which is why the restart count tells the two apart.
A start time decodes as a hold when start − submit − 315,576,000 seconds is between 1 and
4,294,967,295; Holds as a far-future start time explains the encoding.
The reason None counts with BeginTime because Slurm reports None for about two seconds after
the gate is opened, until its next scheduling pass.
HoldInstance is filled from the start time for every pending job, whatever its reason, so a gated
job that carries a hold shows both.
Running jobs¶
| Base state | Condition | State | Cause | Provenance | Detail |
|---|---|---|---|---|---|
RUNNING or SUSPENDED |
a node of the job is proved lost | running |
node-lost |
scheduler |
each lost node and what proves it |
RUNNING or SUSPENDED |
otherwise | running |
none |
none |
A node lost under a running job¶
On a Slurm cluster run on Kubernetes, such as Soperator, each Slurm node is a pod. When a pod is
replaced under a running job, the job's processes on that node go with it, and Slurm can go on
reporting the job RUNNING for minutes. The adapter reports that job as running with cause
node-lost. Dispatch's
node-loss fence then stops it and recovers
it as the job's policy says for node-lost: on the first pass when the lost node is the batch host
of a RUNNING job, and once the NodeLossWindow has passed for any other.
A node is proved lost when both of these hold:
- Slurm's
BootTimefor the node is more than one second after the job's start time. - The node's pod was created after the job's start time, or no longer exists.
A pod created before the job started proves nothing, even with its deletion pending.
The check runs at every Find, FindMany and Inspect, for each job the adapter submitted that
Slurm reports RUNNING or SUSPENDED without the CONFIGURING flag. A job without a usable
start time, or with a node list the adapter cannot read, is left out. It costs one
scontrol show node call per poll over those jobs' nodes, and one pod read for each node whose
BootTime is more than one second past the start of a job on it. A node several jobs share is
read once.
It needs the kubernetes section, with the pods rule granted and
the pod mapping confirmed when the backend opened. That check reads the pod of the first node of
each partition, and one that fails turns every pod read off. Without all three the adapter reads no
node for this and reports the job as Slurm does.
A read that fails proves nothing, and the poll does not fail. A failed pod read leaves that one
node unproved, so a job with another node proved lost still reads node-lost. A failed
scontrol show node leaves every job as Slurm reports it.
The detail names each lost node and the times that prove it:
Slurm reads the job RUNNING, but the execution that started at 2026-11-14T19:51:35Z lost worker-0, the batch host (pod created 2026-11-14T19:51:46Z, BootTime 2026-11-14T19:51:46Z, SlurmdStartTime 2026-11-14T19:51:46Z); it ended with its batch script, at the latest at the batch host's BootTime
A pod that no longer exists reads pod gone in place of pod created <time>, and several lost
nodes are separated by ;. The batch host is the node the job's batch script runs on.
A lost batch host took the batch script with it, so under a RUNNING job the adapter sets
Execution.Ended to that node's BootTime and the detail ends with the clause above. Dispatch then
stops the job on the first pass that sees it. For any other lost node, and for a SUSPENDED job,
Execution.Ended stays unset and dispatch waits the whole window.
Ended jobs¶
These rows apply to squeue and to sacct alike.
| Base state | Condition | State | Cause | Provenance | Detail |
|---|---|---|---|---|---|
COMPLETED |
ended |
none |
none |
||
FAILED |
the flag LAUNCH_FAILED, or the reason JobLaunchFailure |
ended |
launch-failed |
scheduler |
|
FAILED |
an adapter job with a node other than its batch host lost at the end | ended |
node-lost |
scheduler |
Slurm reads the job FAILED with exit code <n>, but it lost <node> (<how>), without with exit code <n> when Slurm set none, then the non-zero-exit row's detail after ;, if it has one |
FAILED |
otherwise | ended |
non-zero-exit |
application |
signal <number> <name> when a signal is set, such as signal 15 TERM; from sacct, signal <number> |
TIMEOUT |
ended |
time-limit |
scheduler |
||
OUT_OF_MEMORY |
ended |
out-of-memory |
application |
||
CANCELLED |
ended |
cancelled |
scheduler |
from squeue, the reason, such as None; from sacct, what follows the state, such as by 1000 |
|
PREEMPTED |
preempt_time is set and not 0 |
ended |
preempted |
scheduler |
|
PREEMPTED |
preempt_time is unset or 0 |
ended |
unknown |
none |
PREEMPTED without preempt_time |
NODE_FAIL |
failed_node is set |
ended |
node-lost |
scheduler |
failed_node <node> |
NODE_FAIL |
failed_node is empty |
ended |
unknown |
none |
NODE_FAIL without failed_node |
BOOT_FAIL |
ended |
launch-failed |
scheduler |
||
DEADLINE |
ended |
unknown |
none |
DEADLINE: dispatch never sets --deadline |
A non-zero-exit cause carries the job's return code as ExitCode when Slurm set one. No other
cause carries an exit code.
The adapter never reports the causes no-capacity, held, released or duplicate.
A FAILED job that lost a node¶
When a node other than the batch host dies, the step on it can end the batch script, and the job
FAILED, before slurmctld marks the node down and the job NODE_FAIL. So when squeue shows one
of the adapter's jobs FAILED, read within SlurmdTimeout plus MessageTimeout of its end, the
adapter reads its other nodes with scontrol show node. A node that is DOWN, NOT_RESPONDING, or
whose BootTime is past the execution's start plus MessageTimeout and 1 s, makes the end
node-lost. <how> is the node's state, such as DOWN+NOT_RESPONDING, or BootTime <time>, and
several lost nodes are separated by ;. A node whose state carries REBOOT_ISSUED is Slurm
rebooting it on request and is not lost. A reboot only requested, REBOOT_REQUESTED, does not
excuse a node that also reads down, not responding or booted since the start.
A read later than that window, a one-node job and a job that is not the adapter's keep the
non-zero-exit row: by then a node's state no longer says how the job ended. The sacct path
checks the nodes in the same way, taking the allocation's first node as the batch host, since
sacct does not print it. A node read that fails keeps the row, with its other nodes unread:
<error> added to the detail.
A multi-node failure is held¶
slurmctld may not have noticed a lost node by the time it ends the job. So a multi-node job of the
adapter's that ends FAILED, with no lost node showing yet, is held for
timeouts.multiNodeFailure after its end, 5 minutes by default.
While it is held, it reads as:
| State | Cause | Detail |
|---|---|---|
running |
none |
Slurm reads the job FAILED; waiting until <time> to see whether a node was lost |
Each read in the hold checks the other nodes again. A lost node showing ends the hold, and the job
is reported node-lost as above. Otherwise, once the hold is over, the job is reported by the
FAILED row, non-zero-exit or the launcher's cause. One-node jobs, and every other end, are never
held.
The hold ends sooner than configured when waiting longer would learn nothing:
- At
SlurmdTimeoutplusMessageTimeoutafter the end, by when slurmctld has noticed any node that stopped answering. That is 310 seconds on Slurm's defaults, so it shortens the 5-minute hold only on a cluster that lowers them. - Without accounting, at half of
MinJobAge, becausesqueueforgets a jobMinJobAgeafter it ends and nothing else can show its end. The declared windows of the end's state, cause and exit code are shorter by the hold, so a supervisor polls in time to read it.
On Slurm's defaults the hold is the full 5 minutes with accounting, and 150 seconds, half of the
default MinJobAge of 300 seconds, without it.
timeouts.multiNodeFailure: 0s turns the hold off.
The launcher's cause document¶
A non-zero-exit or out-of-memory end of one of the adapter's own jobs is refined by the
dispatch.app-cause.v1 document its launcher wrote at DISPATCH_CAUSE_FILE, by
appcause.Refine. The adapter reads at most 2049 bytes of it,
with the output manifest, in one script. Inspect, FindMany and the sacct path
each read it, every time they see the end, since a read-only backend cannot tell which observation
is the first.
| The document | The cause |
|---|---|
| missing | the row's, unchanged. This is the ordinary case for a job with no launcher |
| unreadable, or the manifest is | the row's, with launch document unread: <error> appended to the detail |
over 2048 bytes, refused by the decoder, of another execution, not ended, or saying none against the failure |
the row's, with Refine's reason appended to the detail |
| used | Refine's: the document's account leads the detail, and its kind may replace non-zero-exit |
A foreign job and the preflight probe are never read for.
Unknown states and flags¶
Slurm prints job_state as a list: one base state and any flags. The adapter knows the twelve base
states above and the flags of Slurm's data_parser/v0.0.44.
| What the list holds | State | Cause | Detail |
|---|---|---|---|
no known base state, such as a new state FROZEN |
ended if the job's end time is set and not after now, otherwise running |
unknown |
the whole list, comma separated |
the flag REVOKED, with or without a base state |
ended with no base state; otherwise as the base state says |
unknown |
the whole list, such as CANCELLED,REVOKED or PENDING,REVOKED |
a flag other than COMPLETING, CONFIGURING, LAUNCH_FAILED and REVOKED |
as the rows above say | as the rows above say | flags <list> appended, after ; if there is already a detail |
COMPLETING and CONFIGURING change nothing: a CANCELLED,COMPLETING job is ended with cause
cancelled. LAUNCH_FAILED matters only under FAILED.
An end time still ahead says nothing, because for a live job it is only Slurm's expected end.
A node list in a form the adapter does not recognise makes the call fail with an error that has no sentinel. It is never classified without its nodes.
From sacct¶
Inspect reads a job from sacct only when the job id is no longer in squeue and
AccountingHistory is yes. It uses the ended rows, with these differences:
saccthas nopreempt_time, so aPREEMPTEDrow is alwayspreempted.- The launch-failure test reads only the reason
JobLaunchFailure;sacctprints no flags. - A
non-zero-exitcause always carriesExitCode, from the return code insacct'sExitCodefield,0included. - A state with no row in the table is
ended, causeunknown, with the state and what follows it as the detail. The row is gone fromslurmctld, so the job has ended; what it ended as is not known. - A row that is still
PENDING,RUNNING,SUSPENDED,REQUEUEDorRESIZINGis refused with an error that has no sentinel.sacctcannot tell gated, held and pending apart, so the adapter does not guess.
A sacct observation carries the restart count from the allocation row's Restarts, but no
execution token, no hold instance and no requeue bit.
Foreign objects, submission and attempt¶
The adapter reads dispatch:s=<N>;a=<attempt> from the job's comment, with canonical decimals.
| Comment | From squeue |
From sacct |
|---|---|---|
| parses | Submission and Attempt set |
the same |
| does not parse | Foreign |
Foreign |
| empty | Foreign |
neither: submission and attempt unknown, because accounting keeps the comment only with AccountingStoreFlags=job_comment |
A foreign object is still reported, with its state and cause. Its cause's detail leads with why
the adapter took it for someone else's, its comment names no dispatch submission and attempt,
then any detail its state gives, joined with ;. dispatch's foreign: escalation quotes that
reason. Only objects named dj-<ULID> are found at all; see
How identity works.
The other facts¶
| Field | From squeue |
|---|---|
Execution.Restart |
restart_cnt |
Execution.Nodes |
nodes, expanded |
Execution.Token |
<N>.<Slurm job id>.<restart count>, the job's DISPATCH_ATTEMPT, when the comment parses |
Execution.Started |
start_time, only when the state is running or ended |
Execution.Ended |
end_time, only when the state is ended |
RequeueBit |
requeue |
HoldInstance |
decoded from the start time of a pending job; otherwise 0 |
AdminHeld |
set only for the reason JobHeldAdmin |