Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#1958 run tracker: hostname-based PID liveness check fails in containers sharing a hostname

Opened by stack72 · 9/2/2026· Shipped 9/2/2026

What happens

reapStaleRuns and reapDeadProcessRuns in run_tracker_store.ts use hostname() to decide whether a tracker row belongs to the local PID namespace. In Docker, multiple containers (serve, worker, serve-move) report the same hostname but each has its own PID namespace. Every container runs swamp at a low PID (e.g. 7).

When serve evaluates a row written by the worker container, run.hostname === currentHostname is true, so it signals PID 7 in its own namespace — which is serve itself, alive. shouldReap is false for every row.

reapDeadProcessRuns has a second failure mode: it skips run.pid === Deno.pid. At boot, serve IS PID 7, so every row is skipped before the liveness check runs.

run gc cannot help either — it never deletes rows marked running.

There is no supported way to clear these records, so they accumulate across restarts.

Root cause

hostname() does not identify a PID namespace. The liveness check needs something that does — instance id, boot id, or container id.

Affected code

  • src/infrastructure/persistence/run_tracker_store.ts:357-390 (reapStaleRuns, reapDeadProcessRuns)
  • src/infrastructure/runtime/process.ts:29-41 (isProcessDead)

Discovered during triage of swamp-club#1955 (boot reconciliation stall). That issue covers the broken lease sweep; this issue covers why orphaned run tracker records accumulate in the first place.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 7 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/2/2026, 6:13:56 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/2/2026, 5:33:24 PM

Sign in to post a ripple.