mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 19:25:56 +03:00
[GH-ISSUE #1880] WARNs emitted on TCP disconnects #804
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#804
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 @olix0r on GitHub (Jan 11, 2023).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1880
We had users report WARNs being emitted in application logs. When looking more closely at debug logs we see something like:
It seems inappropriate to surface WARNs on such an innocuous internal event to me. As a workaround, we're going to add
trust_dns=ERRORto our default log filter to exclude these types of things.Would PRs be accepted to reduce log level for these types of innocuous events?
@djc commented on GitHub (Jan 11, 2023):
In principle, yes!
@bluejekyll commented on GitHub (Jan 11, 2023):
Yeah, I think it's safe to make all of these DEBUG statements, or were you thinking TRACE?
@olix0r commented on GitHub (Jan 11, 2023):
DEBUGseems appropriate to me, too. I think @hawkw is going to take a look at fixing this.@hawkw commented on GitHub (Jan 11, 2023):
It looks like the error is already logged at
DEBUGif there are no pending requests, and it's only logged atWARNif there are:github.com/bluejekyll/trust-dns@3235d2b3f6/crates/proto/src/xfer/dns_multiplexer.rs (L201-L205)It looks like this error is being logged because it's handled by returning
Nonefrom theStreamimpl,rather than by returning an error, so the error itself isn't actually propagated to user code:github.com/bluejekyll/trust-dns@3235d2b3f6/crates/proto/src/xfer/dns_multiplexer.rs (L417)Edit: oh, the error is passed to the active requests on the stream, just not returned from the stream impl itself. Just logging this at debug is probably reasonable.
Changing this code to just always log at
DEBUGseems reasonable to me. However, if there is a desire to log some errors atWARN, perhaps we ought to make that decision based on the error kind as well as whether there are pending requests? That way, there's not a warning for TCP streams closing, but there could still be a warning for protocol errors that are less likely to occur...