-
Notifications
You must be signed in to change notification settings - Fork 617
Fix double deref in connection pool error path #5597
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
Merged
Merged
Conversation
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
mtfriesen
reviewed
Nov 18, 2025
mtfriesen
reviewed
Nov 18, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5597 +/- ##
==========================================
+ Coverage 84.81% 85.15% +0.33%
==========================================
Files 60 60
Lines 18647 18663 +16
==========================================
+ Hits 15816 15893 +77
+ Misses 2831 2770 -61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
anrossi
approved these changes
Nov 19, 2025
mtfriesen
approved these changes
Nov 19, 2025
guhetier
added a commit
that referenced
this pull request
Nov 19, 2025
## Description When creating a connection pool, if a `QuicConnStart` fails: - the connection was marked as `ExternalOwner` to prevent it from sending notification to the app - but this also mean that the closing logic will take care of releasing the owner refcount, since the application is not the owner yet - the connection was closed using `MsQuicConnectionClose`, which release the refcount of the application This caused a double release, triggering an assertion. We should not call APIs from internal call (it makes logging confusing and breaks some assumptions), so queue the connection close manually instead. Fixes #5550. ## Testing C/I. Need to consider if there is a simply way to deterministically test the connection pool failure paths. ## Documentation N/A
guhetier
added a commit
that referenced
this pull request
Nov 19, 2025
## Description When creating a connection pool, if a `QuicConnStart` fails: - the connection was marked as `ExternalOwner` to prevent it from sending notification to the app - but this also mean that the closing logic will take care of releasing the owner refcount, since the application is not the owner yet - the connection was closed using `MsQuicConnectionClose`, which release the refcount of the application This caused a double release, triggering an assertion. We should not call APIs from internal call (it makes logging confusing and breaks some assumptions), so queue the connection close manually instead. Fixes #5550. ## Testing C/I. Need to consider if there is a simple way to deterministically test the connection pool failure paths.
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.
Description
When creating a connection pool, if a
QuicConnStartfails:ExternalOwnerto prevent it from sending notification to the appMsQuicConnectionClose, which release the refcount of the applicationThis caused a double release, triggering an assertion.
We should not call APIs from internal call (it makes logging confusing and breaks some assumptions), so queue the connection close manually instead.
Fixes #5550.
Testing
C/I.
Need to consider if there is a simply way to deterministically test the connection pool failure paths.
Documentation
N/A