-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Random ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport... #6071
Comments
Hey @JulienPalard, |
Oh, I missed that, I blindly trusted
Yes, I can try again for good measure: I'm on 9723abf, I run
|
Looks like it's not an aiohttp issue, opened a cpython issue: https://bugs.python.org/issue46318 |
@JulienPalard I have had a similar issue that has been driving me nuts for a couple of months. Have you found a workaround? |
I worked on this a bit. I have not found a workaround, but I think I slowly surrounded the root cause which is around asyncio/sslproto.py and/or _ssl.c (cpython side), probably really near SSH_shutdown which handling looks a bit on the simple side (like "try it twice and that's it.") (handling it the right way looks not trivial, easily leading to security issues, if I understand correctly). |
For those interested in how to solve it, this workaround worked for me:
See here |
Describe the bug
Since I recently learned that #1925 is closed, I happily poked around and boom got a new
RecourceWarning
.Sadly it does not happen every time, it really depends on the number of domains I have in my list, if I try to reduce the list, in the hope to find a culpit domain, the warning vanishes.
To Reproduce
Here's a reproducer (I'm sorry for the APHP, I have nothing against them, I hope some 10s of requests is not noticable in their load average, I am not trying to hurt in any way... just happen I reproduced the bug using a dataset of their URLs).
reproducer
It does not reproduce the bug every time (sorry again for the servers in front).
Expected behavior
No ResourceWarning, as they could lead in fd leaks on long running client apps.
Logs/tracebacks
Python Version
3.9.7
aiohttp Version
4.0.0a1 from pip install --pre, also tried on `master` branch, at 4ebd52ed1c29c7db52039f213cd2ab268c85bc74.
multidict Version
yarl Version
OS
Debian Bookworm
Related component
Client
Additional context
No proxy, very good connection to the internet, but laptop on Wi-Fi so like 60Mbps up 60Mbps down.
Code of Conduct
The text was updated successfully, but these errors were encountered: