mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-24 18:55:55 +03:00
[GH-ISSUE #1073] [resolver] ResolverOpts timeout value is not respected #596
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#596
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @balboah on GitHub (Apr 13, 2020).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1073
When using the resolver async lookup, queries might never time out or run for much longer than configured. It's especially bad in the TLS based configurations as in the provided example.
This causes a memory leak for the stalled async lookups.
To Reproduce
nc -l 127.0.0.1 1443in one shellexample main.rs
Expected behaviour
I expect the timeout configuration to be the total timeout of:
I'm also expecting the nameserver pool to handle re-cycling for established connections if they fail to respond within the specified timeout.
System:
Version:
Crate: resolver
Version: 76a377
Additional context
I was able to work around the memory leak by wrapping the
resolver.lookupinsidetokio::time::timeout. However I'm not sure how soon the underlying nameserver pool connection with the dns server will re-connect. This is especially sensitive when switching between IPv4 & IPv6 endpoints.@bluejekyll commented on GitHub (Apr 13, 2020):
These could be related? #989
There are a bunch of tests in this area, so I'm surprised by this one.
@balboah commented on GitHub (Apr 14, 2020):
I'd say it's not related since this issue is also apparent when only one nameserver is listed and the warning in #989 is not shown. Also this is only one request in the example. I should also add that clear text based lookups have an actual timeout of ~15s instead of the configured 5s. But they do timeout.