Skip to content

ext_proc_integration_test: flake with cancelled span and waitForNewStream timeout on Google gRPC #44618

Closed as not planned

Description

@phlax

Link to failure

https://github.com/envoyproxy/envoy/actions/runs/24848154814/job/72741113914#step:19:33704

https://mordenite.cluster.engflow.com/actions/executions/ChCOQF4mCt9WpocGZWE9IZF2EgdkZWZhdWx0GiUKIHnCnbKPr_i1tHUL27euIYhLugemxjFrGDPMtS5ORgXfEJYD

Flaky target

//test/extensions/filters/http/ext_proc:ext_proc_integration_test

Flaky test

IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.GetAndFailStreamWithTracing/1

Symptom

IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.GetAndFailStreamWithTracing/1 (Google gRPC variant) and similar tracing tests intermittently fail. The primary failure is a timeout in waitForNewStream inside the test helper waitForFirstMessage; the other assertion failures in the log are cascades caused by the helper not aborting the enclosing test.

Characteristic signature:

  • Span emitted with tags status: canceled and upstream_address: 127.0.0.1:<port> set, but missing grpc.status_code and error tags — i.e. a stream object existed long enough to get an upstream address assigned, then was torn down before any gRPC status arrived.
  • test/extensions/filters/http/ext_proc/ext_proc_integration_common.cc:383: Failure — Timed out waiting for new stream.
  • Followed by a UBSan member call on null pointer of type 'Envoy::FakeStream' at ext_proc_integration_test.cc:190 and two tracer span assertion failures for the missing tags (all cascades from processor_stream_ being null).

Logs

test/extensions/filters/http/ext_proc/tracer_test_filter.cc:55: Failure
Expected equality of these values:
  want
    Which is: "true"
  got
    Which is: ""
error: true not found in tags:
component: proxy
status: canceled
upstream_address: 127.0.0.1:39905
upstream_cluster: ext_proc_server_0

test/extensions/filters/http/ext_proc/ext_proc_integration_common.cc:383: Failure
Value of: processor_connection_->waitForNewStream(*dispatcher_, processor_stream_)
  Actual: false (Timed out waiting for new stream.)
Expected: true

test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc:190:3: runtime error:
  member call on null pointer of type 'Envoy::FakeStream'

Additional context

  • Root cause undiagnosed. Two plausible hypotheses not yet distinguishable from the available log:
    • A: Envoy cancels the ext_proc side stream locally before HEADERS complete.
    • B: The test-thread dispatcher is briefly starved, so the fake upstream's waitForNewStream expires even though the stream was established. (Google gRPC uses a separate completion-queue thread which decouples client-side stream setup from the test dispatcher in a way Envoy gRPC does not — this would explain the /1-only signature.)
  • Only the /1 (Google gRPC) parameterisation has been observed to flake; /0 (Envoy gRPC) consistently passes.
  • Not reproducible locally even at --runs_per_test=500 --jobs=300 under asan/fastbuild, but hits main and release CI at a non-trivial rate.
  • Prior related flake reports: MSAN issue in traceer_test_filter #35630, Test flake: //test/extensions/filters/http/ext_proc:ext_proc_integration_test #36041, ext_proc: Increase log verbosity in a possible flake test #36583.
  • Diagnostic-only PR in progress to (a) stop the helper cascade via ASSERT_NE(processor_stream_, nullptr) at callsites and (b) dump connection state and ext_proc cluster counters on waitForNewStream timeout, so the next occurrence picks definitively between hypotheses A and B.

Activity

  1. phlax commented on Apr 23, 2026

    @phlax
    MemberAuthor

    cc @yanjunxiang-google @tyxia

    wasnt able to repro

  2. yanjunxiang-google commented on Apr 28, 2026

    @yanjunxiang-google
    Contributor

    We can disable this test GetAndFailStreamWithTracing

  3. phlax commented on Apr 30, 2026

    @phlax
    MemberAuthor

    possibly related fail on IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.GetAndFailStreamOnResponse

    https://github.com/envoyproxy/envoy/actions/runs/25174190912/job/73801682124#step:19:703

    still not able to repro

    fwiw the exit code 139 which i think is a memory violation

  4. yanjunxiang-google commented on Apr 30, 2026

    @yanjunxiang-google
    Contributor

    hi, @phlax

    Above test failure: https://github.com/envoyproxy/envoy/actions/runs/25174190912/job/73801682124#step:19:703, is from a test: TEST_P(ExtProcIntegrationTest, OnlyRequestHeadersGracefulClose). In this test, an experimental runtime flag: envoy.reloadable_features.ext_proc_graceful_grpc_close is enabled:

    scoped_runtime_.mergeValues({{"envoy.reloadable_features.ext_proc_graceful_grpc_close", "true"}});
    . We know this runtime flag are causing known issues. So, my suggestion is to disable this test. In fact, any integration tests which has this flag enabled and if it is flaky, we can disable them for now.

  5. phlax commented on Apr 30, 2026

    @phlax
    MemberAuthor

    would you be up for raising a pr to address that?

  6. yanjunxiang-google commented on Apr 30, 2026

    @yanjunxiang-google
    Contributor

    CCing @yanavlasov as he might be fixing the issues soon.

  7. github-actions commented on May 30, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  8. added
    stale
    on May 30, 2026
  9. yanjunxiang-google commented on Jun 1, 2026

    @yanjunxiang-google
    Contributor

    /wait

  10. removed
    stale
    on Jun 1, 2026
  11. github-actions commented on Jul 1, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  12. added
    stale
    on Jul 1, 2026
  13. github-actions commented on Jul 9, 2026

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

  14. lboynton commented on Aug 28, 2026

    @lboynton
    Contributor

    . We know this runtime flag are causing known issues. So, my suggestion is to disable this test. In fact, any integration tests which has this flag enabled and if it is flaky, we can disable them for now.

    Can you elaborate on those issues at all? Is it safe to use ext_proc_graceful_grpc_close: true?

  15. yanjunxiang-google commented on Aug 28, 2026

    @yanjunxiang-google
    Contributor

    No, not yet

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

    area/ext_procarea/test flakesbazelstalewaiting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions