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: on windows, net.Dial with udp times out immediately #5349

Closed
nkatsaros opened this issue Apr 24, 2013 · 14 comments
Closed

net: on windows, net.Dial with udp times out immediately #5349

nkatsaros opened this issue Apr 24, 2013 · 14 comments
Milestone

Comments

@nkatsaros
Copy link
Contributor

What steps will reproduce the problem?
http://play.golang.org/p/k-9aiSXzQ6

What is the expected output?
Nothing

What do you see instead?
dial udp localhost:514: i/o timeout

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Windows 7 amd64

Which version are you using?  (run 'go version')
tip (d4c3e6c8b141)

Please provide any additional information below.

I've traced the problem back to revision 64df8d0
(https://code.google.com/p/go/source/browse/src/pkg/net/dial_gen.go?spec=svn64df8d0a25d3ecacf8a9518047e21cc0e75edb38&;r=64df8d0a25d3ecacf8a9518047e21cc0e75edb38).


resolveAndDialChannel in dial_gen.go does not check for a Zero time and sets the timer
to 0 causing an immediate timeout. The udp Dial hits this path because it cannot use
ConnectEx.

I would fix this myself but I don't really know if removing the timer completely in this
case is the correct course of action.

I assume this also affects net.Dial with all network types on plan9.
@alexbrainman
Copy link
Member

Comment 1:

https://golang.org/cl/8687045/

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 2:

I believe this is a regression from Go 1 when we made all the dial changes, so tagging
this Go 1.1.
Alex has a fix, which looks correct.

Labels changed: added packagebug, go1.1, removed priority-triage.

@bradfitz
Copy link
Contributor

Comment 3:

Owner changed to @alexbrainman.

@alexbrainman
Copy link
Member

Comment 4:

Brad, mikio sent the change, not me. But, I am going to review it. I just added ref to
codereview, to give nick chance to comment.
Alex

@bradfitz
Copy link
Contributor

Comment 5:

Oh, sorry, too many tabs open. :)
Thanks for reviewing.

Owner changed to @mikioh.

@gopherbot
Copy link

Comment 6 by emery@fuzzlabs.org:

Does not effect all types on plan9, TCP times out, UDP appears to work.
https://golang.org/issue/5380

@alexbrainman
Copy link
Member

Comment 7:

emery, I think it is a fluke. The way code is written - anything is possible.
Alex

@alexbrainman
Copy link
Member

Comment 8:

https://golang.org/cl/9159043/ so we don't have to wait for mikio.
Alex

@nkatsaros
Copy link
Contributor Author

Comment 9:

Any updates on why one of the fixes hasn't been merged yet? It seems like the 1.1
release is coming up quick.

@mikioh
Copy link
Contributor

mikioh commented May 7, 2013

Comment 10:

sorry for being late. somehow I've been stacked for a while. will take
a look tonight if possible but i'm happy if alex or someone could take
over this CL for the go 1.1 rigging, thanks.

@alexbrainman
Copy link
Member

Comment 11:

No problem, mikioh. I have sent a CL https://golang.org/cl/9159043/.
Alex

@alexbrainman
Copy link
Member

Comment 12:

This issue was closed by revision e1922fe.

Status changed to Fixed.

@adg
Copy link
Contributor

adg commented May 8, 2013

Comment 13:

This issue was closed by revision f34a588b0c9e.

@bradfitz
Copy link
Contributor

bradfitz commented May 9, 2013

Comment 14:

Issue #5380 has been merged into this issue.

mikioh pushed a commit that referenced this issue Apr 2, 2015
This change makes TestDialTimeout work on almost all the supported
platforms.

Updates #3016.
Updates #3307.
Updates #3867.
Updates #5380.
Updates #5349.

Change-Id: Iacf0ebea23cdd8f6c0333d70c667a5a5f5eb0ed2
Reviewed-on: https://go-review.googlesource.com/8220
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
adg added a commit that referenced this issue May 11, 2015
««« CL 9159043 / f1ddc3ce3dfe
net: fix dial race on plan9 and windows

Fixes #5349.

R=golang-dev, lucio.dere, dsymonds, bradfitz, iant, adg, dave, r
CC=golang-dev
https://golang.org/cl/9159043
»»»

R=golang-dev
CC=golang-dev
https://golang.org/cl/9315043
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants