You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test flake: //test/extensions/filters/http/ext_proc:ext_proc_integration_test #36041
[ 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 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 ...
@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?
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.
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.)
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.
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.
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.
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.)
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.
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.)
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.
Activity
tyxia commentedon Sep 9, 2024
@cainelli Do you mind taking a look at this? Thank you!
I think tracing related feature was added by your change
cainelli commentedon Sep 9, 2024
oh sorry about that. I will take a look into it this week.
cainelli commentedon Sep 16, 2024
@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.
cainelli commentedon Sep 16, 2024
actually, is the timeout 5ms? should we increase it a bit?envoy/test/integration/http_integration.cc
Lines 555 to 556 in 7a7df5d
update: nvm is 5s
envoy/test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc
Lines 280 to 281 in 7a7df5d
alyssawilk commentedon Oct 8, 2024
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!
tyxia commentedon Oct 9, 2024
@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?
alyssawilk commentedon Oct 10, 2024
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.
ravenblackx commentedon Oct 11, 2024
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.)cainelli commentedon Oct 14, 2024
Thank you all for the context and tips.
I did tried that with various combinations to stress during the test but did not have any luck reproducing it.
I will try this path moving forward (#36583).
ext_proc: Increase log verbosity in a possible flake test (#36583)
ext_proc: Increase log verbosity in a possible flake test (envoyproxy…
github-actions commentedon Nov 14, 2024
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.
github-actions commentedon Nov 21, 2024
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.
7 remaining items
yanjunxiang-google commentedon Aug 25, 2025
Thanks @ravenblackx. I will take a look.
yanjunxiang-google commentedon Aug 25, 2025
I can not reproduce this flaky test error. @ravenblackx could you please share the info how do you trigger it?
ravenblackx commentedon Aug 25, 2025
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.)
ravenblackx commentedon Aug 25, 2025
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".
yanjunxiang-google commentedon Aug 29, 2025
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?
ravenblackx commentedon Aug 29, 2025
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.
cainelli commentedon Aug 29, 2025
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:
Nothing unusual in the logs from Test Tracer:
extproc callout and failing with
ext_proc_error_per-message_timeout_exceededFinally, the assertion fails as we don't expect a timeout in the test
The majority of the time (~130ms) is spent here tho, I don't have enough context to tell why.
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
ravenblackx commentedon Sep 2, 2025
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.)
yanjunxiang-google commentedon Sep 2, 2025
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.
ext_proc: increasing tracing integration test timeout to be 1s to avo…
ext_proc: increasing tracing integration test timeout to be 1s to avo…
ext_proc: increasing tracing integration test timeout to be 1s to avo…
ext_proc: increasing tracing integration test timeout to be 1s to avo…