Skip to content

Fix Abort Lock #55738

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

Merged
merged 4 commits into from
May 15, 2024
Merged

Fix Abort Lock #55738

merged 4 commits into from
May 15, 2024

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented May 15, 2024

No description provided.

@ghost ghost added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label May 15, 2024
@wtgodbe wtgodbe enabled auto-merge (squash) May 15, 2024 17:12
@wtgodbe wtgodbe merged commit 6c95ad9 into main May 15, 2024
26 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/PortFramewrite branch May 15, 2024 18:52
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview5 milestone May 15, 2024
/// <returns><c>true</c> if already completed.</returns>
private bool CompleteUnsynchronized()
{
if (_completed)
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it always needs to be called inside _writeLock. You can assert that (at least in debug), with something like this:

https://github.com/grpc/grpc-dotnet/blob/ef1f0d209c3e40c923a6f5830871402eecded030/src/Grpc.Net.Client/Internal/Retry/ChannelRetryThrottling.cs#L75

/// Do not call this method under the _writeLock.
/// This method can call Http2OutputProducer.Stop which can acquire Http2OutputProducer._dataWriterLock
/// which is not the desired lock order
/// </summary>
private void AbortConnectionFlowControl()
{
lock (_windowUpdateLock)
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants