-
Notifications
You must be signed in to change notification settings - Fork 905
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 when loading many small rules files #906
Comments
After compiling luajit with assertions, I found that the problem was here:
I don't know why this pops 4 values from the stack when the function only returns 2 values, but it was introduced in 1711ed0. It only shows up after a large number of files because there are ~10 tables on the stack from the various calls to luaL_openlib(), plus some time for the stack to be corrupted and the garbage collector to kick in and crash. Changing the pop to 2 values fixes the problem. |
The call to rule_loader.load_rules only returns 2 values, so only pop two values from the stack. This fixes #906. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
The call to rule_loader.load_rules only returns 2 values, so only pop two values from the stack. This fixes #906. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
What happened:
I found a crash bug in Falco that occurs when Falco loads lots of relatively small files with lots of macros. It doesn’t seem to be a bug in falco itself, a stack trace from a debug build shows the crash is in the lua garbage collector:
The full command line that reproduces the crash is
falco -c <path to falco.yaml> -r crash_rules_files
, zip file attachedcrash_rules_files.zip.
You'll need a recent dev build of falco, as that has support for the psp related fields in the rules files. I was using 0.1.2709dev.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
falco --version
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: