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

Fix the panic when a query response comes after the read() timesout #1088

Merged
merged 1 commit into from
Apr 8, 2016

Conversation

sanimej
Copy link

@sanimej sanimej commented Apr 8, 2016

With the cached udp connection to an external nameserver the following can happen..

DEBU[0064] Query name.[1] from 127.0.0.11:42291, forwarding to udp:8.8.8.8
DEBU[0067] Read from DNS server failed, read udp 172.20.0.2:47916->8.8.8.8:53: i/o timeout

now the saved context for the forwarded query will be cleared

DEBU[0069] Query name.[1] from 127.0.0.11:42291, forwarding to udp:8.8.8.8

Since the first query timed out client resolver retries; when the DNS server is waiting for the response it could receive the reply for the previous query whose context has been cleaned up already.

DEBU[0069] Can't retrieve client context for dns id 6063

Added a missing nil check for this case and increased the read timeout (typical client resolver timeout is 5 seconds; hence keeping the read timeout to 4 seconds)

Fixes #1087
Signed-off-by: Santhosh Manohar santhosh@docker.com

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
@mavenugo
Copy link
Contributor

mavenugo commented Apr 8, 2016

can you please rebase to master and push the change again to make CI happy ?

@sanimej
Copy link
Author

sanimej commented Apr 8, 2016

@mavenugo rebased; CI is running. PTAL

@mrjana
Copy link
Contributor

mrjana commented Apr 8, 2016

LGTM

@mavenugo
Copy link
Contributor

mavenugo commented Apr 8, 2016

LGTM

@mavenugo mavenugo merged commit 5cf3087 into moby:master Apr 8, 2016
@sanimej sanimej deleted the udp branch April 19, 2017 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer on docker master
4 participants