Repository navigation
0.23.0: a module lock clangd could not open is asked again, not recorded as the file's failure - #90
Merged
Merged
Conversation
…he file's failure (darwin cold starts, release 0.23.0's stability rounds)
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.
Release 0.23.0's run (43361417784) failed its darwin-arm64 stability check twice, on different fixtures (
multi-root,module-faults), for one cause: at a cold start clangd builds several files' prerequisites at once, and the module cache's lock anchor sometimes cannot be opened (Failed to open lock file anchor <cache>/.locks/<hash>: No such file or directory). The file then has no modules for the session — no definition or hover across an import — until it is edited.How often. Counted over the stability evidence of every round, not only failed ones: 0 of 81 rounds on 0.22.0 (engine
-mcppls.10), 1 and 2 of 81 on this release (-mcppls.12); PR 88's darwin conformance met it once more. Same runner image (macos-15-arm64 20261103.629) and the same engine toolchain in both. The engine's code is 0.0.20's, recorded there as known; the larger image (clangd's refactorings, #89) shifted the timing. Nothing in the server touches.locks.Change.
transient_module_failure()(besidefailure_kind) names this failure: no unit failed, only the engine's lock.handle_module_failure_no longer records it — no unplaced failure (whose words anast_file_not_foundwould repeat), no stand-in, no doomed closure — and asks clangd to build the importer again 500 ms later, adidChangewith no content change,wantDiagnosticsand clangd'sforceRebuild, which rebuilds the preamble and its prerequisites without closing the file. At most three times per file until the sources change; a lock that keeps failing is then reported as any failure is. Retries are cleared at a clangd start.Tests. Unit: the parse and classification of the line as CI printed it; an engine with the building fake process: one rebuild per failure after the delay, none at once, nothing reported as unplaced, three at most, reported after.
mcpp test: 628 cases pass. The race itself is not reproducible on demand; the release's darwin stability check is where it shows.Follow-up (engine): the race in the lock anchor's creation; the engine's release promoting the image its PR's candidate tested instead of rebuilding it (v0.0.23's archive differs in bytes from the candidate
b00e6559…though the source differs only in CHANGELOG.md).