Skip to content
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: apparent TestServerAllowsBlockingRemoteAddr flakes due to hard-coded timeouts #36179

bcmills opened this issue Dec 17, 2019 · 2 comments
help wanted NeedsInvestigation Testing


Copy link

@bcmills bcmills commented Dec 17, 2019


--- FAIL: TestServerAllowsBlockingRemoteAddr (1.08s)
    serve_test.go:1300: Request 1: Get "": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
    serve_test.go:1349: response 1 addr = ""; want "RA:"
http.test 1018696: warning: process exceeds 100 file descriptors
FAIL	net/http	114.189s

As far as I can tell, the root cause is the hard-coded time.Second here:


Lines 1326 to 1330 in 931fe39

select {
case conn2 = <-conns:
case <-time.After(time.Second):
t.Fatal("Second Accept didn't happen")

It's not obvious to me why a timeout is needed there at all. If the test deadlocks, we presumably want a goroutine dump anyway.

CC @bradfitz @0intro @fhs

@bcmills bcmills added Testing help wanted NeedsInvestigation labels Dec 17, 2019
@bcmills bcmills added this to the Backlog milestone Dec 17, 2019
Copy link
Member Author

@bcmills bcmills commented Dec 17, 2019

That's the regression test for #12943.

Copy link

@HowJMay HowJMay commented Feb 29, 2020

Is this one still one still open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
help wanted NeedsInvestigation Testing
None yet

No branches or pull requests

2 participants