Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid ECONNRESET errors on idle timeout #162947

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Aug 2, 2023

Summary

Address #82002 and #75440

I think I found a breakthrough for this flaky behavior. I run the integration test 800x locally, with different settings:

Adjusting both the delayed emission (send 1 char at a time), and the socket idle timeout to have exacly the same value (e.g. 10 millis), I managed to get the ECONNRESET 100% of the times.

Thus, IIUC the ECONNRESET happens when the client tries to send a character over the socket and at the same time the server responds with the idle timeout.

Adjusting the values so that the delay between character emissions is significantly larger than the idle timeout, e.g. 20 vs 5, I get socket hang up 100% of the times.

Flaky Test Runner Pipeline - 300x 🟢
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4030

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes test-failure-flaky backport:all-open Backport to all branches that could still receive a release v8.10.0 v8.9.1 v7.17.13 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:all-open Backport to all branches that could still receive a release v7.17.13 labels Aug 2, 2023
@gsoldevila
Copy link
Contributor Author

gsoldevila commented Oct 30, 2023

Unskipped the tests related to #75440

Flaky test runner pipeline 100x - 🔴 (1 failure out of 100 runs)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3813

Failed test
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3813#018b8078-fbec-44d4-ade7-4f530d46e433

@gsoldevila gsoldevila removed backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.10.0 v8.9.1 labels Nov 2, 2023
@gsoldevila
Copy link
Contributor Author

gsoldevila commented Nov 2, 2023

I updated the tests that intend to send the whole payload straight away, through this commit.
I believe this can help solving the unexpected ECONNRESET.

Flaky test runner pipeline - 200x 🟢
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3881

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/test_serverless/functional/test_suites/observability/config.ts / serverless observability UI Rules list "after each" hook for "should create an ES Query Rule and display it when consumer is observability"
  • [job] [logs] x-pack/test_serverless/functional/test_suites/observability/config.ts / serverless observability UI Rules list should create an ES Query Rule and display it when consumer is observability

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@gsoldevila gsoldevila marked this pull request as ready for review November 21, 2023 15:23
@gsoldevila gsoldevila requested a review from a team as a code owner November 21, 2023 15:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

Good work! Let's give it a try and see what happens. FYI, Builkite's got issues ATM, see https://www.buildkitestatus.com/

@gsoldevila gsoldevila changed the title Unskip old failing integration test Avoid ECONNRESET errors on idle timeout Nov 22, 2023
@gsoldevila gsoldevila merged commit 721d68a into elastic:main Nov 22, 2023
26 checks passed
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc test-failure-flaky v8.12.0
Projects
None yet
5 participants