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: flaky "connection reset by peer" on macOS Sierra #17651

Closed
rsc opened this issue Oct 28, 2016 · 4 comments
Closed

net/http: flaky "connection reset by peer" on macOS Sierra #17651

rsc opened this issue Oct 28, 2016 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Oct 28, 2016

all.bash on Sierra at master:

--- FAIL: TestTransportDiscardsUnneededConns (0.14s)
    clientserver_test.go:979: Get: Get https://127.0.0.1:59047: read tcp 127.0.0.1:59050->127.0.0.1:59047: read: connection reset by peer
FAIL
FAIL    net/http    10.072s

I saw this on the Go 1.6 branch too. Haven't dug into it to find out what it means, whether it's Sierra or a race in the test. Just happens once in a while.

/cc @bradfitz

@rsc rsc added this to the Go1.8 milestone Oct 28, 2016
@rsc rsc added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 28, 2016
@bradfitz bradfitz added the Testing An issue that has been verified to require only test changes, not just a test failure. label Oct 28, 2016
@bradfitz
Copy link
Contributor

I at least can't reproduce it on Linux with a high -count value and/or -race (which randomizes goroutine scheduling a bit and often exposes timing issues).

Will try on Mac.

@bradfitz bradfitz self-assigned this Oct 29, 2016
@rsc
Copy link
Contributor Author

rsc commented Nov 3, 2016

Another from all.bash:

--- FAIL: TestTransportConcurrency (0.00s)
    transport_test.go:1323: error on req request-3: Get http://127.0.0.1:60940/?echo=request-3: read tcp 127.0.0.1:60941->127.0.0.1:60940: read: connection reset by peer
FAIL
FAIL    net/http    9.874s

@bradfitz
Copy link
Contributor

bradfitz commented Nov 3, 2016

My corp laptop is still 10.11 so I'll need to setup Sierra builders before I can work on this.

@bradfitz
Copy link
Contributor

I've been running go test -short net/http in a loop for the past hour on my home Sierra desktop and haven't gotten a single error. I also tried go test -short -run=TransportConcurrency -count=500 and go test -short -run=TestTransportDiscardsUnneededConns -count=500.

I suspect I might've accidentally fixed this during my recent test parallelization and de-flaking spree:

cd670a6
276c29f
f9d406e
27a3d30
2f2b578

I'm going to close for now, but please reopen if you see it happen again or have ideas on how I can make it fail.

@golang golang locked and limited conversation to collaborators Nov 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants