Skip to content

The engine pool never relocks its budget: the reconcile no longer deadlocks and the core boots - #5837

Merged
joelteply merged 1 commit into
canaryfrom
fable/engine-pool-never-relocks-its-budget
Nov 7, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/engine-pool-never-relocks-its-budget

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

P0, the M5 is down on canary acaaf3f. #5835's engine_pool read planned_budget.lock() inside launch_pool's argument list, where the guard lives to the end of the statement, while seated_for (also an argument, launch.rs:782) locked planned_budget again. parking_lot is not reentrant, so the serving reconcile hung at 19:11:48Z, no module past grid-capacity initialized, and the core never bound its IPC socket (boot is wedged after 300 s, restart loop).

Fix: each lock is its own statement (usable, seated), then launch_pool.

Measured

  • cargo test -p continuum-serving --features metal --lib serving_daemon: 128 passed, 0 failed (fcfd7bd).
  • Deployed to the M5 as a hotfix (it is down); the boot and the 15 min / 1 h reads land in ~/.continuum/evidence/live-read-20261107/deploy-fcfd7bd08.txt.
  • Follow-up (card below): a test that calls engine_pool with a planned budget present, so a relock deadlocks in CI, not on a node.

I passed #5835 and missed this; the review checked what each lock guarded, not how long each guard lived.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ent, so the reconcile no longer deadlocks and the core boots

#5835's engine_pool read planned_budget.lock() inside launch_pool's argument list, where the
guard lives to the end of the statement, while seated_for (also an argument) locked it again;
parking_lot is not reentrant, so the reconcile hung, no module past grid-capacity initialized,
and the core never bound its IPC socket (the M5, 2026-11-07 19:11Z; boot wedged 300 s, restart loop).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 97f73c4 into canary Nov 7, 2026
12 checks passed
@joelteply
joelteply deleted the fable/engine-pool-never-relocks-its-budget branch November 7, 2026 19:44
joelteply added a commit that referenced this pull request Nov 7, 2026
…(regression for the M5 boot wedge, #5835 -> #5837) (#5839)

* The engine pool never relocks its budget: each lock is its own statement, so the reconcile no longer deadlocks and the core boots

#5835's engine_pool read planned_budget.lock() inside launch_pool's argument list, where the
guard lives to the end of the statement, while seated_for (also an argument) locked it again;
parking_lot is not reentrant, so the reconcile hung, no module past grid-capacity initialized,
and the core never bound its IPC socket (the M5, 2026-11-07 19:11Z; boot wedged 300 s, restart loop).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* test: engine_pool returns on a real daemon with a planned budget set (regression for the M5 boot wedge, #5835 -> #5837)

#5835 held a planned_budget guard as a temporary in launch_pool's argument list while seated_for,
another argument, locked the same non-reentrant mutex: the serving reconcile deadlocked and the
core never bound its socket (the M5, 2026-11-07 19:08Z). Its tests covered only launch_pool as a
pure function. This one calls engine_pool on a real ServingDaemonModule with a planned budget set,
under both credit facts, on a thread with a 10 s deadline, so a deadlock fails in seconds instead
of wedging a node. Mutation-proved: with the guard back in the argument list the test fails at its
deadline (11.34 s); with #5837's separate statements it passes (one_launch 5/5).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant