-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: leak of aiodns.DNSResolver when ClientSession is closed #11150
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
Conversation
362d170
to
11763e2
Compare
CodSpeed Performance ReportMerging #11150 will degrade performances by 10.1%Comparing Summary
Benchmarks breakdown
|
Resolvers were never closed when TCPConnector is closed. Thus, _DNSResolverManager.release_resolver is never called, keeping the resolver referenced from _loop_data, which prevents pycares from garbage collecting it. Regression introduced in 3.12.0 in aio-libs#10897
11763e2
to
77cec38
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11150 +/- ##
==========================================
- Coverage 98.85% 98.85% -0.01%
==========================================
Files 131 131
Lines 42712 42737 +25
Branches 2307 2308 +1
==========================================
+ Hits 42225 42248 +23
- Misses 337 340 +3
+ Partials 150 149 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the PR. I'll clear the perf regression once the CI passes. Its going to be expected with this fix. |
close/reopen to try to get the docs runner to work |
Backport to 3.12: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 996ad00 on top of patchback/backports/3.12/996ad00037d9e729aa58b757099dd2fea5e7dcc9/pr-11150 Backporting merged PR #11150 into master
🤖 @patchback |
Backport to 3.13: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 996ad00 on top of patchback/backports/3.13/996ad00037d9e729aa58b757099dd2fea5e7dcc9/pr-11150 Backporting merged PR #11150 into master
🤖 @patchback |
@Tasssadar Please let me know if you have any trouble with the backport. I can do another release tomorrow. |
…s#11150) Co-authored-by: J. Nick Koston <[email protected]> (cherry picked from commit 996ad00)
…olver when ClientSession is closed (aio-libs#11150) Co-authored-by: J. Nick Koston <[email protected]> (cherry picked from commit 996ad00)
…olver when ClientSession is closed (aio-libs#11150) Co-authored-by: J. Nick Koston <[email protected]> (cherry picked from commit 996ad00)
…olver when ClientSession is closed Co-authored-by: J. Nick Koston <[email protected]> (cherry picked from commit 996ad00)
…en ClientSession is closed (#11151) Co-authored-by: J. Nick Koston <[email protected]>
…en ClientSession is closed (#11152) Co-authored-by: J. Nick Koston <[email protected]>
Resolvers were never closed when
TCPConnector
is closed. Thus,_DNSResolverManager.release_resolver
is never called, keeping the resolver referenced from_loop_data
, which prevents pycares from garbage collecting it.Regression introduced in 3.12.0 in #10897