Skip to content

ext_proc: report client creation failure so failure_mode_allow is honored - #45189

Merged
KBaichoo merged 3 commits into
envoyproxy:mainfrom
omkhar:fix/ext_proc-client-creation-fail-open
Jun 9, 2026
Merged

KBaichoo merged 3 commits into
envoyproxy:mainfrom
omkhar:fix/ext_proc-client-creation-fail-open

Conversation

@omkhar

@omkhar omkhar commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Commit Message:
ext_proc: report client creation failure so failure_mode_allow is honored

ProcessorClientImpl::start() previously returned nullptr without invoking onGrpcError or onGrpcClose when getOrCreateRawAsyncClientWithHashKey() returned an error (cluster lookup failure, raw async-client construction failure, etc.). The downstream Filter::openStream() in ext_proc.cc treats a nullptr return with no prior callback as IgnoreError and short-circuits the request through, ignoring failure_mode_allow.

Behavior before: failure_mode_allow=false deployments silently fail open on client-creation errors — the operator-configured rejection never runs.

Behavior after: with the default runtime guard on, ProcessorClientImpl::start() invokes callbacks.onGrpcError(Grpc::Status::WellKnownGrpcStatus::Internal, ...) before returning nullptr. The downstream Filter::onGrpcError then runs the configured failure_mode_allow semantic (reject with 500 if false, continue if true).

Additional Description:
Reported privately via GHSA-jp7j-jw2q-9494. @yanjunxiang-google closed the advisory and redirected to a public bug fix since the issue is not externally exploitable (only fires on operator-side configuration errors).

Disclosure (per CONTRIBUTING.md generative-AI policy): this patch was authored with the assistance of a generative-AI coding agent. I have reviewed the patch line-by-line, ran the relevant unit tests locally, and accept responsibility for correctness.

Risk Level:
Low. Single-line behavioral change on the client-creation error path only, gated behind a reloadable_features runtime guard so operators that depended on the legacy silent-ignore behavior can revert by flipping the guard to false.

Testing:
Extended test/extensions/filters/http/ext_proc/client_test.cc with both runtime-guard states:

  • ClientStartError (updated): asserts the existing nullptr-return AND that grpc_status_ is set to Internal with the upstream error message propagated. Covers the default-on path.
  • ClientStartErrorGuardDisabled (new): uses TestScopedRuntime to flip the guard to false and asserts the legacy behavior is preserved (nullptr return, grpc_status_ stays Ok).

Build / run:

bazel test --config=clang //test/extensions/filters/http/ext_proc:client_test

Docs Changes:
None. The runtime guard is operator-only; the user-facing semantic (failure_mode_allow) is unchanged from its documented contract — this PR restores the documented behavior.

Release Notes:
Added at changelogs/current/bug_fixes/ext_proc__report-grpc-error-on-client-creation-failure.rst per the file-per-entry layout (#45093).

Platform Specific Features:
N/A.

[Optional Runtime guard:]
envoy.reloadable_features.ext_proc_report_client_creation_error (default true). Operators relying on the prior silent-ignore behavior can revert by flipping the guard to false. Per CONTRIBUTING.md§Runtime guarding, this is a user-visible non-config-guarded change to protocol processing, so a guard is warranted; default-on because the prior behavior contradicted the documented failure_mode_allow contract.

[Optional Fixes #Issue]
Fixes #45188.

[Optional Fixes commit #PR or SHA]
N/A — latent bug in ProcessorClientImpl::start(); not traceable to a specific regression commit. See #45188 for the regression chronology pointing to #39388.

[Optional Deprecated:]
None.

[Optional API Considerations:]
N/A — no api/ tree changes.

@omkhar
omkhar had a problem deploying to external-contributors May 20, 2026 16:37 — with GitHub Actions Error
@tyxia

tyxia commented May 20, 2026

Copy link
Copy Markdown
Member

/assign @yanjunxiang-google

…ored

Fixes GHSA-jp7j-jw2q-9494 (closed by @yanjunxiang-google with redirect
to public-track per https://github.com/envoyproxy/envoy/security/advisories/GHSA-jp7j-jw2q-9494).

When ProcessorClientImpl::start() fails to create the underlying gRPC
client via getOrCreateRawAsyncClientWithHashKey, it returns nullptr
without invoking onGrpcError or onGrpcClose. The consuming
Filter::openStream() interprets nullptr-with-no-prior-callback as
IgnoreError and short-circuits the request through, regardless of the
operator's failure_mode_allow setting. Effectively, every client-creation
failure silently fails open.

Add the onGrpcError(Internal, ...) call on the failure branch so the
consuming filter applies its configured failure_mode_allow semantic.
Gate behind envoy.reloadable_features.ext_proc_report_client_creation_error
(default true) per CONTRIBUTING.md guidance for user-visible
protocol-processing changes — operators that depended on the legacy
silent-ignore can revert by flipping the guard to false.

Extends test/extensions/filters/http/ext_proc/client_test.cc with both
guard states. clang-format clean.

Signed-off-by: Omkhar Arasaratnam <[email protected]>
@omkhar
omkhar force-pushed the fix/ext_proc-client-creation-fail-open branch from 4d89dca to 15ccdaa Compare May 22, 2026 00:09
@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #45189 was synchronize by omkhar.

see: more, trace.

@omkhar omkhar changed the title ext_proc: fix silent fail-open when raw async gRPC client creation fails ext_proc: report client creation failure so failure_mode_allow is honored May 22, 2026
multiplexed_integration_test shard 9 failed on
Http2FrameIntegrationTest.AdjustUpstreamSettingsMaxStreams/IPv4_Oghttp2
with a timing race (timed out waiting for
cluster.cluster_0.upstream_cx_total to be 2; observed 3). The test is
HTTP/2 connection-settings — no code path in this PR touches it. 1 of
1716 tests failed; the rest passed. Re-triggering CI to clear the flake.

Signed-off-by: Omkhar Arasaratnam <[email protected]>
@omkhar

omkhar commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

CI on 15ccdaa1 had one unrelated flake: Http2FrameIntegrationTest.AdjustUpstreamSettingsMaxStreams/IPv4_Oghttp2 in multiplexed_integration_test shard 9 timed out (upstream_cx_total race: expected 2, observed 3). 1713/1716 tests passed; the failing test exercises HTTP/2 connection-settings tuning and doesn't touch any code path in this PR. Pushed empty commit 81e83859 to retrigger.

@omkhar

omkhar commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Retrigger on 81e83859 hit 3 unrelated CI failures, all in different jobs than the first attempt:

  • Envoy/Checks > tsan: ExtProcIntegrationTest.RemoveRequestContentLengthInBufferedMode timed out (ext_proc_integration_common.cc:333: Timed out waiting for end of stream after 33.9s in TSAN). Happy-path buffered-mode test that doesn't exercise the client-creation failure branch this PR touches.
  • Envoy/Checks > tsan: Http2FloodMitigationTest.RstStreamOverflowOnPendingFlushTimeout timing race (outbound_frames_active expected 998, observed 2).
  • Envoy/Checks > msan: ads_integration_test aborted.

The cause appears to be upstream-main CI instability, not this PR. Envoy/Checks on the base commit 10840c26 itself has been alternating success/failure today:

  • 2026-05-21 20:10Z @ 10840c26: success
  • 2026-05-21 20:29Z @ 10840c26: failure
  • 2026-05-21 21:21Z @ 10840c26: success
  • 2026-05-21 22:17Z @ 10840c26: failure
  • 2026-05-22 00:51Z @ 6d26e34: failure

And earlier on this PR head 15ccdaa1, Envoy/Prechecks > Release(x64) failed on Http2FrameIntegrationTest.AdjustUpstreamSettingsMaxStreams (another HTTP/2 timing race) — also unrelated. 1713/1716 tests passed on that attempt; ext_proc:client_test (the test this PR extends) passed in both attempts.

Holding off on another empty-commit retrigger to avoid noise. Happy to push one if a maintainer would prefer that over a /retest; otherwise leaving this for a quieter CI window.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For this test, you might want to explicitly set the runtime guard to false, so nothing changes.

EXPECT_THAT(grpc_error_message_, testing::HasSubstr("creation-error"));
}

TEST_F(ExtProcStreamTest, ClientStartErrorGuardDisabled) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can name the test as ClientStartErrorGuardEnabled, then test the new behavior.

BTW, I think you can refactor these two tests to make it share a common test method as the test code are largely same.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor

Thanks for working on this! LGTM in general and left some comments regarding test

Per @yanjunxiang-google's inline review on envoyproxy#45189:

  1. ClientStartError now pins the runtime guard to false so the test
     keeps its pre-fix semantic ("start() returns nullptr; no
     onGrpcError fires"). Preserves what the test was originally
     written to assert.

  2. ClientStartErrorGuardDisabled is renamed to
     ClientStartErrorGuardEnabled so the test name aligns with the
     code path it exercises (the guard is on by default; this test
     asserts the new onGrpcError behavior).

  3. Shared setup extracted to startAndExpectClientCreationFailure()
     on the fixture so the two test bodies are just guard-config +
     assertions on grpc_status_.

Signed-off-by: Omkhar Arasaratnam <[email protected]>
@omkhar

omkhar commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @yanjunxiang-google — addressed both review comments in 72028561:

  1. ClientStartError now explicitly pins envoy.reloadable_features.ext_proc_report_client_creation_error to false, preserving its pre-fix semantic (start() returns nullptr without invoking onGrpcError).
  2. Renamed ClientStartErrorGuardDisabled → ClientStartErrorGuardEnabled so the name aligns with the path it covers (the guard is on by default; this test asserts the new onGrpcError behavior).
  3. Shared setup factored out into startAndExpectClientCreationFailure() on the fixture; the two test bodies are now just guard config + grpc_status_ assertions.

@omkhar

omkhar commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

Third CI run on 72028561 hit two more unrelated failures:

  • Envoy/Checks > msan: 616/617 tests passed; 1 random test failed remotely (specific test name not surfaced in CI log grep).
  • Envoy/Checks > Compile time options: //test/extensions/clusters/aggregate:cluster_integration_test (Aborted).

Pattern across the 3 attempts:

Attempt Failed test(s) Code area
15ccdaa1 multiplexed_integration_test HTTP/2 timing race HTTP/2
81e83859 Http2FloodMitigationTest + ExtProcIntegrationTest.RemoveRequestContentLengthInBufferedMode (TSAN 33s timeout, happy path) + ads_integration_test msan abort HTTP/2 + xDS
72028561 msan 1/617 random fail + cluster_integration_test (aggregate) clusters

Zero overlap; ext_proc:client_test (the test this PR extends) passed all three. Upstream main has been hitting the same sanitizer/integration flakes today (confirmed earlier). Holding off on another empty-commit retrigger.

@yanjunxiang-google — when you have a moment, would you mind kicking /retest? Otherwise happy to wait for upstream CI to stabilize.

@omkhar

omkhar commented May 23, 2026 •

Copy link
Copy Markdown
Contributor Author

/retest

Re-grouping per CONTRIBUTING.md ("Triggering CI re-run without making changes"). Posting /retest first, will follow with the documented Kick CI empty-commit fallback if needed.

Adding flake context that I missed earlier:

  • ext_proc_integration_test: flake with cancelled span and waitForNewStream timeout on Google gRPC #44618 (area/test flakes, area/ext_proc) tracks the exact ext_proc_integration_test flake family this PR's run-2 hit on RemoveRequestContentLengthInBufferedMode (33s TSAN timeout). @yanjunxiang-google previously commented there "We can disable this test GetAndFailStreamWithTracing"; @phlax was unable to repro the original flake. Same shape — TSAN-mode timeout on a happy-path integration test that's unrelated to the client-creation failure branch this PR fixes.

  • Upstream-main Envoy/Checks is currently unstable: in the last 2 days, the same workflow has failed 10 times across 3 distinct upstream-main commits (968337a5 × 4 today, 404174b1 × 2 yesterday, 287f07ac × 2 yesterday). Same SHA, opposite results on adjacent attempts — textbook upstream flake.

  • ext_proc:client_test (the only test this PR actually touches) has passed all three CI attempts — 15ccdaa1, 81e83859, 72028561 — green every run. The runtime guard registration + the test refactor address all of yanjunxiang's review comments.

cc @yanavlasov — you're the requested reviewer here and were CC'd on #44618 by @yanjunxiang-google. Would either of you mind kicking the failed sub-jobs in Envoy/Checks from the Actions UI? If /retest above doesn't fire anything (handler may be Azure-Pipelines-only at this point), I'll push a Kick CI empty commit per CONTRIBUTING.md in about 30 min.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor

LGTM

@yanjunxiang-google

Copy link
Copy Markdown
Contributor

/assign @tyxia

@KBaichoo

KBaichoo commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Merging as @yanjunxiang-google is an extproc owner

@KBaichoo
KBaichoo merged commit 09dced5 into envoyproxy:main Jun 9, 2026
29 checks passed
nezdolik pushed a commit to nezdolik/envoy that referenced this pull request Jun 16, 2026
…ored (envoyproxy#45189)

Commit Message:
ext_proc: report client creation failure so failure_mode_allow is
honored

`ProcessorClientImpl::start()` previously returned `nullptr` without
invoking `onGrpcError` or `onGrpcClose` when
`getOrCreateRawAsyncClientWithHashKey()` returned an error (cluster
lookup failure, raw async-client construction failure, etc.). The
downstream `Filter::openStream()` in `ext_proc.cc` treats a nullptr
return with no prior callback as `IgnoreError` and short-circuits the
request through, ignoring `failure_mode_allow`.

Behavior before: `failure_mode_allow=false` deployments silently fail
open on client-creation errors — the operator-configured rejection never
runs.

Behavior after: with the default runtime guard on,
`ProcessorClientImpl::start()` invokes
`callbacks.onGrpcError(Grpc::Status::WellKnownGrpcStatus::Internal,
...)` before returning nullptr. The downstream `Filter::onGrpcError`
then runs the configured `failure_mode_allow` semantic (reject with 500
if false, continue if true).


Fixes envoyproxy#45188.


Signed-off-by: Omkhar Arasaratnam <[email protected]>
Co-authored-by: Omkhar Arasaratnam <[email protected]>
RyanTheOptimist pushed a commit that referenced this pull request Nov 2, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". #45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
jwendell pushed a commit that referenced this pull request Nov 12, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". #45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 17, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". #45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 18, 2026
Commit Message: http2: deflake RstStreamOverflowOnPendingFlushTimeout

The test set `stream_idle_timeout` to 400ms only to get a 400ms pending
flush timer, since `stream_flush_timeout` defaults to it. The idle timer
also covers the pre-fill stream, so that stream's upstream response had
to start within 400ms of the request. On a slow runner the idle timeout
fired first and left its local reply's two frames queued. The test then
timed out waiting for 998 queued frames with "current value 2".

This sets `stream_flush_timeout` to 400ms instead and leaves the idle
timeout at its default. The flush timeout, RST_STREAM and overflow path
the test is about doesn't change.

Additional Description:
It failed on 9 changes between 10-05 and 10-22 under tsan, always on
oghttp2 with "current value 2". envoyproxy#45189 reported the same symptom back in
May. Delaying the autonomous upstream's response by 500ms reproduces it
on both codecs, so the oghttp2 skew in CI is just that codec being
slower.

AI Disclaimer: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- 500ms delayed-response repro: 12/12 runs failed with the CI message
before, 12/12 pass after (all four codec/IP params)
- `bazel test //test/integration:http2_flood_integration_test
--runs_per_test=5`: pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

---------

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit a42f23c)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ext_proc: ProcessorClientImpl::start() returns nullptr without firing onGrpcError on client-creation failure (silent fail-open)

4 participants