Skip to content
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

Fix Http2 deadlock #99889

Merged
merged 3 commits into from Mar 21, 2024
Merged

Fix Http2 deadlock #99889

merged 3 commits into from Mar 21, 2024

Conversation

MihaZupan
Copy link
Member

Fixes #98945

The product change is just dropping the lock on Http2Connection.GetIdleTicks that's called by the connection pool while holding the pool lock. The lock isn't actually needed here as the race condition exists even with the lock, and should be harmless either way.

Also added a bunch more asserts to make introducing similar issues in the future a bit harder.

Tested on a repro project with artificial delays inside System.Net.Http.

We should consider backporting this one to 8.0.

@MihaZupan MihaZupan added this to the 9.0.0 milestone Mar 18, 2024
@MihaZupan MihaZupan requested a review from a team March 18, 2024 09:36
@MihaZupan MihaZupan self-assigned this Mar 18, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@MihaZupan
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@CarnaViire CarnaViire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MihaZupan MihaZupan merged commit 9b8b01b into dotnet:main Mar 21, 2024
87 checks passed
@MihaZupan
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/8378465640

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpClient getting deadlocked on InvalidateHttp2Connection
3 participants