Quarantine Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http3StreamTests.RequestTrailers_ContainsNewlines
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
## Failing Test(s)
`Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http3StreamTests.RequestTrailers_ContainsNewlines`
## Failure Frequency
Failed 2 times over the past 30 days.
## Error Message
```text
System.InvalidOperationException: Expected error code MessageError, got -1.
at Microsoft.AspNetCore.InternalTesting.Http3StreamBase.WaitForStreamErrorAsync(Http3ErrorCode protocolError, Action`1 matchExpectedErrorMessage, String expectedErrorMessage) in /_/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs:line 667
at Microsoft.AspNetCore.InternalTesting.Http3StreamBase.WaitForStreamErrorAsync(Http3ErrorCode protocolError, Action`1 matchExpectedErrorMessage, String expectedErrorMessage) in /_/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs:line 652
at Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http3StreamTests.RequestTrailers_ContainsNewlines(String newlineChars) in /_/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs:line 2105
```
## Stacktrace
Stack trace
```text
Microsoft.AspNetCore.Connections.ConnectionAbortedException: HTTP/3 stream error (MessageError): Malformed request: invalid headers.
---> Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3StreamErrorException: HTTP/3 stream error (MessageError): Malformed request: invalid headers.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3Stream.OnHeaderCore(HeaderType headerType, Nullable`1 staticTableIndex, ReadOnlySpan`1 name, ReadOnlySpan`1 value) in /_/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs:line 424
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3Stream.OnHeader(ReadOnlySpan`1 name, ReadOnlySpan`1 value) in /_/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs:line 289
at System.Net.Http.QPack.QPackDecoder.ProcessHeaderValue(ReadOnlySpan`1 data, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 607
at System.Net.Http.QPack.QPackDecoder.ParseHeaderValue(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 384
at System.Net.Http.QPack.QPackDecoder.ParseHeaderValueLength(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 359
at System.Net.Http.QPack.QPackDecoder.ParseHeaderName(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 300
at System.Net.Http.QPack.QPackDecoder.ParseHeaderNameLength(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 280
at System.Net.Http.QPack.QPackDecoder.ParseCompressedHeaders(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 492
at System.Net.Http.QPack.QPackDecoder.ParseBase(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 542
at System.Net.Http.QPack.QPackDecoder.ParseRequiredInsertCount(ReadOnlySpan`1 data, Int32& currentIndex, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 570
at System.Net.Http.QPack.QPackDecoder.DecodeInternal(ReadOnlySpan`1 data, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 190
at System.Net.Http.QPack.QPackDecoder.Decode(ReadOnlySequence`1& data, Boolean endHeaders, IHttpStreamHeadersHandler handler) in /_/src/Shared/runtime/Http3/QPack/QPackDecoder.cs:line 170
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3Stream.ProcessHeadersFrameAsync[TContext](IHttpApplication`1 application, Http3RawFrame incomingFrame, Boolean isContinuedFrame, ReadOnlySequence`1 payload, Boolean isCompleted) in /_/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs:line 883
at System.Runtime.CompilerServices.AsyncHelpers.TransparentAwait(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3Stream.ProcessHttp3Stream[TContext](IHttpApplication`1 application, Http3RawFrame incomingFrame, Boolean isContinuedFrame, ReadOnlySequence`1& payload, Boolean isCompleted) in /_/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs:line 853
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3Stream.ProcessRequestAsync[TContext](IHttpApplication`1 application) in /_/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Stream.cs:line 657
--- End of inner exception stack trace ---
```
## Logs
Console log (test `InMemory.FunctionalTests_Http3StreamTests_RequestTrailers_ContainsNewlines-_.log`)
```text
[0.015s] [TestLifetime] [Information] Starting test RequestTrailers_ContainsNewlines-_ at 2026-09-10T22:01:38
[0.072s] [Microsoft.AspNetCore.InternalTesting.Http3InMemory] [Information] Initializing stream 3
[0.074s] [Microsoft.AspNetCore.InternalTesting.Http3InMemory] [Information] Initializing stream 2
[0.093s] [Microsoft.AspNetCore.InternalTesting.Http3InMemory] [Information] Initializing stream 0
[0.094s] [Microsoft.AspNetCore.Server.Kestrel.Http3] [Verbose] Connection id "TEST" received HEADERS frame for stream ID 0 with length 37.
[0.094s] [Microsoft.AspNetCore.Server.Kestrel.Http3] [Verbose] Connection id "TEST" received HEADERS frame for stream ID 0 with length 23.
[0.095s] [Microsoft.AspNetCore.Server.Kestrel.Http3] [Verbose] Connection id "TEST" sending HEADERS frame for stream ID 0 with length 35.
[0.095s] [Microsoft.AspNetCore.Server.Kestrel] [Debug] Connection id "TEST", Request id "TEST:0": started reading request body.
[0.095s] [Microsoft.AspNetCore.Server.Kestrel] [Debug] Connection id "TEST", Request id "TEST:0": done reading request body.
[0.095s] [Microsoft.AspNetCore.Server.Kestrel] [Information] Connection id "TEST", Request id "TEST:0": the application completed without reading the entire request body.
[0.112s] [Microsoft.AspNetCore.Server.Kestrel.Http3] [Debug] Trace id "TEST:0": HTTP/3 stream error "MessageError". An abort is being sent to the stream.
Microsoft.AspNetCore.Connections.ConnectionAbortedException: HTTP/3 stream error (MessageError): Malformed request: invalid headers.
---> Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3.Http3StreamErrorException: HTTP/3 stream error (MessageError): Malformed request: invalid headers.
(see stacktrace above)
[0.125s] [Microsoft.AspNetCore.InternalTesting.Http3InMemory] [Debug] Disposing stream 0
[0.125s] [Microsoft.AspNetCore.InternalTesting.Http3InMemory] [Debug] Can't reuse stream 0. Aborted: True, Reader completed successfully: True, Writer completed successfully: True.
[0.122s] [Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http3StreamTests] [Error] Test threw an exception.
System.InvalidOperationException: Expected error code MessageError, got -1.
at Microsoft.AspNetCore.InternalTesting.Http3StreamBase.WaitForStreamErrorAsync(Http3ErrorCode protocolError, Action`1 matchExpectedErrorMessage, String expectedErrorMessage) in /_/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs:line 667
at Microsoft.AspNetCore.InternalTesting.Http3StreamBase.WaitForStreamErrorAsync(Http3ErrorCode protocolError, Action`1 matchExpectedErrorMessage, String expectedErrorMessage) in /_/src/Servers/Kestrel/shared/test/Http3/Http3InMemory.cs:line 652
at Microsoft.AspNetCore.Server.Kestrel.Core.Tests.Http3StreamTests.RequestTrailers_ContainsNewlines(String newlineChars) in /_/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs:line 2105
at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass47_0.<b__1>d.MoveNext() in /_/src/xunit.execution/Sdk/Frameworks/Runners/TestInvoker.cs:line 259
--- End of stack trace from previous location ---
at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in /_/src/xunit.execution/Sdk/Frameworks/ExecutionTimer.cs:line 48
at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in /_/src/xunit.core/Sdk/ExceptionAggregator.cs:line 90
[0.146s] [TestLifetime] [Information] Finished test RequestTrailers_ContainsNewlines-_ in 0.1108615s
```
## Build
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1591657
> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `github.com`
>
> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "github.com"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>
> Generated by [Daily Test Quarantine Management](https://github.com/dotnet/aspnetcore/actions/runs/34588199267) · copilot · auto · 353.3 AIC · ⌖ 9.78 AIC · ⊞ 2.8K · [◷](https://github.com/search?q=repo%3Adotnet%2Faspnetcore+is%3Aissue+%22gh-aw-workflow-call-id%3A+dotnet%2Faspnetcore%2Ftest-quarantine%22&type=issues)
Contributor guide
Research direction
Start with RequestTrailers_ContainsNewlines in test/InMemory.FunctionalTests/Http3/Http3StreamTests.cs at line 2105, then read the failure helper in shared/test/Http3/Http3InMemory.cs around line 667. Run the named test to reproduce the mismatch between MessageError and -1; done means the recurring failure is handled according to the repository's test-quarantine convention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100