falcosecurity / libs

libsinsp, libscap, the kernel module driver, and the eBPF driver sources
https://falcosecurity.github.io/libs/
Apache License 2.0
230 stars 164 forks source link

Container events are sent during startup in live mode, for pre-existing containers #229

Closed FedeDP closed 2 years ago

FedeDP commented 2 years ago

Describe the bug

After the fix #219 , on my cgroups v2 system i am now seeing that pre-existing containers are correctly fetched during startup, and their threadinfos correctly coupled with each container.
However, container events are being sent for those pre-existing containers; this is clearly a bug, as those containers should be part of the "initial state", and sending an event is misleading.

How to reproduce it

Expected behaviour

No event should be sent for pre-existing environment/state.

Screenshots

Environment

Additional context

FedeDP commented 2 years ago

Moreover, replaying a scap file, each runtime container event is sent twice (in order):

This behavior was already present in master before #219 was merged.