-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[HTTP/3] HttpConnectionPool may leak authorityExpireTimer / hit ObjectDisposedException #66782
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsBased on code inspection.
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs Lines 1155 to 1156 in a1bc0f3
The good news is that the timer won't root the A related issue is that the same method will also access the runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs Line 1112 in a1bc0f3
|
Looks like this In this case, the whole |
Triage: Affects HTTP/3, reliability - race condition. We should fix it in 7.0. |
Based on code inspection.
HttpConnectionPool.HandleAltSvc
may create aTimer
ifDispose
runs during/before it, and it will never be disposed.The method should check
_disposed
in this branch (while holding the lock), before creating a newTimer
:runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
Lines 1155 to 1156 in a1bc0f3
The good news is that the timer won't root the
HttpConnectionPool
instance, but the timer entry may remain queued for a month.A related issue is that the same method will also access the
_authorityExpireTimer
outside a lock a few lines above, which could lead to an unexpectedObjectDisposedException
leaking out:runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
Line 1112 in a1bc0f3
The text was updated successfully, but these errors were encountered: