-
-
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
DNS resolution errors are sometimes swallowed #9447
Comments
Changing the host to |
It looks like |
we raise So it should be |
Another issue
So if it never times out we wait forever... |
So dns request one is in flight, the other requests back up against it.
|
I'm thinking reason you see the timeout error on the subsequent requests the dns resolution is still in progress from the first request even though the request itself timed out, and since the timeout of the request is lower than dns resolution timeout of the That's super confusing though..... |
When the |
the missing errors are fixed in #9451 |
Describe the bug
There is definitely some weirdness going on in aiohttp or more likely in aiodns: When I drop packets to my DNS server, I get the following stack trace:
So far so good, this is expected.
It is a bit weird that sometimes we get a different exception. This does indicate that the previous request is somehow kept around and reused.
What is weird though that even when I add another DNS server in my resolver (which fixes resolving) this script continuous to return errors 😢
It really seems as if the aiohttp/aiodns instance used keeps reusing cached or queued resolve attempts.
Originally posted by @agners in home-assistant/supervisor#5332 (comment)
To Reproduce
When I use this small reproducer:
Expected behavior
The OSError is not lost and it should produce
ClientConnectorError(ConnectionKey(host='checkonline.home-assistant.io', port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=None), OSError('Could not contact DNS servers'))
Logs/tracebacks
aiohttp Version
3.10.9
multidict Version
n/a
propcache Version
n/a
yarl Version
n/a
OS
Linux, MacOS
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: