-
Notifications
You must be signed in to change notification settings - Fork 14
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
Close TCP, TLS connections gracefully to avoid data loss #123
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
💚 Build Succeeded
|
@efd6 I think I was able to resolve those manual testing failures. If it is run like this, the
But if the error output is redirected,
|
efd6
approved these changes
Nov 10, 2024
qcorporation
pushed a commit
to elastic/integrations
that referenced
this pull request
Feb 3, 2025
v0.17.1 of stream includes a fix for an issue with TCP and TLS closure[1]. [1] elastic/stream#123
harnish-elastic
pushed a commit
to harnish-elastic/integrations
that referenced
this pull request
Feb 4, 2025
v0.17.1 of stream includes a fix for an issue with TCP and TLS closure[1]. [1] elastic/stream#123
qcorporation
pushed a commit
to elastic/integrations
that referenced
this pull request
Feb 4, 2025
v0.17.1 of stream includes a fix for an issue with TCP and TLS closure[1]. [1] elastic/stream#123
harnish-elastic
pushed a commit
to harnish-elastic/integrations
that referenced
this pull request
Feb 5, 2025
v0.17.1 of stream includes a fix for an issue with TCP and TLS closure[1]. [1] elastic/stream#123
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Checklist
Discussion
This bug was discovered due to flaky tests that use
stream
(issues listed below).For a more detailed discussion of this topic please read the blog post
The ultimate SO_LINGER page, or: why is my tcp not reliable.
I tested this manually. Failures of the old version can be demonstrated as follows. Here I use data from
integrations
that is know to trigger the issue.TLS
In one terminal run this server loop:
In another, repeatedly run this client:
It should fail within a few runs. It fails more readily if the client is run soon after the server starts. If necessary, lowering the rate limit enforced by
pv
may help trigger a failure.TCP
This uses GNU Netcat (BSD Netcat may differ). Having the server write some data seems to be necessary for the error to happen.
The server:
The client:
Related issues