-
Notifications
You must be signed in to change notification settings - Fork 919
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
Crash with Invalid JSON error while parsing container info #683
Comments
Hi @Srinivas11789 good catch! Thanks for opening the issue, we will try to reproduce it. |
Hi I'm hitting this issue as well. Thanks for looking in to it. |
any update on this? |
@vsimon @Srinivas11789 this is in the backlog, will address shortly, in the meanwhile if anyone has more details please post here! ❤️ |
@Srinivas11789 I am not able to reproduce the error you are reporting for the parser, however I acknowledge that not checking the error at the event loop level can lead to falco crashing. I couldn't try with ports because k8s didn't allow me to create a container with that many ports caused by a network sandboxing error. The first definition contains around 3k env variables, the other around 10k but k8s didn't allow me to load it. As you suggested we need two fixes for this:
So since I was not able to reproduce the parsing error you are reporting I can't address the second fix we have to do, please continue providing feedback to help fixing this 👼 Having a complete reproducible yaml definition that breaks falco would help. @vsimon you can probably help too. My kubernetes version (compiled from master):
|
@fntlnz Thanks for the update and a possible fix. 👍 Agree that the first fix would solve the crash but having this deployment configuration would keep triggering the JSON parse errors for that container. So I think it would be better if we also try to fix the root cause. I can help with more feedback. I tried to reproduce this again today (same environment as mentioned before) and still see the issue occurring, I added some @vsimon Thanks for the follow up. |
Thanks for the updated files to reproduce @Srinivas11789 - will try to see if I can trigger that case on my environment. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/no-stale |
/milestone 1.0.0 Moving this to 1.0.0 because we are re-designing the input interface (via gRPC). Once we have that we'll use the k8s go client directly plus go json package. Which in turn means that we'll use the same code k8s uses solving this bug. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/no-stale |
Hi, I have a similar issue with my EKS cluster (v1.14) when trying to parse a JSON from helm chart deployment. "Runtime error: Invalid JSON encountered while parsing container info:" I'm running> |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
What's Falco version? Could you provide detailed steps to reproduce the problem? |
I'm using latest release falco:0.25.0 |
I'm able to reproduce |
This is causing me an issue with a Java Spring Boot image produced by Spring Boot Maven Plugin's Docker Image generation feature. That feature uses Paketo buildpacks. This is likely a problem for every Java image produced by Paketo buildpacks. |
@fntlnz @leodido Try the Docker image nebhale/spring-music that's a typical Java Spring Docker image created by Poketo buildpacks. There is a lot of JSON in the labels. I think this will cause Falco to crash. |
Hi guys, I just run into the same issue 😢. Working image: user@node1:~$ docker inspect image_with_io_buildpacks_build_metadata_label:v1 -f '{{json .Config.Labels}}' | wc -m
58378 NOT working image: user@node1:~$ docker inspect image_with_io_buildpacks_build_metadata_label:v2 -f '{{json .Config.Labels}}' | wc -m
596846 @leodido Is there any possibility this will be fixed prior to Falco release 1.0.0? Thanks & regards, |
On our container platform we also have some containers running that were built with some kind of buildpack resulting in insanely huge labels on the docker images. And Falco crashes when trying to parse them. What is weird though is that this starting happening when we upgraded from 0.26.2 to 0.27.0. It's running fine with 0.26.2. |
I'm also encountering this error in Falco 0.27.0 running on EKS 1.18.9-eks-d1db3c. Has there been any progress made towards solving this? |
Additional context, the only container that seemed to be triggering the issue was any instance of the micrometermetrics/prometheus-rsocket-proxy image. Removing all pods running that image allows Falco to run normally. Hopefully that helps |
Any update on this issue? Seeing it with containers built with cloud native buildpacks |
We also have this issue with >0.26.2. Is there any workaround/fix? |
I have created a gist to simulate the >1000 ports deployment: https://gist.github.com/leogr/a184a09a3420eea4db73a07633aa04f3 Anyway, I was not able to reproduce this issue with 0.28.1. Could someone who still has the problem with a newer version of Falco provide reproducible steps? |
@leogr The issue is I think the total size of the labels, because i had to test it a few times before generating enough labels. This is default behaviour of buildpack btw, so please don't blame me for the ridiculous amount of labels. |
Thank you @dza89, I was able to reproduce the bug now. It seems the root cause resides in I still need to investigate further. Meanwhile, I have opened a new issue falcosecurity/libs#51 to track the problem in PS |
Hi! There is still a bug that is not covered by the above commit: what if lots (i mean lots) of labels with strings length < 100 bytes are added to a docker image? You can easily reproduce the crash with the attached dockerfile (sorry for the stupid label keys/values :) ) |
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 |
@FedeDP has this issue been definitively fixed? I recall yes, but I have not found any reference. |
Yup! |
I did not close this one because eventually the bug may appear again; it was meant to be fixed by falcosecurity/libs#85 but then me and @mstemm agreed that a malicious >4G container metadata json would kill us anyway: falcosecurity/libs#85 (comment) |
Stale issues rot after 30d of inactivity. Mark the issue as fresh with Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle rotten |
This issue should be definitively fixed by falcosecurity/libs#102 which is included in the latest development version of Falco (i.e. the source code in the The fix will be also part of the next upcoming release, so Since it has been fixed, I'm closing this issue. Feel free to discuss further or ask to re-open it if the problem persists. /close |
@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. |
What happened:
Falco crashes with
Runtime error: Invalid JSON encountered while parsing container info
resulting inCrashLoopBackOff
pod stateWhat you expected to happen:
How to reproduce it (as minimally and precisely as possible):
https://github.com/kubernetes/kubernetes/issues/23864
https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/
Anything else we need to know?:
Environment:
falco --version
):falco version 0.15.3
GCP
cat /etc/os-release
):uname -a
):Kubernetes (helm)
The text was updated successfully, but these errors were encountered: