Skip to content

H2 outbound RST_STREAM flood does not deliver GOAWAY before E2E deadline #1861

Closed

Description

@FlorentinDUBOIS

Summary

test_h2_outbound_flood_from_rst_stream fails in the release/minimal crypto-ring E2E configuration. Sōzu detects the 2,001st glitch and logs the GOAWAY(ENHANCE_YOUR_CALM) decision, but the client receives only RST_STREAM frames before the existing read deadline and observes no GOAWAY frame.

The root cause is inconclusive. The internal GOAWAY log is emitted before serialization, so it is not proof of wire delivery.

Impact

This makes the first production-like release/minimal feature cell fail. More importantly, the test's expected flood-protection outcome is not observed on the wire: the connection remains bounded and Sōzu remains alive, but the peer does not receive the expected GOAWAY within the test's existing deadline.

Source and configuration

  • Source SHA: c6240b69e967325fe4342919cffc8ffa64721994
  • Rust: 1.93.1
  • Profile: --release
  • Cargo flags: --locked -j4 --no-default-features --features crypto-ring
  • The failing run was made before any diagnostic instrumentation. The only checkout changes were feature forwarding in e2e/Cargo.toml and new feature-matrix Python scripts; e2e/src/tests/h2_tests.rs, e2e/src/tests/h2_utils.rs, and lib/src/protocol/mux/h2.rs matched the source SHA.

Relevant source:

Reproduction

Full release/minimal E2E cell:

mise exec [email protected] -- cargo test -p sozu-e2e --release --locked -j4 --no-default-features --features crypto-ring -- --skip tests::fuzz_tests::

Result:

exit 101
635 passed; 2 failed; 4 filtered out
finished in 437.77s (13m55.85s wall time, max RSS 6,814,708 KiB)

Focused reproduction:

mise exec [email protected] -- cargo test -p sozu-e2e --release --locked -j4 --no-default-features --features crypto-ring tests::h2_tests::test_h2_outbound_flood_from_rst_stream -- --exact --nocapture --test-threads=1

Result:

exit 101
0 passed; 1 failed; 640 filtered out
H2 flood detected: glitch count 2001 exceeds threshold 2000
GOAWAY: EnhanceYourCalm
received 1270 frames: 1270 RST_STREAMs, 0 GOAWAYs
RST_STREAM bounded (<2200): true
got GOAWAY: false
sozu still alive: true

The full run independently observed 645 RST_STREAMs, 0 GOAWAYs. The failure therefore reproduced in 2/2 observed attempts (one full cell and one focused run), with different RST counts but the same missing GOAWAY outcome.

Evidence hashes:

  • Full-run log: fa42ee2bcd3364108f65fb6a989c2c65c071e61f2e686761a719104966119d35
  • Full-run timing record: 3f53225bc0cfffd7376c4c6369c2b9a9a7f6a277c7404c23b8ae89d4afb5a075
  • Focused-run log: 6ea2784c191bd1e60910b2e7815d15cbec41c9e221baf6816296d3c5c3388d02
  • Focused-run timing record: 2bc1dd386d39d712fc0971ba2c319c743e73dcf9e1bac7e51fee3fa039dbccdb

Expected result

The client should observe a bounded number of RST_STREAM frames, at least one GOAWAY(ENHANCE_YOUR_CALM) after the glitch threshold is crossed, and Sōzu should remain alive.

Actual result

The RST count is bounded and Sōzu remains alive, but no GOAWAY frame reaches the client before the existing two-second bounded read completes. This makes got_goaway false and the test returns State::Fail.

Diagnostic boundary

A separate temporary-instrumentation run narrowed the boundary without changing the assertion:

before GOAWAY: output=0, pending_rst=0, streams=100
GOAWAY queued: output=17, pending_rst=0
flush: pending_before=17, written=17, status=Continue, tls_wants=false
client: 365 RST_STREAMs, 0 GOAWAYs

This run rules out failure to serialize the GOAWAY or hand its 17 bytes to the tested TLS/socket write path. It does not establish why the client drains only a variable RST prefix before the existing deadline. The remaining boundary is the ordered wire backlog/read progression; whether the product makes insufficient progress or the oracle's bounded observation is mismatched remains inconclusive.

Diagnostic-only evidence (not a proposed fix):

  • Instrumentation patch: f0f270e9bd94c5bdd8a633b89f35dfe2b92a94db11f275bdc171c849c422a473
  • Instrumented-run log: c0faae47f3defcd8b08081d515ec3ee7fbb229563828f186878381a88b0c5dc6

The existing reader already retries until its deadline. Merely increasing the timeout, skipping the assertion, or calling the result flaky would not identify the cause. Investigation and correction are intentionally deferred.

Related work checked for duplication

Activity

  1. added a commit that references this issue on Oct 6, 2026
    2d3d720
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