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

Comments

Projects
None yet
3 participants
@rsc
Copy link
Contributor

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

@bradfitz bradfitz added the Testing label Oct 28, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Oct 29, 2016

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Nov 10, 2016

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.

@bradfitz bradfitz closed this Nov 10, 2016

@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.
You can’t perform that action at this time.