Skip to content

aws-s3 input writes to Filebeat registry without proper synchronization #39052

@faec

Description

@faec

The function that refreshes the aws-s3 input's state in the registry, (*states).writeStates, is called by (*s3Poller).Purge, which processes acknowledged event pages and finalizes their state. However, depending on the input configuration and the size of the target bucket, Purge can be called many times concurrently, whereas the statestore.Store object used to write to the registry is meant to be owned by a single goroutine. This can lead to several goroutines writing to the same non-synchronized object at the same time, which can cause instability and registry corruption.

This issue is one of the factors causing elastic/integrations#9463.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions