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
test: isolate the OOM harness per iteration; re-land the ReleaseSafe promotion
aaabb6a promoted CI's ReleaseSafe lane to the full suite and b4873d8 backed it
out, because `L4 Join proxy relay rolls back state under OOM injection` failed
under ReleaseSafe on both amd64 tiers. Root-caused: THE ROLLBACK CODE WAS NEVER
AT FAULT. All 34 injected failures rolled back cleanly, no leak, no swallowed
OOM. The harness was unsound.
`std.testing.checkAllAllocationFailures` shares ONE backing allocator across
every fail-index iteration, coupling the runs through residual heap state.
`FailingAllocator` bumps `alloc_index` only in `alloc`; `resize`/`remap` bump a
separate counter it never fails. So a buffer that needs a fresh `alloc` on a
cold heap can grow IN PLACE on a warm one -- one allocation disappears, the last
fail index is never reached, and a deterministic function is reported as
`NondeterministicMemoryUsage`.
Measured on ubuntu-latest under ReleaseSafe, via a throwaway branch because the
CI log printed no verdict:
reference allocs = 35
ANOMALY fail_index=34 induced=false alloc_index=34 resize_index=6
anomalies = 1
Exactly one anomaly, at the LAST index only -- for every earlier index the
injected failure fires before that allocation is reached. Six identical plain
runs all allocated exactly 35, so the impl itself is deterministic. It is
platform-specific because whether growth happens in place is an allocator and
heap-layout decision: linux-aarch64 (verified in a container) and macOS never
reproduce it.
`harness.checkAllAllocationFailuresIsolated` gives every iteration a pristine
DebugAllocator. That removes the coupling and keeps per-iteration leak
detection; with a fresh heap each time an unreached fail index is a real signal
rather than an artifact. The previous arrangement could silently under-test
rollback paths on any platform where growth happens in place -- which is the
more important half of this finding.
With that fixed the promotion returns: CI runs `zig build test
-Doptimize=ReleaseSafe`, green on all three tiers.
A correction to the record while diagnosing this: I claimed an emulated amd64
container reproduced the failure. It did not -- that container died with
`rosetta error: bss_size overflow`, i.e. Apple's x86 emulation failing to run
the Zig compiler, and I read exit 133 as a reproduction. The architecture
correlation is real, but it rests on the CI runs and the aarch64 container, not
on that.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments