Fix DNS-over-QUIC stream lifetime under cancellation - #62
Open
zs311521 wants to merge 1 commit into
Open
Conversation
Author
|
@ShreyasZare I think this is it. We have now completed the signed production convergence around this patch, and the evidence continues to point specifically to the outbound DoQ stream ownership/cancellation race fixed here. What is now proven:
I am deliberately not claiming the long-term memory recurrence closed yet: the independent 24-hour and 72-hour soak windows remain pending. But the causal reproduction, exact A/B, terminal ownership proof, throughput result, and live protocol evidence all align. This is the first candidate that matches both the mechanism and the production behaviour, and I believe it is the solution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@ShreyasZare This fixes a deterministic DNS-over-QUIC stream-retention path reproduced while the peer's bidirectional-stream capacity is exhausted.
On current .NET 11 preview 6 with Microsoft MsQuic 2.5.9, cancelling
OpenOutboundStreamAsyncwhile it waits for peer capacity disposes an incompletely openedQuicStream. That requests nativeABORT_SEND | ABORT_RECEIVE | IMMEDIATE(0xE); under sustained traffic, repeated timed-out queries leave native streams retained until the peer or connection catches up.The change:
StreamCapacityCallbackto maintain per-connection managed admission permits, so caller cancellation happens before a native stream is opened;Deterministic A/B verification against current
develop:0xE;This is the concrete DoQ/native-lifetime mechanism observed in the forwarder-mode investigation related to TechnitiumSoftware/DnsServer#2030. It is deliberately not presented as an explanation for every report in that broader issue.