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

Dropped events in filestream / kubernetes autodiscover #38095

Open
faec opened this issue Feb 21, 2024 · 2 comments
Open

Dropped events in filestream / kubernetes autodiscover #38095

faec opened this issue Feb 21, 2024 · 2 comments
Labels
bug Stalled Team:Elastic-Agent Label for the Agent team

Comments

@faec
Copy link
Contributor

faec commented Feb 21, 2024

A recent panic in Filebeat was tracked down to a race condition where a Beats pipeline client was closed while it was still waiting on a response from the queue for an event's publication. The most common cause of closed pipeline clients is a Harvester shutting down.

One of the implications of this panic, though, is that there are cases where a client is shut down while it still has pending events that haven't entered the queue (possibly because the underlying file is deleted or renamed while some of its data is still being processed). We can prevent this from crashing Filebeat, but the "correct" behavior then is to drop any events that haven't yet entered the queue when the client is closed, which is probably not the intended behavior for callers of this API like the Filebeat harvesters.

It's not clear how common this issue is. Anecdotally, users who were seeing the panic issue saw it a few times a day, however only one rare branch of the cancellation would lead to an actual panic, and the number of pending events that are dropped on cancellation may be higher.

This issue would arise most often with a full or mostly-full queue, and with inputs that go through many pipeline clients, such as a Filestream input with a lot of file churn, or a Kubernetes autodiscover input with a lot of ephemeral pods.

@faec faec added the Team:Elastic-Agent Label for the Agent team label Feb 21, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@faec faec added the bug label Feb 21, 2024
@botelastic
Copy link

botelastic bot commented Feb 20, 2025

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Stalled Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

2 participants