Commit 264f2bb
committed
Fix SMB sharing violations on concurrent reads and add read timeouts
Read operations used ShareAccess::Read, which blocked if a writer on another
pool connection still held the file open — causing STATUS_SHARING_VIOLATION
(0xC0000043) during sccache's write-then-read pattern. Changed all read-path
file opens to ShareAccess::All (matching head_object's existing behavior).
Also added a 30-second timeout on all SMB stream.read_exact() calls. Without
this, a slow or unresponsive SMB server would hold the per-connection mutex
indefinitely, blocking all queued requests on that connection and causing a
full hang under concurrent load.
Changes:
- ops.rs: open_read, read_object large-file reopen, read_temp reopen
- client.rs: create_read_close compound, read_exact_timeout helper on all
8 read sites (send_recv_inner, send_compound, pipelined_read/write)
- New scripts/stress-concurrent.sh: 5-section concurrent stress test with
MD5 data integrity verification on every section1 parent 07f50ad commit 264f2bb
3 files changed
Lines changed: 440 additions & 12 deletions
0 commit comments