Repository navigation
fix: a lock left with an unrecorded child is recovered after a reboot - #6635
Merged
Merged
Conversation
janicduplessis
marked this pull request as ready for review
November 28, 2026 14:55
This was referenced Nov 29, 2026
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.
Description
A claim whose child record is
{"record":null}(Stim started a process and was killed before recording which one) is never recovered, even after a reboot has ended every process it could stand for. The workspace stays "in use", and the only way out is a manualrm. I found four such claims from 2026-11-11 and 2026-11-12 on a machine rebooted on 2026-11-18.Solution
Such a claim now reads as free when its owner is gone and the owner's process token records an earlier boot. Within one boot nothing changes. This changes the rule in LLP 0007, which the maintainer approved.
It stays refused when either boot id cannot be read, when only the Linux PID namespace differs, and on Windows, whose tokens carry no boot id. A child marker that is not an explicit null also stays refused.
Risk:
The change is in
claimLiveness, so it applies to every claim kind. A pending child is written by the claim's own process; the exceptions are two paths instimd/logs/claim.tsthat mark an older claim pending, both Windows only.A Stim home shared between machines or kernels would read the other side's claim as from an earlier boot. Nothing in a claim names its machine, and Stim already reaps another claim whose owner pid it cannot find, so LLP 0007 records this as outside the rule.
Test plan
readClaimSetfrom this branch, read only, on the four real claims. Each readsdead; onmaineach readsunresolved.Fixes #6618