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: unexpected ETIMEDOUT in connect on macOS 10.12 #19302

Closed
rsc opened this issue Feb 27, 2017 · 1 comment
Closed

net: unexpected ETIMEDOUT in connect on macOS 10.12 #19302

rsc opened this issue Feb 27, 2017 · 1 comment
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin 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 Feb 27, 2017

https://build.golang.org/log/79f69de95c47982e0981d7abb714cfa2638daf02 says

--- FAIL: TestDialerLocalAddr (75.14s)
	dial_test.go:705: tcp 0.0.0.0:0->::1: got dial tcp 0.0.0.0:0->[::1]:49338: getsockopt: operation timed out; want <nil>
FAIL
FAIL	net	78.009s

The error is misleading. It looks like we did getsockopt to ask for SO_ERROR and getsockopt did not itself fail but instead told us that the error associated with the socket was ETIMEDOUT. The code here (in (*netFD).connect) is a bit confusing and appears to be working around a different mystery, #14548.

One option would be to add ETIMEDOUT to the switch on syscall.Errno, alongside EINPROGRESS, EALREADY, EINTR. That would either fix the problem or create an infinite loop. It's hard to say which.

Speaking of infinite loops, I wonder if the confusing loop here is the underlying cause for #18541, #18741, #18877.

@rsc rsc added this to the Go1.9Early milestone Feb 27, 2017
@bradfitz bradfitz modified the milestones: Go1.9, Go1.9Early May 3, 2017
@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Jun 13, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jun 13, 2017
@bradfitz bradfitz added the early-in-cycle A change that should be done early in the 3 month dev cycle. label Jun 13, 2017
@gopherbot
Copy link

Change https://golang.org/cl/85997 mentions this issue: net: report connect error as coming from "connect"

@golang golang locked and limited conversation to collaborators Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin 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