Skip to content

[HTTP/3] Fixed stress error System.Exception: Completed unexpectedly - #72734

Merged
ManickaP merged 1 commit into
dotnet:mainfrom
ManickaP:mapichov/fix-stress-completed-unexpectedly
Jul 24, 2022
Merged

ManickaP merged 1 commit into
dotnet:mainfrom
ManickaP:mapichov/fix-stress-completed-unexpectedly

Conversation

@ManickaP

Copy link
Copy Markdown
Member

Fixed stress error:

System.Exception: Completed unexpectedly
   at HttpStress.ClientOperations.<>c.<<get_Operations>b__1_4>d.MoveNext() in /home/manicka/repositories/runtime.2/src/libraries/System.Net.Http/tests/StressTests/HttpStress/ClientOperations.cs:line 290
--- End of stack trace from previous location ---
   at HttpStress.StressClient.<>c__DisplayClass17_0.<<StartCore>g__RunWorker|0>d.MoveNext() in /home/manicka/repositories/runtime.2/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressClient.cs:line 204

consistently happening for GET Aborted.

@ghost ghost added the area-System.Net label Jul 24, 2022
@ghost ghost assigned ManickaP Jul 24, 2022
@ManickaP
ManickaP requested review from CarnaViire, rzikm and wfurt July 24, 2022 10:55
@ghost

ghost commented Jul 24, 2022

Copy link
Copy Markdown

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

Issue Details

Fixed stress error:

System.Exception: Completed unexpectedly
   at HttpStress.ClientOperations.<>c.<<get_Operations>b__1_4>d.MoveNext() in /home/manicka/repositories/runtime.2/src/libraries/System.Net.Http/tests/StressTests/HttpStress/ClientOperations.cs:line 290
--- End of stack trace from previous location ---
   at HttpStress.StressClient.<>c__DisplayClass17_0.<<StartCore>g__RunWorker|0>d.MoveNext() in /home/manicka/repositories/runtime.2/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressClient.cs:line 204

consistently happening for GET Aborted.

Author: ManickaP
Assignees: -
Labels:

area-System.Net

Milestone: -

@ManickaP

Copy link
Copy Markdown
Member Author

/azp list

@azure-pipelines

Copy link
Copy Markdown

@ManickaP

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries stress-http

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

}
private unsafe int HandleEventPeerSendAborted(ref PEER_SEND_ABORTED data)
{
_receiveBuffers.SetFinal();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this should not be set? I look at the ReceiveBuffers but it is not quite clear to me what this does.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It successfully completes the buffer, propagation of FIN flag. You want to set it only in successful scenarios.

So what happened here is that we would set it here, ReadAsync would see this, i.e. that it's completed successfully and finish successfully the reading side of the stream, before the following exception could get propagated.

@ManickaP

Copy link
Copy Markdown
Member Author

Failures unrelated, stress ran successfully.

@ManickaP
ManickaP merged commit b5fd812 into dotnet:main Jul 24, 2022
@ManickaP
ManickaP deleted the mapichov/fix-stress-completed-unexpectedly branch July 24, 2022 18:07
@karelz karelz added this to the 7.0.0 milestone Aug 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 6, 2022
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.

3 participants