Repository navigation
Fix shared registry cache deadlocks - #100
Open
charliermarsh wants to merge 3 commits into
Open
charliermarsh wants to merge 3 commits into
charliermarsh wants to merge 3 commits into
Conversation
charliermarsh
marked this pull request as ready for review
August 30, 2026 16:59
This was referenced Aug 30, 2026
charliermarsh
added a commit
to astral-experiments/ohm
that referenced
this pull request
Aug 30, 2026
Prepare Ohm 1.98.0 revision 4 with incremental Clippy diagnostics, per-item visibility inputs, streamed well-formedness obligations, and the shared registry cache deadlock repair. Pin the compiler stack through [ohm-rust#75](astral-experiments/ohm-rust#75), including [#72](astral-experiments/ohm-rust#72), the Cargo stack through [ohm-cargo#100](astral-experiments/ohm-cargo#100), and the Clippy stack through [ohm-rust-clippy#49](astral-experiments/ohm-rust-clippy#49). Preserve the existing rustfmt pin and align the compiler's Cargo gitlink with the manifest. Add the versioned manifest, select it by default, update installation examples, and refresh the upstream-change document. Clippy now caches 56 audited passes covering 62 lint kinds. The Cargo lock repair changes the shared-cache namespace, so the first build repopulates affected artifacts and unchanged builds may incur additional lock-preparation overhead. Keep the component PRs open for review in one GitHub stack per repository. The unmeasured parallel query-cache promotion experiment in ohm-rust#66 remains above the selected compiler pin and outside this release. Preserve all historical manifests and published benchmark results; the existing performance figures remain labeled as Ohm 1.98.0-3 measurements.
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
September 6, 2026 20:33
28c2ed4 to
5e311b2
Compare
charliermarsh
changed the base branch from
charlie/1.98/uv-cache-warm-metadata
to
charlie/1.98/uv-cache-miss-coalescing
September 6, 2026 20:33
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
September 8, 2026 21:02
5e311b2 to
dbc58fd
Compare
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
September 16, 2026 16:39
dbc58fd to
aef1a2f
Compare
charliermarsh
changed the base branch from
charlie/1.98/uv-cache-miss-coalescing
to
ohm-1.99.0
October 1, 2026 15:24
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
October 1, 2026 15:26
aef1a2f to
9194be4
Compare
charliermarsh
changed the base branch from
ohm-1.99.0
to
charlie/1.98/uv-cache-miss-coalescing
October 1, 2026 15:28
charliermarsh
changed the base branch from
charlie/1.98/uv-cache-miss-coalescing
to
ohm-1.99.0
October 1, 2026 15:33
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
October 1, 2026 15:35
9194be4 to
fc2a1d4
Compare
charliermarsh
changed the base branch from
ohm-1.99.0
to
charlie/1.98/uv-cache-miss-coalescing
October 1, 2026 15:37
charliermarsh
changed the base branch from
charlie/1.98/uv-cache-miss-coalescing
to
ohm-1.99.0
October 1, 2026 15:42
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
October 1, 2026 15:45
fc2a1d4 to
38dd030
Compare
charliermarsh
changed the base branch from
ohm-1.99.0
to
charlie/1.98/uv-cache-miss-coalescing
October 1, 2026 15:47
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
October 7, 2026 13:59
38dd030 to
0407ea6
Compare
charliermarsh
changed the base branch from
charlie/1.98/uv-cache-miss-coalescing
to
charlie/1.98/trust-mirrored-registry-packages
October 7, 2026 14:00
Concurrent cold builds can retain dependency read locks while waiting for each other's write locks. Preflight shared units under a read lease, then drop the prepared runner and retry with exclusive profile access whenever shared artifacts need rebuilding. Keep warm workspace edits concurrent. Pass close-only lock ownership to scheduled compiler and build-script children so a surviving worker remains protected after Cargo exits. Keep nested Cargo builds private and reject target aliases and destructive nested cleans before acquiring locks or removing files. Version the shared cache namespace and add regressions for conflicting dependency orders, input generations, failures, cancellation, nested builds, and inherited lock lifetime. Coalescing eligibility is unchanged.
Keep the profile read lease and reserve the shared unit set in canonical path order. Use write leases only for units that need rebuilding, and discard all locks and observations before reserving additional writers. This lets unrelated shared writers and readers compile concurrently without introducing lock upgrades or exposing changing dependencies. Keep reserved modes fixed through the invocation and inherit their guards in compiler workers. Reject aliases beneath the locked profile and revalidate generated compiler search directories after reservation. Add gated cold/warm and stale/warm overlap regressions in both launch orders, with dependency pinning, artifact checks, and bounded cleanup.
Skip doctest units in shared writer preflight, and invalidate rustdoc outputs before observing unit freshness. Preserve the parent workspace's private-cache fallback when package verification and lockfile generation construct temporary workspaces. Reject nested cleanup of descendants as well as ancestors of the parent's build and target trees, so cleanup cannot unlink an active parent's locks. Add documentation regressions and extend the live nested-build fixture with protected descendants and package-then-clean coverage.
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
November 17, 2026 06:26
0407ea6 to
7211e03
Compare
charliermarsh
force-pushed
the
charlie/fix-shared-cache-locking
branch
from
November 17, 2026 07:02
7211e03 to
7ef0acd
Compare
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.
Concurrent cold worktrees can deadlock when each Cargo invocation holds a dependency's read lock while waiting for another dependency's write lock. We now acquire the complete shared-unit lock set in path order and restart preparation if it discovers another required writer.
On Linux and macOS, compiler, build-script, and rustdoc children retain the locks protecting their work. Nested builds use private artifacts, and nested cleanup must stay outside the parent's build and target trees. The cache namespace changes, so affected artifacts are rebuilt once.
The measured locking revision added 20–24 ms (6–9%) to unchanged Ruff and uv checks against equivalently built Ohm 1.98.0-3 sources. That measurement predates the final documentation and nested-cleanup fixes. Builds sharing a dirty dependency can still serialize; Windows/Solaris child lifetimes and post-build doctest/rustdoc-merge locking remain outside this repair.