Skip to content

[Flakiness] Dynamic HPACK newline test races HTTP/2 connection processing #37

Open

Description

@mmitche

Failure

OnDynamicIndexedHeader_NewlineCharactersInValue_ThrowsConnectionError("\n") expected an HTTP/2 connection error but instead hit a NullReferenceException. The failed Helix attempt delayed the PR until retry succeeded.

Possible cause

The test flushes an incomplete HEADERS block and then directly calls OnDynamicIndexedHeader while the connection loop can still be decoding that block. Those two paths can race over header state: the decoder can report a pseudo-header ordering error, close the connection, and clear _currentHeadersStream before the direct callback dereferences it. The validation test was introduced by upstream dotnet#68743; the evidence points to test synchronization, not incorrect production newline validation.

Affected builds and PRs

PR PR target branch Build(s) Notes
dotnet/aspnetcore#70440 main Build 1673313 (Helix attempt 1 failed; attempt 2 succeeded) Helix batch_1, net12.0; expected Http2ConnectionErrorException, actual NullReferenceException, preceded by pseudo-header after regular header.

Decision

No prototype after this single automatically recovered occurrence. The simplest robust correction would synchronize the test after the incomplete header block is consumed, but the current harness exposes no narrow completion signal; adding a production test hook is disproportionate, while a delay or weaker assertion would only mask the race. Reconsider after recurrence or when an existing synchronization point can be reused.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions