Repository navigation
cluster: an admission deadline ends that request, not the pair - #1762
Merged
Merged
Conversation
Production, 2026-11-03 23:07-23:19Z: six drops of the GLM-5.3-Flash pair in 19 minutes, and the same trigger on 2026-11-01 03:37Z (0.10.6). A request arrived with little of its first-content budget left, rank 0 answered its reservation at its next step boundary, after that admission deadline, and the leader ended the whole pair. These checks are red on origin/dev (0f99ddb) and green with the fix that follows: - ClusterWorkerPairAdmissionDeadlineTests (scripted ranks in process): on a lane pair, a reservation answered after the request's admission deadline ends that request with a deadline outcome while the decoding lane finishes and nothing is fenced; a request ended before rank 1 was asked never fences rank 1; a closed link still ends the pair. - LinkWorkerChecks: the same deadline through both real owners and the link control channel (the follower printed the production line "fenced leader fenced: the request was cancelled before it started"), and a relayed reservation past its delivery deadline (the 23:10:25Z variant, "fenced command refused"). - PartialAdmissionTests and ProviderDeadlinePipeCheck asserted the old behaviour (pair quarantined, both ranks fenced) and now assert that only the request ends. missingProof keeps its contract with a rank that misses the pair's own admission wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A request that arrives with little of its first-content budget left can
see a busy rank answer its reservation at its next step boundary, after
that admission deadline. The leader treated that as a pair failure: it
invalidated the pair (every lane in flight failed with "distributed peer
readiness lost"), fenced rank 1, which was never asked ("leader fenced:
the request was cancelled before it started"), and its follower closed
its worker. Production, 2026-11-03 23:07-23:19Z: six drops of the
GLM-5.3-Flash pair in 19 minutes (and 2026-11-01 03:37Z on 0.10.6).
- ClusterWorkerPair.reserve: a deadline during admission, once the
request's own deadline has passed, is that request's outcome. It is
cancelled with `.deadline`, so its cleanup retires alone: an answer
still on its way is read and an admission given back within the lane
wait, and the pair stays valid. A rank that does not give it back in
time still ends the pair; every other failure keeps the catch-all.
- ClusterWorkerRequest.admit: a reservation is delivered within the
pair's admission wait, not with the request's admission deadline.
Each rank's owner (ClusterWorkerOwnerService) fences a worker whose
reservation is unanswered past its delivery deadline, so with the
budget as that deadline rank 0's own owner still ended the pair (the
link check shows it with the other fixes alone). The request's
deadline still bounds how long reserve waits for the answers; a rank
is not asked once it has passed, and a send closed only because its
deadline passed is that deadline.
- ClusterWorkerRequest.cleanup: a rank never asked is acknowledged,
never fenced, whatever ended the request.
- ClusterLinkWorkerServer: a relayed reservation that reaches the
follower past its delivery deadline is that request's refusal
(commandRefused, deadline), not a fence of the follower's session.
No wire format changes. docs/architecture/inference.md states the rule;
docs/developer/test.md names the checks; changelog fragment added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…changelog Behavior-preserving cleanup of the admission-deadline fix (the required refactor pass). No source logic, wire format or test assertion changes. - ClusterWorkerRequest.admit: drop the claim that every command is delivered within the pair's admission wait (start and token decisions use the request's generation deadline, cancels the cleanup wait). Say why a send a still-serving endpoint closed is a deadline, not a lost rank. - ClusterWorkerRequest.cleanup: state the never-asked rule once, at its branch, instead of in three overlapping comments. - LinkWorkerPairCheck: one local helper relays each leader command in the expired-reservation check, instead of three hand-built wires. - ClusterWorkerPairAdmissionDeadlineTests: drop the task-list labels (a) and (c) from the doc comments. - docs/architecture/inference.md: fold "a rank not yet asked is not asked" and "only a rank that does not give the reservation back in time ends the pair" into the sentences they belong to, with the same facts; restamped. - changelog: the heading and one plain sentence for pair owners. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 of 17 tasks
…s owner The admission-deadline paragraph said every reservation is delivered within the pair's admission wait. A reservation's delivery deadline is also capped by the request's generation deadline, and each rank's owner holds every request to that deadline (ClusterOwnerLeaseState.clock), so a rank that still holds a request when it passes still ends the pair. Say so, and say where the generation deadline comes from: the setup's request deadline counted from the request's arrival; the coordinator's first_content_budget_ms sets only the admission deadline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 4, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production proof
The production GLM-5.3-Flash tensor-parallel pair (two M5 Ultras, 8 lanes, provider 0.10.7) dropped 6 times in 19
minutes on 2026-11-03. The drops cost 14
engine_errorterminals among 54 terminal lines. Each drop was a sessionfence followed by a re-form about 20 s later, never a crash:
session fenced: leader fenced: the request was cancelled before it startedsession fenced: command refused(the follower's own fence)leader fenced: …leader fenced: …leader fenced: …forced-exit reason=lost-input: its own owner closed its input becauseits session was fenced.
follower_failed/peer_lost, and every request in flight ended withdistributed peer readiness lost.follower_failed/peer_lost: "leaderfenced: the request was cancelled before it started"), with two requests failing "distributed peer readiness lost".
An epoch bug, fixed in cluster: fix the pair engine's cancellation deadlock that left the GLM pair refusing every start #1717, then kept that pair down for about 13 h; since cluster: fix the pair engine's cancellation deadlock that left the GLM pair refusing every start #1717 the pair re-forms, so the trigger
repeats.
The same lines from the code on
dev(0f99ddb18), with the checks this PR adds. These are two processes over theloopback link control channel, with both ranks behind the real owner service:
Summary
Cause. A request can arrive with little of its first-content budget left. On a busy pair, rank 0 answers the
request's reservation at its next step boundary, after that admission deadline, and the leader treated that as a pair
failure:
The reservation also carried that nearly spent budget as its delivery deadline, so rank 0's own owner fenced rank 0:
ClusterWorkerOwnerServicefences a worker whose reservation is unanswered past its delivery deadline.Fix.
ClusterWorkerOwnerError.deadline.Linked issue
None filed. Production incident 2026-11-03 23:07–23:19Z (and 2026-11-01 03:37Z).
Test plan
devwith only the tests added (98418eacc), green with the fix (9a2398808):ClusterWorkerPairAdmissionDeadlineTests, run bybash libs/darkbloom-cluster/Tests/RemoteChecks/run.sh(scriptedranks):
decoding lane finishes its 80 tokens, the next request is served, and the reservation is delivered within the
admission wait;
bash libs/darkbloom-cluster/Tests/LinkWorkerChecks/run.sh:commandRefused(deadline), and the follower's sessionserves on.
bash libs/darkbloom-cluster/Tests/ProcessChecks/run.sh, with real children:PartialAdmissionTests.admissionDeadlineand
ProviderDeadlinePipeCheck, the latter on the provider's own deadline and owner sources.rank 0's own owner. The link check shows
admission: the request's deadline passed and a rank did not give it back.RetirementPolicyTests);libs/darkbloom-cluster-worker/Tests/QualificationChecks/run.sh: 80/0.policy, installed lanes and cancellation, the HTTP lifecycle and deadlines.
make docs-check,make docs-impact-check BASE=origin/dev,make changelog-check,git diff --check.being installed on the owner's M5 Ultra × M5 Ultra pair to run GLM-5.3-Flash under concurrent load. Pass means no
session fencedon the follower, no bursts ofdistributed peer readiness lost, and only late requests ending withthe deadline error. Results will be added here.
Components touched
libs/darkbloom-cluster(DarkbloomClusterProcess,DarkbloomClusterRemote), which the provider linksProtocol / interface changes
first-content budget);
commandRefusedalready carried any request-scoped refusal reason, anddeadlineis one.Documentation impact
docs/architecture/inference.md: the admission-deadline rule, beside the cluster request engine's cancellationinvariant;
docs/developer/test.md: the checks.Changelog
changelog.d/cluster-admission-deadline-per-request.mdand ranmake changelog-check.Notes for reviewers
PartialAdmissionTestssaid "an unanswered submitted reservation … the pair is quarantined"; its group now assertsthat only the request ends.
ProviderDeadlinePipeChecksaid "reserve threw before actual fences"; it now asserts that nothing is fenced and thatthe pair takes the next request.
missingProofkeeps its contract: a fenced rank's missing proof holdsreserve. It now does so with a rank thatmisses the pair's own admission wait, which is a real failure.
admission wait (
RetirementPolicyTests) still ends the pair.reservestill waits on the engine's serial queue, bounded at 30 s, for a late answer to be given back. Therefusal and caller-cancel paths do the same. Taking admission off that queue, and slicing a lone prompt's merged frames
while control is pending, are follow-ups.
(0.1–13 s).
Before And After
Before: behavior
After: behavior
Before / After: code
flowchart TB subgraph Before["Before"] direction TB b1["admit: reserve sent with deadline = request budget"] --> b2{"answer before the budget?"} b2 -->|"no: .deadline, or send .closed"| b3["reserve catch-all: invalidate()"] b3 --> b4["cleanup, not alone: fence rank 0 and the never-asked rank 1"] b1 -.-> b5["owner service: reserve unanswered past delivery deadline, fence worker"] b6["follower accept: relayed reserve past delivery deadline"] --> b7["fence the follower session: command refused"] end subgraph After["After"] direction TB a1["admit: reserve delivered within the admission wait"] --> a2{"answer before the request deadline?"} a2 -->|"no: .deadline, next rank not asked"| a3["reserve: cancel .deadline, cleanup alone"] a3 --> a4["read the late answer, cancel the admission, retired cancelled"] a4 --> a5["pair valid, throw .deadline for this request"] a3 -.->|"not given back within 30 s"| a6["fence and invalidate, as before"] a7["cleanup: a never-asked rank is acknowledged, never fenced"] a8["follower accept: commandRefused deadline, session kept"] end classDef bad fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d; classDef good fill:#dcfce7,stroke:#15803d,color:#14532d; classDef step fill:#dbeafe,stroke:#1d4ed8,color:#172554; class b3,b4,b5,b7,a6 bad; class a4,a5,a7,a8 good; class b1,b2,b6,a1,a2,a3 step;Legend: red is a pair-level failure, green is a per-request outcome, blue is admission.
Validator notes, round 2
One more signed commit,
113757ad86, docs only. Sources, tests, wire and changelog are byte-identical toeef2995aaf.1. A generation deadline shorter than a busy rank's answer can still end the pair. Not changed here (follow-up below).
first_content_budget_ms, which sets the admission deadline.When the planner derives it, it is three times the placement's predicted longest request plus 30 s, within
60–3600 s.
reserveholds a coordinator request thatlong. The device-local queue can.
ClusterOwnerLeaseState.clockquarantines therank when a held request's deadline passes.
deadline was 100 ms.
delivery deadline (
admission: a rank's command stream closed).docs/architecture/inference.mdsaid every reservation is delivered within the pair's admission wait. Itnow says: within that wait, or by the generation deadline if that comes first. A rank still holding a request at its
generation deadline ends the pair.
2. The follower's log for genuine admission failures (behavior unchanged, as intended).
longer logs
session fenced: leader fenced: the request was cancelled before it started.shutdown, orleader fencedwith no text if itdoesn't answer.
request <id> failed on the pair: admission: <cause>.shutdownwire.Follow-up (not in this PR): a lane request reserved close to its generation deadline.
ClusterOwnerLeaseState.clock;ClusterWorkerOwnerService's per-request admission deadlines, whichClusterWorkerRequest.admitcaps at thegeneration deadline.
it back. That is two step boundaries: about 26 s during 100k-token prefills.
serial-engine-queue backlog.
laneDeadlineMarginNanoseconds(20 s) is left. Today itis cancelled the moment it is admitted anyway. This narrows the window.
it changes the owners' stuck-worker rule.
Validation at
113757ad86(sandboxed,nice -n 19):ClusterWorkerPairAdmissionDeadlineTests4/4,ClusterLinkWorkerCommandRefusalTests5/5,ClusterReservationRelayTests1/1; ProcessChecksRetirementPolicyTests,PartialAdmissionTestsandProviderDeadlinePipeCheck: pass.make docs-check,make docs-impact-check BASE=origin/dev,make changelog-checkandgit diff --check: clean.Refactor Pass addendum: the round-2 commit
113757ad86came after the refactor pass. It is a documentationcorrection: it states the existing behavior. It is not a behavior fix or a refactor, and no source, test or wire changed.
It was checked against the PR's invariants, which all still hold:
Refactor Pass
Done by a dedicated refactor subagent (
AGENTS.md§ "Required Refactor Pass") on the finished fix. Verdict:behavior-preserving cleanup, one signed commit (
eef2995aaf). It changes no source logic, wire format or test assertion.ClusterWorkerRequest.admit: dropped a comment's claim that every command is delivered within the pair's admissionwait (start and token decisions use the request's generation deadline). A send that a still-serving endpoint closed
is now explained as a deadline, not a lost rank.
ClusterWorkerRequest.cleanup: the never-asked rule is stated once, at its branch, instead of in three overlappingcomments.
LinkWorkerPairCheck: one local helper relays each leader command in the expired-reservation check, instead ofthree hand-built wires (same sequences, delivery times and assertions).
ClusterWorkerPairAdmissionDeadlineTests: dropped the task-list labels "(a)" and "(c)" from the doc comments.docs/architecture/inference.md: rewrote a tautology ("a rank not yet asked is not asked") and an "only … ends thepair" that contradicted the next sentence. The facts are unchanged.
Reviewed and kept:
.deadlinecatch beside the.cancelledone (a shared helper saves no lines and would assemble thegrep-able incident text);
.closedmapping. Both are reachable; without them,the outcome would be a race;
requestRefusal(deliveryExpired:)default, which an existing test relies on;Validation after the pass (rebuilt from the refactor head):
RetirementPolicyTests,PartialAdmissionTestsandProviderDeadlinePipeCheck: pass;make docs-check,make docs-impact-check BASE=origin/dev,make changelog-checkandgit diff --check: clean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.