Data race in internal/handlers/logbound_test.go: fx testutil.WriteSyncer calls t.Logf from a start hook after the test goroutine has finished #230
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while implementing #127, at host load average 141 on 48 cores.
The race detector fires on
internal/handlers/logbound_test.go: fx'stestutil.WriteSyncercallst.Logffrom a start hook goroutine after the owning test goroutine has already finished. Writing to a*testing.Tafter its test returns is a race and, in the worst case, a panic.Attribution: NOT introduced by that PR. A cache-defeated build of clean
nextpassed, and the branch passed on re-run at lower load — so it is a pre-existing, load-dependent flake innext.Distinct from #225, which is about wall-clock budgets (the fx start timeout and the 90s per-package timeout) being blown under load. This one is a genuine data race in test wiring, not a timeout, and it will red the gate at random rather than only when slow.
Why it matters: the authoritative gate runs
go test -race(script/test), so an intermittent race report makes the gate untrustworthy in the same way #119 and #225 do — a reviewer then has to spend a run onnextto attribute their own failure.Definition of done:
t.Logf/t.Errorf/t.Fatalfreachable from an fx hook or any goroutine that can outlive the test function-racesuppression and not a reduction in what the tests assertgo test -race -count=2 ./internal/handlers/...is clean with the host under deliberate heavy load; state the load average it was verified atclawbot referenced this issue2026-08-20 08:21:53 +02:00
clawbot referenced this issue2026-08-20 08:34:07 +02:00