Skip to content

e2e: h2 SNI strict-off test sees a 421 under CI load (got_421 with everything else correct) #1353

Closed

Description

@FlorentinDUBOIS

Summary

tests::h2_security_sni::e2e_h2_sni_authority_mismatch_allowed_when_strict_binding_disabled failed
the nightly cell on an unrelated PR, on both of its retry iterations, then passed on a re-run of
the same commit. It is load-dependent rather than deterministic, but the failure is a real
behavioural observation and not a timeout or an infrastructure wobble.

The observation

The test's own diagnostic, verbatim from the failing run:

strict-off FAIL: infra_ok=true got_ok=true got_421=true metric_stable=true foo_reqs=0 bar_reqs=1

The acceptance condition (e2e/src/tests/h2_security_sni.rs:553-559) is

infra_ok && got_ok && !got_421 && metric_stable
    && foo_agg.requests_received == 0
    && bar_agg.requests_received == 1

Every conjunct holds except !got_421. The counts are exactly as expected, the infrastructure
teardown succeeded, and the http.sni_authority_mismatch counter did not move.

So: with strict SNI binding disabled, a request whose :authority (bar.example.com) mismatches
the connection SNI (foo.example.com) was expected to be served — and the response frames contained a
421 as well as an OK, while the backend did receive the request (bar_reqs=1).

That combination is the interesting part: the request was proxied and a 421 appeared.

What is known

  • Failed both iterations under repeat_until_error_or(3, ..) in a 1396-second e2e run alongside 400+
    other tests; 418 passed; 1 failed.
  • Passed on a re-run of the same commit (attempt 2, conclusion=success).
  • Measured locally, serial and unloaded: 0 failures in 8 runs on the PR branch and 0 in 8 on
    base. The branch it failed on touches only lib/src/protocol/proxy_protocol/relay.rs and a test
    module in lib/src/tcp.rs — no H2, TLS or SNI code.

What is not known

Why it failed twice consecutively under CI load and not once in sixteen local runs. Local runs are
serial and unloaded; CI is neither. The absence of a local reproduction is not evidence that the test
is at fault rather than the code it exercises — that distinction is unresolved.

The likeliest shapes, not ranked by evidence:

  • a race between the 421 decision and the proxied response on the same connection, exposed only when
    the worker is contended;
  • frame collection (collect_response_frames(&mut tls, 500, 4, 500)) picking up frames from a stream
    the assertion does not intend, under timing that only occurs under load.

Why it is worth filing rather than retrying away

got_ok and got_421 were both true. If a 421 can be emitted on a connection whose authority
mismatch is configured to be allowed, that is either a real edge in the SNI-binding path or an
assertion that does not describe what it means to check. Either is worth knowing, and a retry hides
both.

Note on the known-flake set

doc/testing.md and e2e/COVERAGE.md do not name this test. Two others are known
(test_tcp_sni_large_payload_after_route, test_upgrade_multiple_in_flight), and a third,
tests::tests::test_issue_810_timeout, was observed failing under parallel load during the same
session. If a known-flake list is maintained anywhere, these belong on it — though a list is a poor
substitute for the diagnosis.

Provenance

Observed on PR #1348's nightly cell, attempt 1, run 35403273897. Base-vs-change measurement and the
local runs were performed before concluding the PR was not the cause; the PR was merged only after the
re-run passed.

Activity

  1. FlorentinDUBOIS commented on Sep 19, 2026

    @FlorentinDUBOIS
    CollaboratorAuthor

    Second sighting, different test, and it is worse than "flaky".

    tests::tests::test_issue_810_timeout failed the crypto-openssl cell on PR #1355, a
    tests-and-docs-only branch that touches no production file and does not touch
    e2e/src/tests/tests.rs at all.

    Test not successful after: 13 iterations
    thread 'tests::tests::test_issue_810_timeout' panicked at e2e/src/tests/tests.rs:2696:5:
    assertion `left == right` failed
      left: Fail
     right: Success
    test result: FAILED. 428 passed; 1 failed; finished in 1413.19s
    

    Thirteen consecutive iterations, all failing. That is not intermittent — under that load condition
    it is deterministic. Compare the SNI case above, which failed twice and then passed on a plain re-run
    of the same commit.

    This was predicted before it happened: during full-suite parallel runs earlier in the same
    session, this test was observed failing under load and named as a third pre-existing flake absent from
    any known-flake list. It then failed in CI on an unrelated branch. A pre-registered prediction is
    better evidence than a post-hoc explanation, and it points at a load-dependent condition in the test
    or in what it exercises, not at the PR it happened to surface on.

    Worth separating the two cases in whatever triage this gets:

    • the h2 SNI one (this issue's original report) failed 2 iterations and passed on re-run — genuinely
      intermittent, and its diagnostic showed a real behavioural oddity (got_421 true when strict
      binding is disabled);
    • this one failed 13 of 13 — whatever the condition is, once entered it does not clear within the
      retry budget.

    Both surfaced only under the full parallel e2e suite (400+ tests, ~1400s runs). Neither reproduces
    serially: the SNI test measured 0 failures in 8 runs on branch and 8 on base, locally and unloaded.

    No claim here about the cause of either. The useful fact is that the e2e suite has at least three
    load-dependent failures (test_tcp_sni_large_payload_after_route, test_upgrade_multiple_in_flight,
    and now test_issue_810_timeout), and only the first two are written down anywhere.

  2. added 2 commits that reference this issue on Sep 20, 2026
    92c759e
    bbd46fb
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