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: test fails - TestLookupDotsWithLocalSource #15881

Closed
ghost opened this issue May 29, 2016 · 8 comments
Closed

net: test fails - TestLookupDotsWithLocalSource #15881

ghost opened this issue May 29, 2016 · 8 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@ghost
Copy link

ghost commented May 29, 2016

go version: 1.6.2 - also present when testing master branch
linux/amd64

trying to run all.bash eventually fails on testing packages.
--- FAIL: TestLookupDotsWithLocalSource (0.02s) lookup_test.go:457: netgo: got localhost.; want localhost FAIL FAIL net 1.958s
I saw issue #14050 but my /etc/hosts does not contain any trailing dots.

@ghost
Copy link
Author

ghost commented May 30, 2016

apparently this does not present itself in version 1.5.4
I checked out go1.5.4 and afterward all tests pass and compilation continues

just to be sure I then checked out 1.6.2 again and git cleaned fdx, ran all.bash and it fails on the same test again. so for now, i'm stuck with 1.5.4 😄

@ianlancetaylor
Copy link
Contributor

What does your /etc/hosts file look like? What does dig 1.0.0.127.in-addr.arpa print?

(For what it's worth, this test failure is not all that serious. At the point of the failure your Go build is installed and working.)

@ianlancetaylor ianlancetaylor added this to the Go1.8 milestone May 30, 2016
@ianlancetaylor ianlancetaylor added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 30, 2016
@ghost
Copy link
Author

ghost commented May 31, 2016

Oh, I didn't know it was still working fine. I'll recompile 1.6.2 then.
But still here's the info requested:

/etc/hosts

127.0.1.1 openheart localhost
::1 openheart ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

dig

127.in-addr.arpa. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800

@mikioh
Copy link
Contributor

mikioh commented Jun 2, 2016

@robjloranger,

This is probably related to your circumstances. Can you show us the following:

  • /etc/resolv.conf, /etc/nsswitch.conf
  • configuration on the running local recursive/cache server or similar if possible. I'm sure there is someone who speaks DNS and returns "nobody.invalid." on your circumstances

@ghost
Copy link
Author

ghost commented Jun 2, 2016

resolv.conf

# Generated by NetworkManager
search telus
nameserver 192.168.1.254
nameserver 75.153.171.114
nameserver 2001:568:ff09:10a::56
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 2001:568:ff09:10a::114

nsswitch.conf

# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files mdns_minimal [NOTFOUND=return] dns myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf

i'm not sure what you mean by the second point. what else could be setting this?

@mikioh
Copy link
Contributor

mikioh commented Jun 2, 2016

@robjloranger,

i'm not sure what you mean by the second point. what else could be setting this?

Ah, you are using telus, that's enough for investigation, thanks. Probably we should skip TestLookupDotsWithLocalSource in short-mode on non-buildbots/trybots for avoiding complicated testing.

@mikioh mikioh modified the milestones: Go1.7, Go1.8 Jun 14, 2016
@mikioh
Copy link
Contributor

mikioh commented Jun 17, 2016

For the record, this might happen when the node under test uses a) some agent software that touches/modifies the local database file /etc/hosts, and b) some full resolver that provides local-data/local-zone-like RR caches.

From go1.6, the check on /etc/hosts runs every 5 secs, not every 5 mins. My dumb hypothesis is that;

  1. some agent software makes /etc/hosts empty temporarily for some reason
  2. built-in stub resolver reads the empty /etc/hosts file and has no record
  3. built-in stub resolver throws a query to some full resolver
  4. the full resolver replies its local-data/local-zone RR, which contains "127.in-addr.arpa. IN SOA localhost. nobody.invalid."
  5. TestLookupDotsWithLocalSource barks at "localhost."

@ghost
Copy link
Author

ghost commented Jul 22, 2016

FYI: this stopped happening with go 1.6.2, and the test continues to pass in go 1.7rc2 as well

@golang golang locked and limited conversation to collaborators Jul 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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