You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix sharing-violation 500s + carry forward review fixes (v0.5.4)
The previous PR squash-merged with four Copilot review threads
unaddressed (auto-merge fired before the fixes landed). Brings those
forward, and adds the actual bug they were a symptom of — sharing
violations leaking through io_to_s3_error's catch-all arm as 500
InternalError with noisy `error:` log lines.
Sharing violations are an expected transient under concurrent writes
(the SMB server refuses a file held by another handle). The typed
io::ErrorKind::ResourceBusy mapping was already correct; the HTTP
layer just had no arm for it. Now maps to 503 SlowDown — the standard
retryable S3 status — and logs via slog! instead of serr!, so SDKs
auto-retry instead of seeing a fatal 500 and CI stops painting these
red.
Adds an io_to_s3_error unit test covering all four kinds (NotFound,
PermissionDenied, ResourceBusy, fallback) so this regression has a
test gate next time.
Adds a stderr guard to the three CI integration scripts
(test-sccache, test-extended, stress-concurrent) that fails the run
if spiceio emits `[spiceio] error:` lines. Expected transients log
through slog! without the prefix, so any hit means a new failure
mode is leaking through the 500 InternalError arm. Would have caught
the original regression.
Review fixes carried forward from edc1579:
- decode_read_response_from_msg rejects data_offset <
SMB2_HEADER_SIZE so a malformed server response cannot slice into
the SMB2 header. Adds two unit tests.
- GetObject streaming channel capped by an 8 MiB per-request memory
budget on top of READ_PIPELINE_DEPTH; at 1 MiB chunks the channel
falls from 64 to 8 instead of buffering up to 64 MiB.
- bench-live.sh mount_smbfs baseline no longer embeds the SMB
password in argv (leaked via shell history / ps) and no longer
shells out to perl -MURI::Escape (not in minimal Perl installs).
Uses macOS Keychain credentials; skips clearly if not configured.
* Address PR review feedback
- stream_channel_capacity: extracted from the inline GetObject channel
sizing into a tested helper. Floors chunk_size at 1 before the
divide-by, so an SMB-negotiated max_read_size of 0 cannot panic the
streaming task with a divide-by-zero. Four new unit tests cover the
zero-chunk guard plus the default 64 KiB, large 1 MiB, and budget-
exceeding cases.
- Integration test stderr guards: kill+wait the spiceio PID(s)
explicitly before grepping the captured stderr. The previous `sync`
was a no-op for the tee process-substitution pipe, and the cleanup
trap hadn't fired yet so spiceio's stderr stream was still open.
test-sccache.sh has two spiceio instances; the guard now kills both.
Misleading comment removed.
0 commit comments