Repository navigation
Learning retires a dead engine's state so custody releases its leases: a relaunch no longer starves learning - #6119
Merged
Conversation
…s: a relaunch no longer pins learning memory forever The M5, 2026-11-17: the serving plan relaunched the engine at 22:09:39Z mid learning step (training.in_place.answer_lost on /learn). InPlace keeps one EngineSlot per engine incarnation, and that slot owns its learners' and workspace's custody claims; nothing but shutdown removed a slot, so the dead incarnation's workspace claim stayed live, custody never saw it orphaned, and its leases stayed pinned (resources/board: learning:8044b75b...:speech-discipline:workspace, 4.88 GB VRAM + 1.13 GB RAM, pinned, no expiry). Every pass after it ended memory_short: "0 of 4096000 governed Vram bytes are free" (52 times by 22:30Z). No mind learned. InPlace::retire_dead(live) drops every other incarnation whose process is verifiably dead (an unreadable one is kept); learn_in_place runs it before settle_orphans, so the dropped claims are orphans that settle on the existing dead-process proof the same pass. Probe training.in_place.dead_engines_retired names the count. Test: a dead incarnation's slot is dropped, the live one kept, nothing retired twice. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…space lease is freed by the next settle; an unreadable one and the live one are kept; a held slot releases only when let go (Codex on #6119) EngineWorkspace::held_for_test (genome, test-fixtures) leases a workspace through try_training_memory and holds it in custody exactly as cover does. retire_dead takes its liveness probe through retire_dead_with (production passes EngineIncarnation::liveness), so a test can name an unreadable incarnation; the dead one is really dead (a reused pid), because custody's settle reads the real process. The test leases 5, 7 and 11 MB workspaces on a dead, an unreadable and a live incarnation: retiring while the dead slot is still held releases nothing (no orphan yet); letting go orphans its claim and settle_orphans frees exactly its 5 MB; the others keep theirs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…th uses, and the comments say governed VRAM was exhausted before the relaunch (Codex on #6119) held_for_test returned String errors (stringly_errors 4247 -> 4249); it now maps the admission exactly as lease_rows does (Unleased, AwaitingMemory). The comments no longer say the relaunch caused the zero free memory: passes found 0 governed bytes free from 19:57Z on; the pinned lease kept those bytes from coming back. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
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.
Serves the minds' learning (path step 3, Learning; plan goal 8): since the 22:09:39Z engine relaunch on the M5, no mind has learned.
Defect (measured on the M5, build d6822e0)
training.in_place.answer_lost(Aris 8044b75b): /learn unreachable. Engine pid 31242 started 22:09:39Z (ps lstart); the plan relaunched it (serving.planlanes 1 -> 2,settle.tick.condemnedx4).resources/boardat 22:33Z: leaselearning:8044b75b...:speech-discipline:workspace4,875,870,304 B VRAM + 1,125,902,784 B RAM,pinned, acquired 22:07:22Z, expires never. VRAMavailableBytes: 0.training.in_place.memory_short("0 of 4096000 governed Vram bytes are free") and 51training.admission.waitingsince; 44embed.vram.refused.InPlace.engineskeeps oneEngineSlotper incarnation; itsEngineLearningowns the workspace's and learners' custodyClaims. Only shutdown (quiesce) removed a slot, so a dead incarnation's claims stayed live, never orphaned, andCustody::settle_orphans(which already releases on a verified-dead process) never saw them.Change
InPlace::retire_dead(live)removes every other incarnation whose process is verifiably dead (Liveness::Dead; unknown is kept).learn_in_placecalls it beforesettle_orphans, so the dropped claims settle in the same pass. Probetraining.in_place.dead_engines_retired.Test
a_dead_engines_learning_state_is_retired_and_the_live_one_kept: the dead incarnation's slot is dropped (its Weak no longer upgrades), the live one is kept, nothing is retired twice. Not built locally (serving node); CI runs it.Measured after deploy
Owner Fable: on the M5, after the next engine relaunch,
resources/boardshows no learning lease owned by a dead incarnation, andtraining.in_place.memory_shortstops naming 0 free bytes.Not in this PR
The relaunch itself: a plan's lane-count change relaunches the live engine (plan line 3b forbids a relaunch while serving). Reported to Codex (serving owner).
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo