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

Stop waiting for signals on closed outleters #11263

Merged
merged 4 commits into from
Mar 19, 2019

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Mar 15, 2019

Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

@jsoriano jsoriano added bug review Filebeat Filebeat libbeat needs_backport PR is waiting to be backported to other branches. v7.0.0 v6.7.0 v6.6.3 labels Mar 15, 2019
@jsoriano jsoriano self-assigned this Mar 15, 2019
@jsoriano jsoriano added the Team:Integrations Label for the Integrations team label Mar 15, 2019
Outleters can wait for the finalization of filebeat. If the outleter is
closed the goroutine will be still running even if it has nothing to do,
leaking goroutines.

Stop the goroutine waiting to close on signal if the outleter has been
already closed.
@jsoriano jsoriano force-pushed the stop-close-on-signal-goroutine branch from 71b804f to 581df59 Compare March 15, 2019 15:00
@jsoriano jsoriano marked this pull request as ready for review March 15, 2019 15:34
@jsoriano jsoriano requested a review from a team as a code owner March 15, 2019 15:34
@jsoriano jsoriano force-pushed the stop-close-on-signal-goroutine branch from 97f7877 to 5c01cc0 Compare March 18, 2019 18:07
@jsoriano jsoriano merged commit 57c9891 into elastic:master Mar 19, 2019
@jsoriano jsoriano deleted the stop-close-on-signal-goroutine branch March 19, 2019 20:24
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Mar 27, 2019
jsoriano added a commit to jsoriano/beats that referenced this pull request Mar 27, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
jsoriano added a commit to jsoriano/beats that referenced this pull request Mar 27, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
jsoriano added a commit to jsoriano/beats that referenced this pull request Mar 27, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
exekias pushed a commit that referenced this pull request Apr 2, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
jsoriano added a commit that referenced this pull request Apr 17, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
jsoriano added a commit that referenced this pull request Apr 17, 2019
Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 57c9891)
jsoriano added a commit that referenced this pull request May 24, 2019
Follows the strategy used in #10850 to check for goroutine leaks
on tests in some places related to the leaks investigated as part
of #9302.

Several things here:
* New helper to reuse the goroutine checker, it also prints now the
  goroutines dump on failure.
* Add goroutine checks for autodiscover tests
* Add goroutine checks for CloseOnSignal and SubOutlet
  tests (they detect the issues solved by #11263)
* Add goroutine checks for log input tests (they detect issues solved
  by #12125 and #12164)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…#11489)

Outleters start a goroutine to handle the finalization of filebeat. If the
outleter is closed by other means the goroutine will be kept running
even if it has nothing to do, leaking goroutines.

Stop this goroutine if the outleter is closed.

(cherry picked from commit 3a547a0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants