We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If traces are used in TCPConnector._resolve_host the context switch introduced by awaiting their trace API calls can lead to various race conditions.
traces
TCPConnector._resolve_host
For example the DNS cache hit test may evaluate True but by the time traces is done it may already be gone again.
True
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)
010caab
[3.6] Fix #4013 _resolve_host race conditions (#4014)
3636b4d
(cherry picked from commit 010caab) Co-authored-by: Jonas Obrist <[email protected]>
[3.6] Fix #4013 _resolve_host race conditions (#4014) (#4030)
f189e8c
Successfully merging a pull request may close this issue.
Long story short
If
traces
are used inTCPConnector._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 timetraces
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
Steps to reproduce
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: