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: LookupHost("nonexistentdomain.golang.org"): returns [173.194.74.141 2607:f8b0:4001:c14::8d] #25361

Closed
alexbrainman opened this issue May 12, 2018 · 8 comments

Comments

Projects
None yet
4 participants
@alexbrainman
Copy link
Member

commented May 12, 2018

Recent CL 111718 added TestLookupHostCancel that fails on plan9 builder

https://build.golang.org/log/63c5911a1ae08505472b57f58267a3f778b3eb5a

--- FAIL: TestLookupHostCancel (0.05s)
	lookup_test.go:941: LookupHost("nonexistentdomain.golang.org"): returns [173.194.74.141 2607:f8b0:4001:c14::8d], but should fail
FAIL
FAIL	net	26.834s

/cc @0intro

Alex

@gopherbot

This comment has been minimized.

Copy link

commented May 12, 2018

Change https://golang.org/cl/112955 mentions this issue: net: skip TestLookupHostCancel on plan9

@0intro

This comment has been minimized.

Copy link
Member

commented May 12, 2018

The nonexistentdomain.golang.org name returns a CNAME to golang.org.

nonexistentdomain.golang.org. 86400 IN  CNAME   golang.org.
golang.org.             1800    IN      A       216.58.215.49

It looks like the Plan 9 resolver follows the CNAME, while it doesn't seem to be the case on the other builders.

Would it be possible to change TestLookupHostCancel to query a name that doesn't return a CNAME entry, like nonexistentdomain.example.org for example?

@0intro 0intro added the OS-Plan9 label May 12, 2018

@0intro

This comment has been minimized.

Copy link
Member

commented May 12, 2018

After re-reading the change, I figured out it doesn't matter if the DNS request succeeds or not. What matter is that when the DNS request is canceled, LookupHost returns errCanceled.

This doesn't work on Plan 9 because DNS requests can't be canceled on Plan 9 currently. On Plan 9, DNS requests are done by writing to a file. Maybe this issue could be fixed by implementing cancellations in LookupHost on Plan 9.

@alexbrainman

This comment has been minimized.

Copy link
Member Author

commented May 13, 2018

This doesn't work on Plan 9 because DNS requests can't be canceled on Plan 9 currently. On Plan 9, DNS requests are done by writing to a file.

Same on Windows. DNS requests are answered by calling blocking API.

Maybe this issue could be fixed by implementing cancellations in LookupHost on Plan 9.

That is what windows code does. CL 111718 fixed a bug in that code.

I will leave CL 112955 in, if you decide to submit it. After you convince Brad to remove -2.

Alex

@gopherbot

This comment has been minimized.

Copy link

commented May 13, 2018

Change https://golang.org/cl/112981 mentions this issue: net: implement cancellable lookup on Plan 9

@bradfitz

This comment has been minimized.

Copy link
Member

commented May 13, 2018

I'll investigate the CNAME issue and make sure we're using a DNS name with no results too.

@bradfitz

This comment has been minimized.

Copy link
Member

commented May 13, 2018

Please keep some bug open about CNAME for that domain if you close this one.

@0intro

This comment has been minimized.

Copy link
Member

commented May 13, 2018

I've opened #25370.

@gopherbot gopherbot closed this in 66a67ee May 13, 2018

@golang golang locked and limited conversation to collaborators May 13, 2019

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.