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
{{ message }}
Repository navigation
testing: Fuzz testing with fuzztime flag sometimes fails incorrectly with "context deadline exceeded" [1.26 backport] #82362
The fix (5a957dc, CL 774140) is on master and release-branch.go1.27 (CL 804900). release-branch.go1.26 still has the old condition in stop in CoordinateFuzzing:
iferr==fuzzCtx.Err() ||isInterruptError(err) {
On go1.26.9 (windows/amd64), a fuzz target that cannot fail, run 1200 times with -fuzztime=1s -parallel=8, failed 3 times, each with no failing input:
funcFuzzNothing(f*testing.F) {
f.Add([]byte("seed"))
f.Fuzz(func(t*testing.T, b []byte) { _=len(b) })
}
The same harness on go1.27.3 failed 0 times in 1200 runs. We also hit it in CI on go1.26.9 linux/amd64 with -fuzztime=60s.
The race can also hide a real crash. If it hits while a crasher is being minimized, the deferred writeToCorpus in CoordinateFuzzing still writes the input to testdata/fuzz, but it wraps the error in a crashError only when err == nil. Here the error stays context.DeadlineExceeded, so "Failing input written to ..." is never printed and the crash looks like a timeout flake. The fix closes this path too.
The fix changes one condition in stop. The workaround, -fuzztime=Nx, replaces the time budget with an execution count.
Activity
ci(fuzz): ignore the spurious fuzztime deadline error from Go 1.26 (#…