Skip to content

resolver: lock DirEntry map probes against the in-place stale-generation rewrite - #37274

Merged
Jarred-Sumner merged 5 commits into
mainfrom
farm/79a2c6d1/fsr-entries-race-hardening
Aug 9, 2026
Merged

resolver: lock DirEntry map probes against the in-place stale-generation rewrite#37274
Jarred-Sumner merged 5 commits into
mainfrom
farm/79a2c6d1/fsr-entries-race-hardening

resolver: close remaining unsynchronized DirEntry windows behind #34271

594e54b
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 9, 2026 in 30m 34s

Code review found 1 important issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/resolver/fs.rs:498-508 Recycle path writes cache AFTER need_stat store — same torn-read window PR claims to close

Annotations

Check failure on line 508 in src/resolver/fs.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Recycle path writes cache AFTER need_stat store — same torn-read window PR claims to close

The recycle path Release-stores `need_stat = true` **before** calling `set_cache_kind`/`set_cache_symlink` — a concurrent `kind()`/`symlink()` reader that Acquire-loads the old `false` skips the per-entry mutex and does a non-atomic `Cell::get()` while this thread is inside `Cell::set()` on the ~24-byte cache, tearing the 16-byte `Interned` symlink exactly like the `0x25` fault this PR describes. Reordering wouldn't help (a false→true store can never publish anything to a reader that loaded the