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?
to your account
If traces are used in TCPConnector._resolve_host the context switch introduced by awaiting their trace API calls can lead to various race conditions.
For example the DNS cache hit test may evaluate True but by the time traces is done it may already be gone again.
The same is true for the throttling logic where between checking that the key is already throttled and then accessing that key the key may already be popped.
Similarly in the opposite case of the above, with traces enabled, the code might override an already set throttled event
See my branch
In the tests I mess with the caches from the traces directly to simulate the effects for simplicity.
The text was updated successfully, but these errors were encountered:
Fix #4013 _resolve_host race conditions (#4014)
[3.6] Fix #4013 _resolve_host race conditions (#4014)
(cherry picked from commit 010caab)
Co-authored-by: Jonas Obrist <firstname.lastname@example.org>
[3.6] Fix #4013 _resolve_host race conditions (#4014) (#4030)
Successfully merging a pull request may close this issue.