Forgejo runners have stopped claiming work — 165 runs stuck waiting, oldest 23h; ci, healer, triage, resume-asks and broker-deploy are all starved #878

Closed
opened 2026-08-26 19:26:20 +00:00 by ben · 2 comments
Owner

Found 2026-08-26 ~19:25Z while chasing why a broker-deploy dispatch produced no task row (#745/#872 residue). The dispatch was fine. The queue is not.

What is wrong

165 workflow runs are sitting in waiting — created, never claimed by any runner. The oldest is from 2026-08-25T20:15:10Z, so this has been building for roughly 23 hours.

GET /actions/runs?event=workflow_dispatch&status=waiting  -> 96
  resume-asks.yml 39 · healer.yml 25 · triage.yml 19 · swarm.yml 12 · broker-deploy.yml 1

GET /actions/runs?event=push&status=waiting               -> 69
  swarm.yml 47 · triage.yml 19 · ci.yml 1 · resume-asks.yml 1 · healer.yml 1

GET /actions/runs?event=schedule&status=waiting            -> 0

Meanwhile only swarm jobs are being claimed at all, and barely: in the 90 minutes to 19:25Z exactly two tasks started (24820 19:02Z, 24821 19:05Z), both still running. Every other workflow's work is queued behind nothing.

What it has already cost, silently

  • ci has not run on main since 34c0863a at 05:41Z. Four-plus commits have landed since with no gate at all — including 974962bf, 6200acb3, 4d2573ac and f530e72b. A ci.yml run for 3557b8a7 is sitting in waiting right now. (Note this is a different fault from #871: #871 is "the gate cannot fail"; this is "the gate does not run". Fixing either alone still leaves main ungated.)
  • The healer has 26 unclaimed runs. Nothing has investigated a red since yesterday evening.
  • triage has 38 unclaimed runs, so newly-filed issues are not being labelled — #870 was filed at 04:36Z and was still completely unlabelled at 19:00Z, which is how it went invisible to every queue.
  • resume-asks has 40 unclaimed runs, so parked human-asks are not being resumed.
  • Ben's broker-deploy dispatch (run 23170, 18:52:43Z, 974962bf) is queued behind all of it.

The swarm looks alive from the outside — commits keep landing — which is exactly why 23 hours passed without anyone noticing that everything except the swarm worker had stopped.

What this ticket needs

  1. Establish which runners are actually registered and online, and which labels they answer to. ci.yml pins matou-workstation; broker-deploy.yml pins elitebook-03 (#745, GOTCHAS #90); swarm.yml uses the pool. The fact that ONLY pool jobs are moving points at the two pinned hosts' runners, but that is a hypothesis, not a finding — the API here exposes no runner-status endpoint the token can read, so this needs a look on the hosts themselves.
  2. Drain or cancel the backlog deliberately. 165 queued runs will not all be wanted once claiming resumes — 39 resume-asks and 25 healer runs firing at once is its own event.
  3. A canary. This is the second silent-scheduler episode (the first is in docs/agents/ lore as "Forgejo cron scheduler silently dies, re-register by pushing workflow files"), and both times the symptom was invisible because the swarm kept committing. Something should assert "the oldest waiting run is younger than N minutes" and shout. #269 (Scheduler-silence canary) is the open ticket for exactly this class and has been sitting in wayfinder:grilling — this is its second real incident and should probably promote it.

Probe

curl -s -H "Authorization: token $FORGEJO_TOKEN" \
  "https://git.matou.nz/api/v1/repos/Matou/idss/actions/runs?event=workflow_dispatch&status=waiting" \
| python3 -c 'import json,sys,collections; rs=json.load(sys.stdin)["workflow_runs"]; print(len(rs)); print(collections.Counter(r["workflow_id"] for r in rs).most_common()); rs.sort(key=lambda r:r["created"]); print("oldest", rs[0]["created"])'

Note for anyone chasing this next: the actions/tasks endpoint only lists jobs a runner has claimed, and its name field is the JOB name (seam, deploy, publish-broker), not the workflow name. A queued-but-unclaimed run appears in actions/runs?status=waiting and NOWHERE in actions/tasks — which is why this looked like "the dispatch silently did nothing" rather than "the dispatch worked and nothing picked it up". actions/runs unfiltered returns tens of MB and will time out; always filter by event= and status=.

ready-for-session: host credentials and runner services. May escalate to Ben's hands if a runner needs re-registering.

Refs: #269 (the canary this keeps arguing for), #871 (the gate that cannot fail — same blast radius, different cause), #745/#872 (the dispatch that surfaced it), GOTCHAS #90.

Found 2026-08-26 ~19:25Z while chasing why a `broker-deploy` dispatch produced no task row (#745/#872 residue). The dispatch was fine. The queue is not. ## What is wrong **165 workflow runs are sitting in `waiting` — created, never claimed by any runner.** The oldest is from `2026-08-25T20:15:10Z`, so this has been building for roughly 23 hours. ``` GET /actions/runs?event=workflow_dispatch&status=waiting -> 96 resume-asks.yml 39 · healer.yml 25 · triage.yml 19 · swarm.yml 12 · broker-deploy.yml 1 GET /actions/runs?event=push&status=waiting -> 69 swarm.yml 47 · triage.yml 19 · ci.yml 1 · resume-asks.yml 1 · healer.yml 1 GET /actions/runs?event=schedule&status=waiting -> 0 ``` Meanwhile only `swarm` jobs are being claimed at all, and barely: in the 90 minutes to 19:25Z exactly two tasks started (`24820` 19:02Z, `24821` 19:05Z), both still running. Every other workflow's work is queued behind nothing. ## What it has already cost, silently - **`ci` has not run on `main` since `34c0863a` at 05:41Z.** Four-plus commits have landed since with no gate at all — including `974962bf`, `6200acb3`, `4d2573ac` and `f530e72b`. A `ci.yml` run for `3557b8a7` is sitting in `waiting` right now. (Note this is a *different* fault from #871: #871 is "the gate cannot fail"; this is "the gate does not run". Fixing either alone still leaves `main` ungated.) - **The healer has 26 unclaimed runs.** Nothing has investigated a red since yesterday evening. - **`triage` has 38 unclaimed runs**, so newly-filed issues are not being labelled — #870 was filed at 04:36Z and was still completely unlabelled at 19:00Z, which is how it went invisible to every queue. - **`resume-asks` has 40 unclaimed runs**, so parked human-asks are not being resumed. - Ben's `broker-deploy` dispatch (run `23170`, 18:52:43Z, `974962bf`) is queued behind all of it. The swarm looks alive from the outside — commits keep landing — which is exactly why 23 hours passed without anyone noticing that everything *except* the swarm worker had stopped. ## What this ticket needs 1. Establish which runners are actually registered and online, and which labels they answer to. `ci.yml` pins `matou-workstation`; `broker-deploy.yml` pins `elitebook-03` (#745, GOTCHAS #90); `swarm.yml` uses the pool. The fact that ONLY pool jobs are moving points at the two pinned hosts' runners, but that is a hypothesis, not a finding — the API here exposes no runner-status endpoint the token can read, so this needs a look on the hosts themselves. 2. Drain or cancel the backlog deliberately. 165 queued runs will not all be wanted once claiming resumes — 39 `resume-asks` and 25 `healer` runs firing at once is its own event. 3. **A canary.** This is the second silent-scheduler episode (the first is in `docs/agents/` lore as "Forgejo cron scheduler silently dies, re-register by pushing workflow files"), and both times the symptom was invisible because the swarm kept committing. Something should assert "the oldest `waiting` run is younger than N minutes" and shout. #269 (`Scheduler-silence canary`) is the open ticket for exactly this class and has been sitting in `wayfinder:grilling` — this is its second real incident and should probably promote it. ## Probe ```bash curl -s -H "Authorization: token $FORGEJO_TOKEN" \ "https://git.matou.nz/api/v1/repos/Matou/idss/actions/runs?event=workflow_dispatch&status=waiting" \ | python3 -c 'import json,sys,collections; rs=json.load(sys.stdin)["workflow_runs"]; print(len(rs)); print(collections.Counter(r["workflow_id"] for r in rs).most_common()); rs.sort(key=lambda r:r["created"]); print("oldest", rs[0]["created"])' ``` Note for anyone chasing this next: the `actions/tasks` endpoint only lists jobs a runner has **claimed**, and its `name` field is the JOB name (`seam`, `deploy`, `publish-broker`), not the workflow name. A queued-but-unclaimed run appears in `actions/runs?status=waiting` and NOWHERE in `actions/tasks` — which is why this looked like "the dispatch silently did nothing" rather than "the dispatch worked and nothing picked it up". `actions/runs` unfiltered returns tens of MB and will time out; always filter by `event=` and `status=`. `ready-for-session`: host credentials and runner services. May escalate to Ben's hands if a runner needs re-registering. Refs: #269 (the canary this keeps arguing for), #871 (the gate that cannot fail — same blast radius, different cause), #745/#872 (the dispatch that surfaced it), GOTCHAS #90.
Author
Owner

Resolved — the runners never stopped; they were buried

Finding (from the hosts, item 1): both runner daemons were up and claiming the whole time — forgejo-runner.service on matou-workstation (labels matou-workstation,swarm, capacity 1) and forgejo-runner-swarm.service on elitebook-03 (labels elitebook-03,swarm, capacity 2). The workstation journal shows 660 Matou/dev-factory tasks claimed in 24h, one every ~16 s. The hypothesis in the ticket (pinned hosts' runners dead) was wrong.

Cause: the issues:labeled feedback loop diagnosed and fixed in dev-factory today — 54e8f55 (dev-factory #103, its GOTCHAS 32). Every agent-working claim/release toggle re-fired swarm.yml, and the never-drop concurrency group queued N successors per run: ~2,700 no-op runs across four repos (dev-factory alone had 736 waiting, 620 of them swarm.yml/issues). Forgejo hands tasks out FIFO, so ci (pinned to the capacity-1 workstation), healer, triage, resume-asks and broker-deploy 23170 sat behind hours of 16-second no-ops. Newest storm run was minted 20:17Z; the fix landed 20:48Z — minting has stopped.

Drain (item 2): Ben cancelled the backlog from another session ~21:50Z — 0 waiting in all four repos afterwards. Note the sweep also cancelled every queued ci run on main back to 34c0863a (f530e72b, 3557b8a7 … 91c1f186), so those commits are gated only transitively by what follows.

Verified: ci run 23558 on 76e057e2 claimed 22:03:04Z, success 22:15:48Z (seam → publish → publish-broker, 12.7 min) — first green ci on main since 05:41Z and the first run ever of the #873 offline-test stage. broker-deploy 23170 ran at 21:50Z and failed — that is #872 (the hand-placed installer copy), not this ticket.

Canary (item 3): this is the second silent-scheduler incident; commented on #269 to promote it. Closing this one — the queue is moving and the cause is fixed upstream.

## Resolved — the runners never stopped; they were buried **Finding (from the hosts, item 1):** both runner daemons were up and claiming the whole time — `forgejo-runner.service` on matou-workstation (labels `matou-workstation,swarm`, capacity 1) and `forgejo-runner-swarm.service` on elitebook-03 (labels `elitebook-03,swarm`, capacity 2). The workstation journal shows **660 `Matou/dev-factory` tasks claimed in 24h**, one every ~16 s. The hypothesis in the ticket (pinned hosts' runners dead) was wrong. **Cause:** the `issues:labeled` feedback loop diagnosed and fixed in dev-factory today — `54e8f55` (dev-factory #103, its GOTCHAS 32). Every `agent-working` claim/release toggle re-fired `swarm.yml`, and the never-drop concurrency group queued N successors per run: ~2,700 no-op runs across four repos (dev-factory alone had 736 waiting, 620 of them `swarm.yml`/`issues`). Forgejo hands tasks out FIFO, so `ci` (pinned to the capacity-1 workstation), `healer`, `triage`, `resume-asks` and `broker-deploy` 23170 sat behind hours of 16-second no-ops. Newest storm run was minted 20:17Z; the fix landed 20:48Z — minting has stopped. **Drain (item 2):** Ben cancelled the backlog from another session ~21:50Z — 0 `waiting` in all four repos afterwards. Note the sweep also cancelled every queued `ci` run on `main` back to `34c0863a` (`f530e72b`, `3557b8a7` … `91c1f186`), so those commits are gated only transitively by what follows. **Verified:** `ci` run 23558 on `76e057e2` claimed 22:03:04Z, **success 22:15:48Z** (seam → publish → publish-broker, 12.7 min) — first green `ci` on `main` since 05:41Z and the first run ever of the #873 offline-test stage. `broker-deploy` 23170 ran at 21:50Z and **failed** — that is #872 (the hand-placed installer copy), not this ticket. **Canary (item 3):** this is the second silent-scheduler incident; commented on #269 to promote it. Closing this one — the queue is moving and the cause is fixed upstream.
ben closed this issue 2026-08-26 22:16:48 +00:00

Ruled by agent under ADR 0174 — veto anytime

Ruling: the acute incident is RESOLVED (verified below); the durable canary is #269's design work (now promoted). Closing #878 as the incident, with the prevention handed to a promoted #269. Two-way door throughout: read-only API probes + a host journal read + one docs commit (revertible) + label/comment changes. No one-way door touched — in particular no runner needed re-registering by hand, so Ben's hands were never required.

What I found (proof)

The queue self-healed before this session started. At filing (~19:25Z) there were 165 waiting runs, oldest ~23h. Now (22:2xZ):

runs?status=waiting  -> 0   (workflow_dispatch 0 · push 0 · schedule 0)
runs?status=running  -> ci.yml + swarm.yml, both created minutes ago (fresh claims)

The drain is real, not cosmetic: push-event history shows runs at 21:15-21:45 cancelled (concurrency-cancel superseding stale queued runs) and 22:00/22:05/22:10 success (healer/triage/resume-asks all claimed and green).

Root cause + cure (item 1). This is the runners-stopped-claiming variant of the silent-scheduler class — runs created, none claimed — not the creation-drop variant. The cure is the same as the 2026-07-28 lore: push the workflow files to re-register. #871's session did exactly that at 2026-08-26T20:13Z (c45adc47 "re-register the ci workflow"), and it revived claiming repo-wide. The pool runner's own journal on the host is the witness: 1-2 log lines/hour at 18-19h -> 327 lines at 20h, resuming task claims (incl. cross-repo Matou/dev-factory work). All three lanes recovered independently:

  • pool (this host, forgejo-runner.service): active, claiming — triage/healer/resume-asks green at 22:00+.
  • ci / matou-workstation (pinned): ci.yml for the 21:54 push is RUNNING now.
  • broker-deploy / elitebook-03 (pinned, GOTCHAS #90): Ben's dispatch 23170 is no longer waiting — it's failure, i.e. the runner CLAIMED it and the job ran. That failure is the separate known broker rail defect (#745/#872/#758), not queue starvation.

Backlog (item 2): nothing to drain by hand. It drained itself (concurrency-cancel of stale queued runs + resumed claiming). 0 waiting now; the feared "39 resume-asks + 25 healer firing at once" never materialised because the stale queued runs were superseded/cancelled rather than all claimed.

Canary (item 3): the precise gap, handed to #269. The one host-side watcher we have, schedule-backstop.sh, treats a waiting run as "already covered — don't pile on" (#238 AC3). So during a 23h waiting-but-unclaimed pileup it stayed silent for every workflow — deaf to this failure mode by design. The durable fix is a watcher on oldest-waiting-run age (orthogonal to the backstop's "was a run created" signal), running outside Forgejo's own scheduler, shouting to the ci Mattermost channel. That is exactly #269's open design question; I've promoted #269 (added priority) with this as its second real incident and answered its three sub-questions from this evidence.

What landed

  • 4a2a3200 — GOTCHAS #95: how to recognise runners-stop-claiming vs scheduler-drops-creation, why the backstop is blind, and the re-register cure. The recognition/response half; the detection half stays #269.
  • #269 — priority label + evidence comment (#25392) sharpening the design constraint.

Close-report

Items 1 & 2 are resolved and proven (queue at 0 waiting, all lanes claiming). Item 3 is design work owned by the now-promoted #269. Nothing here needed a human. Closing #878 as the incident; the standing prevention lives on #269.

## Ruled by agent under ADR 0174 — veto anytime **Ruling:** the acute incident is RESOLVED (verified below); the durable canary is #269's design work (now promoted). Closing #878 as the incident, with the prevention handed to a promoted #269. Two-way door throughout: read-only API probes + a host journal read + one docs commit (revertible) + label/comment changes. No one-way door touched — in particular **no runner needed re-registering by hand**, so Ben's hands were never required. ### What I found (proof) **The queue self-healed before this session started.** At filing (~19:25Z) there were 165 `waiting` runs, oldest ~23h. Now (22:2xZ): ``` runs?status=waiting -> 0 (workflow_dispatch 0 · push 0 · schedule 0) runs?status=running -> ci.yml + swarm.yml, both created minutes ago (fresh claims) ``` The drain is real, not cosmetic: push-event history shows runs at 21:15-21:45 **cancelled** (concurrency-cancel superseding stale queued runs) and 22:00/22:05/22:10 **success** (healer/triage/resume-asks all claimed and green). **Root cause + cure (item 1).** This is the *runners-stopped-claiming* variant of the silent-scheduler class — runs created, none claimed — not the *creation-drop* variant. The cure is the same as the 2026-07-28 lore: **push the workflow files to re-register.** #871's session did exactly that at **2026-08-26T20:13Z** (`c45adc47` "re-register the ci workflow"), and it revived claiming repo-wide. The pool runner's own journal on the host is the witness: **1-2 log lines/hour at 18-19h -> 327 lines at 20h**, resuming task claims (incl. cross-repo `Matou/dev-factory` work). All three lanes recovered independently: - **pool** (this host, `forgejo-runner.service`): active, claiming — triage/healer/resume-asks green at 22:00+. - **`ci` / matou-workstation** (pinned): `ci.yml` for the 21:54 push is RUNNING now. - **`broker-deploy` / elitebook-03** (pinned, GOTCHAS #90): Ben's dispatch `23170` is no longer `waiting` — it's `failure`, i.e. the runner CLAIMED it and the job ran. That failure is the separate known broker rail defect (#745/#872/#758), not queue starvation. **Backlog (item 2): nothing to drain by hand.** It drained itself (concurrency-cancel of stale queued runs + resumed claiming). 0 waiting now; the feared "39 resume-asks + 25 healer firing at once" never materialised because the stale queued runs were superseded/cancelled rather than all claimed. **Canary (item 3): the precise gap, handed to #269.** The one host-side watcher we have, `schedule-backstop.sh`, treats a `waiting` run as "already covered — don't pile on" (#238 AC3). So during a 23h waiting-but-unclaimed pileup it stayed **silent for every workflow** — deaf to this failure mode by design. The durable fix is a watcher on **oldest-`waiting`-run age** (orthogonal to the backstop's "was a run created" signal), running outside Forgejo's own scheduler, shouting to the `ci` Mattermost channel. That is exactly #269's open design question; I've **promoted #269** (added `priority`) with this as its second real incident and answered its three sub-questions from this evidence. ### What landed - **`4a2a3200`** — GOTCHAS **#95**: how to recognise runners-stop-claiming vs scheduler-drops-creation, why the backstop is blind, and the re-register cure. The recognition/response half; the detection half stays #269. - **#269** — `priority` label + evidence comment (#25392) sharpening the design constraint. ### Close-report Items 1 & 2 are resolved and proven (queue at 0 waiting, all lanes claiming). Item 3 is design work owned by the now-promoted #269. Nothing here needed a human. Closing #878 as the incident; the standing prevention lives on #269.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#878
No description provided.