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: `dns-should-not-resolve.golang` DNS record found in the `4.2.2.2` DNS server. #16716

Closed
jasonmoo opened this issue Aug 16, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@jasonmoo
Copy link

commented Aug 16, 2016

Building go 1.7 with all.bash on osx/amd64, I noticed the following fail in the net/http package:

--- FAIL: TestTransportEventTraceRealDNS (0.06s)
    transport_test.go:3386: expected error during DNS lookup
FAIL

I dumped the httptrace used in the request that failed and found:

2016/08/15 22:23:02 DNSStart: {Host:dns-should-not-resolve.golang}
2016/08/15 22:23:02 DNSDone: {Addrs:[{IP:198.105.244.11 Zone:} {IP:198.105.254.11 Zone:}] Err:<nil> Coalesced:false}
2016/08/15 22:23:02 ConnectStart: tcp 198.105.244.11:80
2016/08/15 22:23:02 ConnectDone: tcp 198.105.244.11:80 <nil>

Seeing that the DNS was resolving I tested further with nslookup and discovered the DNS server I had been using (4.2.2.2) contained an entry.

jason@mba ~ : nslookup dns-should-not-resolve.golang
Server:     4.2.2.2
Address:    4.2.2.2#53

Non-authoritative answer:
Name:   dns-should-not-resolve.golang
Address: 198.105.244.11
Name:   dns-should-not-resolve.golang
Address: 198.105.254.11

Changing the DNS server to a different provider (8.8.8.8) showed no entry.

jason@mba ~ : nslookup dns-should-not-resolve.golang
Server:     8.8.8.8
Address:    8.8.8.8#53

** server can't find dns-should-not-resolve.golang: NXDOMAIN

This error has prevented my all.bash tests from passing. I'm not sure if there's a responsibility here to write tests that cannot be spoofed. What is the course to take?

@jasonmoo jasonmoo changed the title `dns-should-not-resolve.golang` DNS record found in the `4.2.2.2` Level 3 DNS server. `dns-should-not-resolve.golang` DNS record found in the `4.2.2.2` DNS server. Aug 16, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Aug 16, 2016

Considering that the tests are for the continuous builders and developers, and most developers don't tolerate captive portals and lying DNS, I don't think we really need to do anything here.

@rakyll rakyll changed the title `dns-should-not-resolve.golang` DNS record found in the `4.2.2.2` DNS server. net/http: `dns-should-not-resolve.golang` DNS record found in the `4.2.2.2` DNS server. Aug 16, 2016

@rakyll

This comment has been minimized.

Copy link
Member

commented Aug 16, 2016

I don't think there is anything we can do better either.

The choice of the name is good enough -- non existing TLD, long and self documentary SLD. We unfortunately don't have control over every DNS server in the world to make this always pass. Renaming the name to something else doesn't protect us from experiencing the same issue due to the lying DNS servers.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Aug 16, 2016

I'll keep #16732 open at least to at least skip these types of tests during all.bash in short mode, unless you're on a builder.

@golang golang locked and limited conversation to collaborators Aug 16, 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.