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

[Stress] Enable POST by disabling InternalServerError suppression #58110

Closed
wants to merge 5 commits into from

Conversation

alnikola
Copy link
Contributor

@alnikola alnikola commented Aug 25, 2021

Enable HTTP/2 POST stress tests because, the Kestrel's issue with an incorrect HTTP/2 stream resetting seems to be fixed by dotnet/aspnetcore#34768.

Contributes to #55261

Enable HTTP/2 POST stress tests because, the Kestrel's issue with an incorrect HTTP/2 stream resetting seems to be fixed by dotnet/aspnetcore#34768.

Fixes #55261
@ghost
Copy link

ghost commented Aug 25, 2021

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

Issue Details

Enable HTTP/2 POST stress tests because, the Kestrel's issue with an incorrect HTTP/2 stream resetting seems to be fixed by dotnet/aspnetcore#34768.

Fixes #55261

Author: alnikola
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@antonfirsov
Copy link
Member

image

Don't we need to wait for the next aspnetcore preview for the fix to propagate? /cc @ManickaP

@alnikola
Copy link
Contributor Author

/azp list

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@CarnaViire
Copy link
Member

Don't we need to wait for the next aspnetcore preview for the fix to propagate?

We might need to wait. Previous docker update was yesterday, but the ASP.NET Core fix might not be in yet. There is a PR for the next update dotnet/dotnet-docker#3073 but we also need to check whether SDK version is new enough.

@CarnaViire
Copy link
Member

Hmm RC1 PR is not in yet dotnet/aspnetcore#35676 - I think docker uses pre-installed RC1 now... in today's stress run the version is Microsoft.AspNetCore.App/6.0.0-rc.1.21423.14

@alnikola
Copy link
Contributor Author

Hmm RC1 PR is not in yet dotnet/aspnetcore#35676

Got it. I'll wait and the re-run the stress pipeline.

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@alnikola
Copy link
Contributor Author

All HTTP/2 stress tests are green now. The fix is working. Please, do the final review and approve.

cc: @karelz

@ManickaP
Copy link
Member

It's still there in HTTP/3 the same error. ~20 000 occurrences of:

System.Exception: Expected status code OK, got InternalServerError
    at HttpStress.ClientOperations.ValidateStatusCode(HttpResponseMessage m, HttpStatusCode expectedStatus) in /app/ClientOperations.cs:line 513
    at HttpStress.ClientOperations.<>c.<<get_Operations>b__1_10>d.MoveNext() in /app/ClientOperations.cs:line 446
 --- End of stack trace from previous location ---
    at HttpStress.StressClient.<>c__DisplayClass17_0.<<StartCore>g__RunWorker|0>d.MoveNext() in /app/StressClient.cs:line 204

https://dev.azure.com/dnceng/public/_build/results?buildId=1323480&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=1451f5f3-0108-5a08-5b92-e984b2a85bbd&l=140216

@ManickaP
Copy link
Member

Should we reopen the kestrel issue or file another one? @karelz @JamesNK

@alnikola
Copy link
Contributor Author

It's still there in HTTP/3 the same error. ~20 000 occurrences of:

@ManickaP Are you sure it's the same root cause? InternalServerError is just a generic 500 status, the reason can be completely different.

@karelz
Copy link
Member

karelz commented Aug 27, 2021

I assume the problem will be different in Kestrel for H/3.
Up to @JamesNK @Tratcher @adityamandaleeka if they want to create new issue or reuse existing one.

We will likely need to keep the test disabled -- but hopefully only for H/3 and not for H/2.

@karelz karelz requested a review from ManickaP August 27, 2021 15:47
@alnikola
Copy link
Contributor Author

I can add a protocol version check here, so the exception will be suppressed for H/3, but enabled for H/2.

@ManickaP
Copy link
Member

We should keep either the original issue open or create a new one for H/3 and leave [ActiveIssue(...)] in the code.

I can add a protocol version check here, so the exception will be suppressed for H/3, but enabled for H/2.

Perfect!

@ManickaP
Copy link
Member

We will likely need to keep the test disabled -- but hopefully only for H/3 and not for H/2.

Note that nothing was disabled per se, we just ignored certain type of errors because we knew that they're cause by a Kestrel bug.

{
throw new Exception("IGNORE");
}

Copy link
Member

Choose a reason for hiding this comment

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

Nit: whitespaces:

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's done already :)

@antonfirsov
Copy link
Member

#58110 (comment) vs ae8564d: telepathy alert!

@alnikola
Copy link
Contributor Author

/azp run runtime-libraries stress-http

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@antonfirsov
Copy link
Member

@alnikola we should backport this to release/6.0. (See #58272)

@@ -209,6 +209,11 @@ async Task RunWorker(int taskNum)
{
_aggregator.RecordCancellation(opIndex, stopwatch.Elapsed);
}
catch (Exception e) when (e.Message == "IGNORE")
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need version check here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe - no, because this is a special exception thrown manually to suppress some errors. The throwing side does a version check, so it's redundant here.

@Tratcher
Copy link
Member

What is the actual server error for HTTP/3? Let's find that before you open a new issue.

@alnikola
Copy link
Contributor Author

I'm going to merge it with the link in the comments to the current issue #55261 which we can change it later.
Any objections?

@ManickaP
Copy link
Member

@Tratcher It's POST ExpectContinue operation and the error is this:

2021-08-31 17:19:56.766 +02:00 [ERR] Connection id "0HMBCIB56DQAE", Request id "0HMBCIB56DQAE:00000018": An unhandled exception was thrown by the application.
System.NotImplementedException: The method or operation is not implemented.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3OutputProducer.Write100ContinueAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProduceContinueAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.TryProduceContinueAsync()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.StartTimingReadAsync(ValueTask`1 readAwaitable, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3MessageBody.ReadAsync(CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.IO.Pipelines.PipeReader.CopyToAsyncCore[TStream](TStream destination, Func`4 writeAsync, CancellationToken cancellationToken)
   at HttpStress.StressServer.<>c.<<MapRoutes>b__6_6>d.MoveNext() in /home/manicka/repositories/runtime/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs:line 249
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

@ManickaP
Copy link
Member

ManickaP commented Aug 31, 2021

@alnikola @antonfirsov maybe we can just -xops 10 on the client side for H/3 instead of having hacks in the code... What do you think?

EDIT: I might do that in a separate PR if you want to get this in.

@Tratcher
Copy link
Member

Tratcher commented Aug 31, 2021

LOL, that's embarrassing... I filed dotnet/aspnetcore#35974 to implement 100-Continue. You'll need to skip that scenario until it's ready.

@ManickaP
Copy link
Member

I put up a PR #58442

I removes the checks completely, making this one obsolete.

@ManickaP
Copy link
Member

Original issue closed in #58442. We don't need the HTTP version check anymore.

@ManickaP ManickaP closed this Aug 31, 2021
@karelz karelz added this to the 7.0.0 milestone Aug 31, 2021
@jkotas jkotas deleted the alnikola/55261-enable-h2-stress-post branch September 18, 2021 04:11
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
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.

6 participants