Skip to main content

STALLED_RUNNING

Constant STALLED_RUNNING 

Source
pub const STALLED_RUNNING: Duration;
Expand description

How long a task may sit TaskStatus::Running with no live daemon’s heartbeat naming it before crate::conduct is shown it as stalled.

[reclaim_orphaned_running] settles most crashes immediately, on every poll, by attempting the task’s own claim: a dead pid is proof enough for sweep_stale_claims to drop the lock the same tick, and the very next claim attempt succeeds. But a lock whose pid cannot be parsed at all — an empty or corrupt .lock file — falls back to STALE_CLAIM’s six-hour age instead, since there is nothing else to check (see sweep_stale_claims’s own doc). For as long as that lock survives, the claim keeps failing and reclaim_orphaned_running correctly leaves the task running — see stalled_tasks_still_reaches_a_task_reclaim_could_not_claim_yet for exactly this ordering. stalled_tasks is what surfaces that task to the conductor well before the mechanical six-hour sweep would, and thirty minutes is comfortably below STALE_CLAIM while still being generous enough that a task merely late to publish its first HEARTBEAT is never mistaken for abandoned.