Skip to content

Test flake: //test/extensions/filters/http/ext_proc:ext_proc_integration_test #36041

Closed

Description

@ravenblackx

https://dev.azure.com/cncf/envoy/_build/results?buildId=179508&view=logs&j=4930ecaf-18f4-5b3c-dea3-309729c3b3ae&t=573d8780-d7b9-52e3-b4e0-a89886b0b9ff&l=3840

[ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.GetAndCloseStreamWithTracing/IPv4_GoogleGrpc_WithDeferredProcessing
test/extensions/filters/http/ext_proc/tracer_test_filter.cc:52: Failure
Expected equality of these values:
  want
    Which is: "0"
  got
    Which is: ""
grpc.status_code: 0 not found in tags:
component: proxy
status: canceled
upstream_address: 127.0.0.1:37667
upstream_cluster: ext_proc_server_0

@tyxia

Activity

  1. tyxia commented on Sep 9, 2024

    @tyxia
    Member

    @cainelli Do you mind taking a look at this? Thank you!

    I think tracing related feature was added by your change

  2. cainelli commented on Sep 9, 2024

    @cainelli

    oh sorry about that. I will take a look into it this week.

  3. cainelli commented on Sep 16, 2024

    @cainelli

    @tyxia the failure is a timeout and the tracing failure is a side effect. I don't see how such simple request would take more than 5s to run.

    test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc:281: Failure
    Value of: fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_)
      Actual: false (Timed out waiting for new connection.)
    Expected: true
    
    ....
    
    test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc:277: Failure
    Expected equality of these values:
      std::to_string(status_code)
        Which is: "200"
      response.headers().getStatusValue()
        Which is: "504"
    Stack trace:
      0x1578018: (unknown)
      0x13cb8bc: (unknown)
      0x7fc368411a4d: testing::internal::HandleSehExceptionsInMethodIfSupported<>()
      0x7fc3683f822e: testing::internal::HandleExceptionsInMethodIfSupported<>()
      0x7fc3683dfb1d: testing::Test::Run()
      0x7fc3683e060e: testing::TestInfo::Run()
    ... Google Test internal frames ...
    
  4. cainelli commented on Sep 16, 2024

    @cainelli

    actually, is the timeout 5ms? should we increase it a bit?

    result = fake_upstreams_[upstream_indices[upstream_index]]->waitForHttpConnection(
    *dispatcher_, fake_upstream_connection, std::chrono::milliseconds(5));

    update: nvm is 5s

    void handleUpstreamRequest(bool add_content_length = false) {
    ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_));

  5. alyssawilk commented on Oct 8, 2024

    @alyssawilk
    Contributor

    sorry about the dup but can you please have a look at the test? Flaky tests are problematic for everyone else trying to submit to Envoy!

  6. tyxia commented on Oct 9, 2024

    @tyxia
    Member

    @cainelli Thanks for spending effort reducing the flakiness.

    In the past, we have test (as you linked in slack) that have larger then 5s timeout. However, that is because Please don't waitForHttpConnection with a 5s timeout if failure is expected. In your case, failure is not expected.

    I am not sure if the flakiness is because tracing will take a bit more time but 5s should be sufficient here. Or maybe because ext_proc_integration test has grown very big now. Do you happen to know what is the flakiness rate?

  7. alyssawilk commented on Oct 10, 2024

    @alyssawilk
    Contributor

    if you can't repro the flake (per slack) one thing you can do is add a LogLevelSetter in that test such that CI logs more information when it flakes. then next time we see a failure you'll have more information.

  8. ravenblackx commented on Oct 11, 2024

    @ravenblackx
    ContributorAuthor

    One thing I've found often helps if you can't repro a flake is to run stress -c 16 (or however many CPU cores) in another terminal while the test runs with --runs_per_test=n. (Flags also depending on if the flakiness is from being CPU bound or network bound or disk bound.)

  9. cainelli commented on Oct 14, 2024

    @cainelli

    Thank you all for the context and tips.

    One thing I've found often helps if you can't repro a flake is to run stress -c 16 (or however many CPU cores) in another terminal while the test runs with --runs_per_test=n. (Flags also depending on if the flakiness is from being CPU bound or network bound or disk bound.)

    I did tried that with various combinations to stress during the test but did not have any luck reproducing it.

    if you can't repro the flake (per slack) one thing you can do is add a LogLevelSetter in that test such that CI logs more information when it flakes. then next time we see a failure you'll have more information.

    I will try this path moving forward (#36583).

  10. github-actions commented on Nov 14, 2024

    @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.

  11. added
    stale
    on Nov 14, 2024
  12. github-actions commented on Nov 21, 2024

    @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.

  13. 7 remaining items

  14. removed
    stale
    on Aug 22, 2025
  15. yanjunxiang-google commented on Aug 25, 2025

    @yanjunxiang-google
    Contributor

    Thanks @ravenblackx. I will take a look.

  16. yanjunxiang-google commented on Aug 25, 2025

    @yanjunxiang-google
    Contributor

    I can not reproduce this flaky test error. @ravenblackx could you please share the info how do you trigger it?

  17. ravenblackx commented on Aug 25, 2025

    @ravenblackx
    ContributorAuthor

    That was the difficulty, it has only been found to be reproducible in CI (hence turning on debug logging in the main branch (#36583), and this example failure that has the debug logs and hasn't yet been purged from the CI history.)

  18. ravenblackx commented on Aug 25, 2025

    @ravenblackx
    ContributorAuthor

    I don't think we even have a way to intentionally find newer CI runs where it failed, I only noted that one because I saw it "live".

  19. yanjunxiang-google commented on Aug 29, 2025

    @yanjunxiang-google
    Contributor

    Thanks for the info @ravenblackx! As it haven't been observed in CI recently, how about let's close it and address it later when it resurfaces?

  20. ravenblackx commented on Aug 29, 2025

    @ravenblackx
    ContributorAuthor

    Sounds more like ignore it forever, if we're relying on manual reports of a flake, given that we currently have the verbose log that's seemingly the only information that could ever help diagnose the problem, from a prior manual report of the flake.

    But I'm okay with ignore it forever and just /retest, if that's what we want to do.

  21. cainelli commented on Aug 29, 2025

    @cainelli

    I'm sorry, I have not been available in the past weeks. It seems we're reaching a message timeout (200ms). This is a breakdown of the logs:

    Downstream request initialized:

    [2025-07-22 15:18:33.491][662][trace][testing] [test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc:978] GetAndCloseStreamWithTracing sending downstream request
    [2025-07-22 15:18:33.531][662][debug][client] [source/common/http/codec_client.cc:88] [Tags: "ConnectionId":"0"] connected
    [2025-07-22 15:18:33.532][679][debug][conn_handler] [source/common/listener_manager/active_tcp_listener.cc:160] [Tags: "ConnectionId":"1"] new connection from 127.0.0.1:49806
    [2025-07-22 15:18:33.535][662][trace][testing] [test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc:981] GetAndCloseStreamWithTracing waiting for first message
    [2025-07-22 15:18:33.549][679][debug][http] [source/common/http/conn_manager_impl.cc:394] [Tags: "ConnectionId":"1"] new stream
    

    Nothing unusual in the logs from Test Tracer:

    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:143] TestTracer startSpan: ingress
    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:35] TestTracer creating span with operation: ingress
    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: node_id=node_name
    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 1
    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: zone=zone_name
    [2025-07-22 15:18:33.551][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 2
    [2025-07-22 15:18:33.551][679][trace][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:729] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] decodeHeaders: end_stream = true
    [2025-07-22 15:18:33.552][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:601] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Opening gRPC stream to external processor
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:103] TestTracer spawnChild: async envoy.service.ext_proc.v3.ExternalProcessor.Process egress
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:35] TestTracer creating span with operation: async envoy.service.ext_proc.v3.ExternalProcessor.Process egress
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: upstream_cluster=ext_proc_server_0
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 1
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: upstream_address=127.0.0.1:45453
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 2
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: component=proxy
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 3
    [2025-07-22 15:18:33.578][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:80] TestTracer injectContext
    [2025-07-22 15:18:33.579][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:84] TestTracer context injected
    

    extproc callout and failing with ext_proc_error_per-message_timeout_exceeded

    [2025-07-22 15:18:33.580][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:721] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Sending headers message
    [2025-07-22 15:18:33.580][679][trace][grpc] [source/common/grpc/google_async_client_impl.cc:273] Queued message to write (158 bytes)
    [2025-07-22 15:18:33.580][679][trace][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:750] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] onHeaders returning 1
    [2025-07-22 15:18:33.580][679][trace][http] [source/common/http/filter_manager.cc:597] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] decode headers called: filter=envoy.filters.http.ext_proc status=1
    [2025-07-22 15:18:33.580][679][trace][misc] [source/common/event/scaled_range_timer_manager_impl.cc:60] enableTimer called on 0x72200000c280 for 300000ms, min is 300000ms
    [2025-07-22 15:18:33.580][679][trace][http2] [source/common/http/http2/codec_impl.cc:1862] [Tags: "ConnectionId":"1"] Http2Visitor::OnEndStream(1)
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:994] [Tags: "ConnectionId":"1"] dispatched 93 bytes
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1328] [Tags: "ConnectionId":"1"] about to send frame type=4, flags=0
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1377] [Tags: "ConnectionId":"1"] send data: bytes=33
    [2025-07-22 15:18:33.581][679][trace][connection] [source/common/network/connection_impl.cc:570] [Tags: "ConnectionId":"1"] writing 33 bytes, end_stream false
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1214] [Tags: "ConnectionId":"1"] sent frame type=4, stream_id=0, length=24
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1328] [Tags: "ConnectionId":"1"] about to send frame type=8, flags=0
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1377] [Tags: "ConnectionId":"1"] send data: bytes=13
    [2025-07-22 15:18:33.581][679][trace][connection] [source/common/network/connection_impl.cc:570] [Tags: "ConnectionId":"1"] writing 13 bytes, end_stream false
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1214] [Tags: "ConnectionId":"1"] sent frame type=8, stream_id=0, length=4
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1328] [Tags: "ConnectionId":"1"] about to send frame type=4, flags=1
    [2025-07-22 15:18:33.581][679][trace][http2] [source/common/http/http2/codec_impl.cc:1377] [Tags: "ConnectionId":"1"] send data: bytes=9
    [2025-07-22 15:18:33.582][679][trace][connection] [source/common/network/connection_impl.cc:570] [Tags: "ConnectionId":"1"] writing 9 bytes, end_stream false
    [2025-07-22 15:18:33.582][679][trace][http2] [source/common/http/http2/codec_impl.cc:1214] [Tags: "ConnectionId":"1"] sent frame type=4, stream_id=0, length=0
    [2025-07-22 15:18:33.582][679][trace][connection] [source/common/network/connection_impl.cc:655] [Tags: "ConnectionId":"1"] socket event: 2
    [2025-07-22 15:18:33.582][679][trace][connection] [source/common/network/connection_impl.cc:801] [Tags: "ConnectionId":"1"] write ready
    [2025-07-22 15:18:33.582][679][trace][connection] [source/common/network/raw_buffer_socket.cc:70] [Tags: "ConnectionId":"1"] write returns: 55
    [2025-07-22 15:18:33.596][662][trace][connection] [source/common/network/connection_impl.cc:655] [Tags: "ConnectionId":"0"] socket event: 3
    [2025-07-22 15:18:33.596][662][trace][connection] [source/common/network/connection_impl.cc:801] [Tags: "ConnectionId":"0"] write ready
    [2025-07-22 15:18:33.596][662][trace][connection] [source/common/network/connection_impl.cc:701] [Tags: "ConnectionId":"0"] read ready. dispatch_buffered_data=0
    [2025-07-22 15:18:33.596][662][trace][connection] [source/common/network/raw_buffer_socket.cc:25] [Tags: "ConnectionId":"0"] read returns: 55
    [2025-07-22 15:18:33.596][662][trace][connection] [source/common/network/raw_buffer_socket.cc:39] [Tags: "ConnectionId":"0"] read error: Resource temporarily unavailable, code: 0
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:956] [Tags: "ConnectionId":"0"] dispatching 55 bytes
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:1758] [Tags: "ConnectionId":"0"] Http2Visitor::OnFrameHeader(0, 24, 4, 0)
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:1066] [Tags: "ConnectionId":"0"] about to recv frame type=4, flags=0, stream_id=0
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:1355] [Tags: "ConnectionId":"0"] track inbound frame type=4 flags=0 length=24 padding_length=0
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:1758] [Tags: "ConnectionId":"0"] Http2Visitor::OnFrameHeader(0, 4, 8, 0)
    [2025-07-22 15:18:33.597][662][trace][http2] [source/common/http/http2/codec_impl.cc:1066] [Tags: "ConnectionId":"0"] about to recv frame type=8, flags=0, stream_id=0
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1355] [Tags: "ConnectionId":"0"] track inbound frame type=8 flags=0 length=4 padding_length=0
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1758] [Tags: "ConnectionId":"0"] Http2Visitor::OnFrameHeader(0, 0, 4, 1)
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1066] [Tags: "ConnectionId":"0"] about to recv frame type=4, flags=1, stream_id=0
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1355] [Tags: "ConnectionId":"0"] track inbound frame type=4 flags=1 length=0 padding_length=0
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:994] [Tags: "ConnectionId":"0"] dispatched 55 bytes
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1328] [Tags: "ConnectionId":"0"] about to send frame type=4, flags=1
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1377] [Tags: "ConnectionId":"0"] send data: bytes=9
    [2025-07-22 15:18:33.598][662][trace][connection] [source/common/network/connection_impl.cc:570] [Tags: "ConnectionId":"0"] writing 9 bytes, end_stream false
    [2025-07-22 15:18:33.598][662][trace][http2] [source/common/http/http2/codec_impl.cc:1214] [Tags: "ConnectionId":"0"] sent frame type=4, stream_id=0, length=0
    [2025-07-22 15:18:33.599][662][trace][connection] [source/common/network/connection_impl.cc:655] [Tags: "ConnectionId":"0"] socket event: 2
    [2025-07-22 15:18:33.599][662][trace][connection] [source/common/network/connection_impl.cc:801] [Tags: "ConnectionId":"0"] write ready
    [2025-07-22 15:18:33.599][662][trace][connection] [source/common/network/raw_buffer_socket.cc:70] [Tags: "ConnectionId":"0"] write returns: 9
    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/connection_impl.cc:655] [Tags: "ConnectionId":"1"] socket event: 3
    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/connection_impl.cc:801] [Tags: "ConnectionId":"1"] write ready
    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/connection_impl.cc:701] [Tags: "ConnectionId":"1"] read ready. dispatch_buffered_data=0
    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/raw_buffer_socket.cc:25] [Tags: "ConnectionId":"1"] read returns: 9
    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/raw_buffer_socket.cc:39] [Tags: "ConnectionId":"1"] read error: Resource temporarily unavailable, code: 0
    [2025-07-22 15:18:33.599][679][trace][http2] [source/common/http/http2/codec_impl.cc:956] [Tags: "ConnectionId":"1"] dispatching 9 bytes
    [2025-07-22 15:18:33.599][679][trace][http2] [source/common/http/http2/codec_impl.cc:1758] [Tags: "ConnectionId":"1"] Http2Visitor::OnFrameHeader(0, 0, 4, 1)
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:1066] [Tags: "ConnectionId":"1"] about to recv frame type=4, flags=1, stream_id=0
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:1355] [Tags: "ConnectionId":"1"] track inbound frame type=4 flags=1 length=0 padding_length=0
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:994] [Tags: "ConnectionId":"1"] dispatched 9 bytes
    [2025-07-22 15:18:33.730][670][trace][connection] [source/common/network/connection_impl.cc:442] [Tags: "ConnectionId":"2"] readDisable: disable=true disable_count=0 state=0 buffer_length=0
    [2025-07-22 15:18:33.730][670][debug][conn_handler] [source/common/listener_manager/active_tcp_listener.cc:160] [Tags: "ConnectionId":"2"] new connection from 127.0.0.1:57806
    [2025-07-22 15:18:33.730][670][trace][misc] [source/common/network/tcp_listener_impl.cc:123] TcpListener accepted 1 new connections.
    [2025-07-22 15:18:33.730][670][trace][connection] [source/common/network/connection_impl.cc:442] [Tags: "ConnectionId":"2"] readDisable: disable=false disable_count=1 state=0 buffer_length=0
    [2025-07-22 15:18:33.732][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:1687] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] message timeout reached
    [2025-07-22 15:18:33.732][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:634] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Calling close on stream
    [2025-07-22 15:18:33.732][679][debug][ext_proc] [./source/extensions/filters/common/ext_proc/grpc_client_impl.h:135] Closing gRPC stream
    [2025-07-22 15:18:33.732][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: status=canceled
    [2025-07-22 15:18:33.733][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 4
    [2025-07-22 15:18:33.733][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:108] TestTracer finishSpan
    [2025-07-22 15:18:33.733][679][debug][grpc] [source/common/grpc/google_async_client_impl.cc:288] resetStream
    [2025-07-22 15:18:33.733][679][debug][grpc] [source/common/grpc/google_async_client_impl.cc:473] Stream cleanup with 2 in-flight tags
    [2025-07-22 15:18:33.733][680][trace][grpc] [source/common/grpc/google_async_client_impl.cc:61] completionThread CQ event 0 false
    [2025-07-22 15:18:33.734][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/processor_state.cc:42] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Finish external processing call
    [2025-07-22 15:18:33.734][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/processor_state.cc:63] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Traffic direction INBOUND: timer disabled
    [2025-07-22 15:18:33.734][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/processor_state.cc:42] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Finish external processing call
    [2025-07-22 15:18:33.734][680][trace][grpc] [source/common/grpc/google_async_client_impl.cc:61] completionThread CQ event 5 true
    [2025-07-22 15:18:33.734][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:1759] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Sending local reply with status code 504
    [2025-07-22 15:18:33.735][679][debug][ext_proc] [./source/extensions/filters/http/ext_proc/ext_proc.h:513] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] When onLocalReply() is called, set processing_complete_ to true to skip external processing
    [2025-07-22 15:18:33.735][679][debug][http] [source/common/http/filter_manager.cc:1118] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Sending local reply with details ext_proc_error_per-message_timeout_exceeded
    

    Finally, the assertion fails as we don't expect a timeout in the test

    [2025-07-22 15:18:33.732][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:64] TestTracer setTag: status=canceled
    [2025-07-22 15:18:33.733][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:66] TestTracer tags size: 4
    [2025-07-22 15:18:33.733][679][trace][misc] [test/extensions/filters/http/ext_proc/tracer_test_filter.cc:108] TestTracer finishSpan
    [2025-07-22 15:18:33.734][679][debug][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:1759] [Tags: "ConnectionId":"1","StreamId":"13596095993715915626"] Sending local reply with status code 504
    

    The majority of the time (~130ms) is spent here tho, I don't have enough context to tell why.

    [2025-07-22 15:18:33.599][679][trace][connection] [source/common/network/raw_buffer_socket.cc:39] [Tags: "ConnectionId":"1"] read error: Resource temporarily unavailable, code: 0
    [2025-07-22 15:18:33.599][679][trace][http2] [source/common/http/http2/codec_impl.cc:956] [Tags: "ConnectionId":"1"] dispatching 9 bytes
    [2025-07-22 15:18:33.599][679][trace][http2] [source/common/http/http2/codec_impl.cc:1758] [Tags: "ConnectionId":"1"] Http2Visitor::OnFrameHeader(0, 0, 4, 1)
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:1066] [Tags: "ConnectionId":"1"] about to recv frame type=4, flags=1, stream_id=0
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:1355] [Tags: "ConnectionId":"1"] track inbound frame type=4 flags=1 length=0 padding_length=0
    [2025-07-22 15:18:33.600][679][trace][http2] [source/common/http/http2/codec_impl.cc:994] [Tags: "ConnectionId":"1"] dispatched 9 bytes
    [2025-07-22 15:18:33.730][670][trace][connection] [source/common/network/connection_impl.cc:442] [Tags: "ConnectionId":"2"] readDisable: disable=true disable_count=0 state=0 buffer_length=0
    [2025-07-22 15:18:33.730][670][debug][conn_handler] [source/common/listener_manager/active_tcp_listener.cc:160] [Tags: "ConnectionId":"2"] new connection from 127.0.0.1:57806
    

    What I can do is to increase the message timeout for this test like done in others

    https://github.com/cainelli/envoy/blob/0274a682f337541120e4c2cb2ce678fc71591305/test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc#L4203-L4205

    (uploading the logs here in case the one in CI is gone)

    ci-logs.txt

  22. ravenblackx commented on Sep 2, 2025

    @ravenblackx
    ContributorAuthor

    Ah, good find, that it's a "production" timeout in the test, not the test timing out. Configuring a longer timeout makes sense to me. 200ms is a short timeout for something happening in a multi-overloaded CI context with tsan and/or asan involved.

    Would be nice if the test failure could be persuaded to give a little more detail for this failure case too, maybe here could do something like ASSERT_THAT(response, HasStatusCode(200)) << response.details();
    (that's pseudocode, I don't know off the top of my head even what type response is.)

  23. yanjunxiang-google commented on Sep 2, 2025

    @yanjunxiang-google
    Contributor

    I don't understand why the fake ext_proc server is not responding in 150ms, and why there is no test trace messages dumped during that period. It might be be due to the CPU is fully occupied during that small window. For any ext_proc flaky tests due to this ext_proc timeout setting, I agree we should increase it to a much bigger number. I created #40929, which is one line change for this.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions