Stopping the DNSCrypt UDP listener logs no receive warning #22
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#22
Loading…
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?
Why
RP-1 saw the UDP listener log a shutdown cancellation (SocketException 125) as a Warning. The
plain listener was fixed in
7648beb0:UdpDnsListener.StopAsyncclearsIsListeningbefore itcloses the sockets and the receive loop treats a SocketException as the stop when
IsListeningis false (
src/dotnet/src/Ninlil.Dns.Protocol.Plain/UdpDnsListener.cs:155-165,218-223).DnsCryptUdpListenerhas the same order (close at:249, token cancelled later bybase.StopAsync) but only checks the token (src/dotnet/src/Ninlil.Dns.Protocol.DnsCrypt/DnsCryptUdpListener.cs:189-195),so the same race logs "Error receiving a DNSCrypt UDP datagram." on a stop. The DHCP, TFTP and
RA listeners cancel the token before closing, so they are not affected.
What changes
DnsCryptUdpListener: the sameIsListeningrule asUdpDnsListener, with the same comment.Acceptance
StopAsync_WhileReceiveLoopsArePending_LogsNoWarning(the plainlistener's) in
src/dotnet/tests/Ninlil.Dns.Protocol.DnsCrypt.Tests. The race may not failreliably: say so, and give the evidence used (for example 50 query-then-stop cycles with a
count of warnings before and after).
Source
release-prep.md:21(RP-1 nit),release-prep.md:120(W5 fix and its mechanism).Ghost referenced this issue2026-11-05 06:07:47 -05:00