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

[H/3] Remove waiting on tasks from H3 request stream dispose #92410

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Sep 21, 2023

The waiting on tasks was added due to HTTP stress crashing on QuicStream asserts:

Debug.Assert(_receiveTcs.IsCompleted);
Debug.Assert(_sendTcs.IsCompleted);

H3 stream is issuing reads and writes on QuicStream in parallel. So if one ends on cancellation and decides to dispose the stream, the DisposeAsync might run in parallel with pending Write/Read.
Basically, this change reverts these to commits: d6f5061, f6261e9 from #90253.

Fixes #92390

The asserts still need to addressed, but we don't have a running stress atm.

cc @JamesNK

@ghost
Copy link

ghost commented Sep 21, 2023

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

Issue Details

The waiting on tasks was added due to HTTP stress crashing on QuicStream asserts:

Debug.Assert(_receiveTcs.IsCompleted);
Debug.Assert(_sendTcs.IsCompleted);

H3 stream is issuing reads and writes on QuicStream in parallel. So if one ends on cancellation and decides to dispose the stream, the DisposeAsync might run in parallel with pending Write/Read.
Basically, this change reverts these to commits: d6f5061, f6261e9 from #90253.

Fixes #92390

The asserts still need to addressed, but we don't have a running stress atm.

Author: ManickaP
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@ManickaP ManickaP requested a review from a team September 21, 2023 14:23
@ManickaP
Copy link
Member Author

I've run locally all the tests from dotnet/aspnetcore#50833 with the fix and they pass promptly, no timeout, no hangs.
Running whole test suite reports some H2 tests failing, but they seem to be quarantined against different issues, so hopefully I did my due diligence properly.

@ManickaP
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ManickaP
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Debug.Assert(_receiveTcs.IsCompleted);
Debug.Assert(_sendTcs.IsCompleted);
// TODO: If there was and ongoing read/write when dispose was called, MsQuic events might be processed, but the continuations may not thus the state can still be in Ready.
//Debug.Assert(_receiveTcs.IsCompleted);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not bug fan of submitting comments like this. same bellow.

@karelz karelz added this to the 9.0.0 milestone Oct 11, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Nov 10, 2023
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.

HTTP/3: Hang when reading content or disposing response when SerializeToStreamAsync doesn't complete
4 participants