-
Notifications
You must be signed in to change notification settings - Fork 18k
net: Error when running concurrent DNS queries using cgo on MacOS #30521
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
Comments
I've been taking a look at the lookup code, and it looks like the problem is here: Line 266 in ee6bec9
The lookup group will only allow 1 query to run even when they are using different values for the A possible fix would be to change the key for the lookup group to be Also, from the Git history it looks like this didn't change for 1.12 so this does not explain why this used to work on 1.11. |
CC @mikioh @bradfitz @ianlancetaylor for |
Changing the key to |
@ianlancetaylor Cool, if no one is working on this I'd like to try sending a CL including some tests. Further tracking down the problem I think the source of the regression is actually c659be4 but I think changing the lookup group key still makes more sense as a fix. |
Change https://golang.org/cl/166037 mentions this issue: |
@gopherbot please consider this for backport to 1.12 |
Backport issue(s) opened: #31062 (for 1.12). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
As reported in #31058, this is a regression in Go 1.12 and there's no workaround for Windows and others that have no support for GODEBUG=netdns=go. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, only on the latest release, it wasn't a problem with Go 1.11
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
With the code available in https://play.golang.org/p/Za2kDnfq-wB on MacOS Mojave 10.14
The expected result for running it with both no environment variables and with
PARALLEL=1
would be:What did you see instead?
Running it with no envs yields the expected result. However, running it with
PARALLEL=1
causes the following output:The problem only seems to exist when running on MacOS, and only when using cgo resolver, using Go resolver or on Linux does not causes any errors:
The text was updated successfully, but these errors were encountered: