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

Fix FD leak when socket shutdown is one-sided #193

Merged
merged 1 commit into from Aug 20, 2020

Conversation

okulev
Copy link
Contributor

@okulev okulev commented Jun 15, 2020

AWS LB has timeouts when connection is inactive and when this happens, AWS LB shuts down socket from one-side only. When rsyslog detects one-sided shutdown, it assumes that connection is closed while it isn't. The connection is left unclosed and unclosed FD are piling up, eventually filling up FD number space.

Removing the assignment to -1 allows rsyslog to close the connection later.

@rgerhards rgerhards self-assigned this Jun 15, 2020
@marnao
Copy link

marnao commented Jul 7, 2020

@okulev we are facing a similar issue but with nginx instead of AWS LB.. has this changed worked well for you? I don't quite understand the reasoning behind the change you made, but we are considering trying it. Hoping for an official fix soon.

@rgerhards rgerhards added this to the 1.7.0 milestone Aug 19, 2020
@rgerhards
Copy link
Member

@okulev we need a rebase to solve the merge conflict. Will you do that? Else I can handle it.

AWS LB has timeouts when connection is inactive and when this happens, AWS LB shuts down socket from one-side only. When rsyslog detects one-sided shutdown, it assumes that connection is closed while it isn't. The connection is left unclosed and unclosed FD are piling up, eventually filling up FD number space.

Removing the assignment to -1 allows rsyslog to close the connection later.
@rgerhards
Copy link
Member

@okulev FYI: I have done the merge and force-pushed

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2020

Codecov Report

Merging #193 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   75.69%   75.69%           
=======================================
  Files          21       21           
  Lines        4102     4102           
=======================================
  Hits         3105     3105           
  Misses        997      997           
Impacted Files Coverage Δ
src/tcp.c 73.50% <ø> (-0.02%) ⬇️
tests/receive.c 78.88% <0.00%> (-1.60%) ⬇️
src/relpsess.c 86.60% <0.00%> (+0.02%) ⬆️
tests/send.c 79.28% <0.00%> (+1.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eb7b56c...3797944. Read the comment docs.

@rgerhards rgerhards merged commit f997c4d into rsyslog:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants