-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: DNS lookup timeout only when using go resolver #28419
Comments
As a Deb/RPM package you mean? You can use a more modern Go alongside your system Go binaries. Just run:
And then use the There's been a fair amount of DNS work in the past release & at tip. Please try Go 1.11.x and report back. |
I'm still not sure your circumstances,
but looks like:
then, there perhaps might be no workaround except re-configuring your own DNS recursive server. IIRC, the built-in DNS stub resolver implementation is conservative and doesn't take any risk for the operation of DNS transport over UDP and the Kaminsky attack and its variants. In general, implementing, operating DNS is hard and all of us know that we need some compromise for accommodating various circumstances including yours. If you have any good ideas, please open a new issue for the improvement of DNS stub resolver implementation. |
The new DNS client in Go 1.11 might actually work here. It looks like the offending response is only a little bigger than the limit (561 vs 512), and the new DNS client incrementally parses the response. As long as all of the answers are in the first 512 bytes (which is almost certainly the case here given what was posted), the new DNS client will happily accept it. That said, you would probably better off fixing your DNS server/config. |
FWIW, I'm now enjoying reading http://www.potaroo.net/ispcol/2018-10/oarc29.html and feels like it might be a good read as a first step. |
That didn't do anything for me but I managed to compile 1.11.1 on my own.
The problem does not occur in that version any more. Considering the other comments it was very likely #21160. |
I was also facing the DNS timeout issue intermittently on go1.10. After changing the resolver from go to cgo everything worked fine. Anyone else facing the issue can try and check if it works for them. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Not tried, go 1.11 isn't available for my system yet.
What operating system and processor architecture are you using (
go env
)?Linux, amd64
What did you do?
Run the following program:
Using the standard go DNS resolver will results in
Running the same program with GODEBUG=netdns=cgo returns almost immediately with
Attached are two straces, one using the Go resolver, one using the libc resolver.
Here's the full record returned by the DNS server:
See git-lfs/git-lfs#3332 (comment) for a preliminary investigation of the problem.
What did you expect to see?
Successful DNS resolution.
What did you see instead?
I/O timeout
The text was updated successfully, but these errors were encountered: