New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: TestTimeoutHandlerSuperfluousLogs is flaky #35051
Comments
Thanks for the file @bcmills! Sheesh how does one then test a Timeout if 2X the requested sleep time still doesn't time out? I'll send a CL skipping that test to avoid blocking the builders. |
The flake rate seems low enough that a Skip probably isn't necessary at this point. But yeah: never underestimate the slowness of builders. (It's a corollary of the “infinite monkeys” theorem: “Infinitely many monkeys simulating TryBot runs will eventually produce an antagonistic schedule.”) |
Cool, thanks! However, this would point to being a runtime problem if the timer for the goroutine that fires insider the handler, fires earlier than the timer of the overall handler. We should investigate that angle too.
Hehe, indeed! |
Note that with goroutine preemption (#24543), it is in general possible for the two timers to fire “in order”, but for the next statement(s) after the first timer to be preempted immediately and ultimately execute after the statements immediately after the second timer. (If the two goroutines don't have a “happens-before” edge, their execution order is unspecified regardless of wall time.) |
|
@odeke-em, do you plan to address this yourself? |
Yes, I'll work on this tomorrow morning or later tonight. Thanks for the ping @bcmills! |
I think I have 2 options here: Despite us just only needing to ensure that that 503 is returned after the goroutine for the timer in the TimeoutHandler expires, a) it is! CL coming up shortly. |
Change https://golang.org/cl/208477 mentions this issue: |
Interestingly this hasn't happened since 2019-11-25. |
The test added in CL 200518 appears to have flaked on the
dragonfly-amd64
builder (https://build.golang.org/log/dbcda17a3616121b8fc8c2efc58cb42e82a6d373):I suspect that the problem relates to the use of a hard-coded timeout (here), although I haven't verified that.
CC @odeke-em @bradfitz
The text was updated successfully, but these errors were encountered: