-
Notifications
You must be signed in to change notification settings - Fork 872
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
Falco crash at startup when using ebpf driver #1761
Comments
Hi @jasiam ! |
Hi @FedeDP! |
Indeed in the PR me and @jasondellaluce tested back up to clang7; it can surely be an explanation, indeed the most likely one! |
I've just tested using clang-11 (the easiest version to install in my environment) and it's working fine apparently :-) So if I've understood correctly, official falcosecurity/falco-builder:latest image is not valid if you want to build bpf probe. Am I right? Should I open a new issue for this? Thanks! |
It's interesting! Can you build and test bpf with clang5 using the attached patch? (otherwise tomorrow i will test in qemu!) |
It's still failing (same error trace) :-( I'll detail steps I've followed, just to discard an error from my side. I've started from a falco-builder:latest container with all required dependencies:
I'd feel more comfortable if you can test it too. Thanks! |
Your steps seem fine! EDIT: for reference, what i'm doing:
EDIT2: forgot to mention that i can build falco target though. |
I use a custom entrypoint script as the command in a k8s job with falco-builder image. I do this because my nodes may have different kernels so I need to compile the driver on all of them (I deploy the k8s job on every node) My entrypoint looks like this:
|
Thank you! Unfortunately, i guess my host /lib/modules is not compatible (too new):
I'll have to wait a couple of hours for the clang5 build to finish :( |
Update: i reproduced the issue and currently have a working patch; i need more tests then i'll open a PR to fix it! |
Hi! You can find the PR here: falcosecurity/libs#109 You can replicate the patch and check if it's working for you too (any feedback is greatly appreciated!) |
Hi! I've just compiled probe.o with your new patch in a falco-builder container and I've got a new bpf error when falco starts up in my environment. You can check the error trace in this gist Regarding init error messages about not able to compile bpf probe, be aware that I'm mounting the compiled probe.o as /root/.falco/falco-bpf.o in my falco container. Thank you for your bpf knowledge @FedeDP! |
That's weird :( i had verifier issues on
Thank you very much! Hopefully we will be able to fix it! |
You are already doing a great job! Moreover, i feel sorry to bother you with looots of tests :( Anyway, the issue seems to be related to Again, forgive me if this is a stupid question, but debugging bpf takes lots of time, thus i need to be absolutely sure that the bug is real :) |
Good news! I'm an idiot XD I've been updating the wrong ppm_flag_helpers.h file, when I execute the cmake command, 2 files named like that are created:
I've updated the first one, not the second one (I didn't see it the first time and all the tests have been performed using my bash shell history) Now I've applied your PR patch correctly and it works absolutely fine :-) Thanks a lot for your work!! |
The libs PR is now merged thus i think we can consider this solved ;) |
Describe the bug
I'm migrating from kernel-module driver to ebpf driver (I compile it and mount the driver into falco pods) but falco crashes when starting up on ebpf mode.
How to reproduce it
Compile the ebpf driver using falco-builder image:
Then start a pod with falco 0.29.1 mounting the generated probe.o (even though doc in https://falco.org/docs/getting-started/source/#enable-bpf-support shows it should be falco.o) file into falco pod as /root/.falco/falco_centos_4.18.0-305.12.1.el8_4.x86_64_1.o
Expected behaviour
No crash
Screenshots
Environment
Kubernetes 1.20.10
0.29.1
{
"machine": "x86_64",
"nodename": "74e2a2435bbc",
"release": "4.18.0-305.12.1.el8_4.x86_64",
"sysname": "Linux",
"version": "Digwatch compiler #1 SMP Wed Aug 11 01:59:55 UTC 2021"
}
CentOS Linux release 8.4.210
Linux 4.18.0-305.12.1.el8_4.x86_64 Digwatch compiler #1 SMP Wed Aug 11 01:59:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Kubernetes
Additional context
Arguments passed to falco on start:
This issue could be related to #1690 but the failure is not the same.
The text was updated successfully, but these errors were encountered: