-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix #4396: Add timeout to establish_connection to prevent infinite loop #5104
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
Conversation
0989d87 to
ec945bf
Compare
ec945bf to
cbc2ea8
Compare
daipom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my late response.
Thanks so much for considering a fix for this critical issue!
I don’t fully understand the cause and haven’t been able to reproduce it, but at least, it would be good to address the risk of entering an infinite loop.
So, this fix looks good to me.
I left one comment. Could you please check it?
|
I want to clarify the conditions for #4396, if possible.
It appears that the I’m concerned that |
…ite loop - Add timeout check in establish_connection method using send_timeout - Prevents infinite loop when connection drops during handshake protocol - Disables problematic nodes and logs timeout warnings - Add test case to verify timeout functionality works correctly Fixes issue where logs stop being flushed when handshake gets stuck in unstable network environments with proxy components. Signed-off-by: Ian Driver <[email protected]>
cbc2ea8 to
179bf0f
Compare
I agree, I wonder if the original reporter redacted their security config. I do use the security setting in the environment where I'm seeing this behaviour. |
Thanks! |
daipom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Is there anything I need to do from here to get this merged? |
No. I’m only waiting for the CI to pass. 😄 |
|
Thanks! |
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…op (#5104) **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]>
…event infinite loop (#5104) (#5137) Backport #5104 **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. Signed-off-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]> Co-authored-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]>
…nnection to prevent infinite loop (fluent#5104) (fluent#5137)" This reverts commit 18fe509.
…nnection to prevent infinite loop (fluent#5104) (fluent#5137)" This reverts commit 18fe509.
…event infinite loop (#5104) (#5138) Backport #5104 **Which issue(s) this PR fixes**: Fixes #4396 **What this PR does / why we need it**: Adds timeout mechanism to `establish_connection` method to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existing `hard_timeout` configuration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes. **Docs Changes**: None required - uses existing `hard_timeout` configuration parameter. **Release Note**: Fix infinite loop in out_forward handshake protocol that could cause logs to stop being flushed in unstable network environments. <!-- Thank you for contributing to Fluentd! Your commits need to follow DCO: https://probot.github.io/apps/dco/ And please provide the following information to help us make the most of your pull request: --> Signed-off-by: Ian Driver <[email protected]> Signed-off-by: Shizuo Fujita <[email protected]> Co-authored-by: Ian Driver <[email protected]> Co-authored-by: Ian Driver <[email protected]>
Which issue(s) this PR fixes:
Fixes #4396
What this PR does / why we need it:
Adds timeout mechanism to
establish_connectionmethod to prevent infinite loop when handshake protocol gets stuck. In unstable network environments with proxy components, if connection drops during handshake after TLS establishment, Fluentd gets stuck in infinite loop causing logs to stop being flushed. This fix uses existinghard_timeoutconfiguration to break the loop, disable problematic nodes, and maintain log flow through healthy nodes.Docs Changes:
None required - uses existing
hard_timeoutconfiguration parameter.Release Note:
out_forward: fix issue where could cause output to stop when using
<security>and TLS setting together under unstable network environments