-
Notifications
You must be signed in to change notification settings - Fork 172
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
unable to handle containers with huge metadata #51
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
/remove-lifecycle stale |
Reporting same comment that i wrote on falco issue: falcosecurity/falco#683 (comment). I am working on a possible fix. |
We currently have the following limitation: it seems our protocol is not able to manage single arguments larger than 64kiB. Given that we cannot change the protocol (otherwise we'd lose backward compatibility), here are a couple of ideas on how to fix it:
Note however that i think we should enforce a proper json size limit anyway, because right now we are trusting external json source to give us a normal-sized json, as we are calling:
potentially heap-allocating huge chunks of memory. I guess that solution 2. together with a 2MiB limit on json dimension is our best candidate, yet for a simpler solution (maybe while thoroughly thinking about a backward compatible protocol change?) 1. can be enough. /cc @gnosek |
In the end, after a discussion with @leogr , it was decided to use a best-effort approach: if resulting json is too large to be handled, we first try to trim useless metadata (read: metadata that is not used as a filter), ie:
Eventually, if we still need to free space, "Mounts" is killed too. This is the best possible approach as it does not require many changes yet it always preserves container main info, like id, image and whatever, only trimming fields when needed. |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
This issue should be fixed by #102 |
@leogr: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Describe the bug
This is an early description of the problem. I'm investigating. More details will come.
libsinsp
throws an exception when a container with a lot of metadata is noticed.It seems that the JSON (containing the container metadata) is truncated, and the JSON parser is returning an empty error.
The bug seems to cause the problem reported in falcosecurity/falco#683
How to reproduce it
TODO
Expected behaviour
Screenshots
...a lot of JSON in the middle...
Note:
error=
(the error returned by the parser) is emptyEnvironment
N/A
Additional context
The text was updated successfully, but these errors were encountered: