-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
I wonder whether there are still memory leaks in the latest version ? #3348
Comments
Hello @wohaiaini, First, please note that 3.0.12 is not the latest version, 3.0.14 has been recently released. The behavior you are mentioning is real and you are not the only one. The more modsecurity directives (like The issue seems complex and multi-factorial, severals leaks have already been fixed in past versions but we need to continue this work together. Any help is appreciated. |
Okay, thanks for your reply. I will keep working on it. |
Hello @S0obi The most frequently occurring ones are shown in the following call stack.
the second most frequently occurring ones are shown:
|
@wohaiaini thanks for your report! Will be great if you can join the community on slack to work together on this issue. In parralel, can you document how you get this valgrind output so we can reproduce ? thanks in advance! |
Thanks for the invitation. |
I also developed a tool but the aim is a bit different than check the memory usage (and possible memory leak(s)). ftwrunner's main goal is to run CRS checks against the "raw" library, but it's easy to use it with Valgrind. It's interesting that is does not show the leaks that you mentioned above. So I assume this is a connector issue, eg. it does not call msc_rules_cleanup when Nginx gets a |
I tested this lib(3.0.12) with nginx model ModSecurity-nginx on Linux platform by reloading nginx (nginx -s reload) again and again for quite a log time,and I found that the memory (RSS) still increases a little bit every several times. The more config rules, the bigger memory increases, and it will cause out of memory (OOM) reloading not more than a thousand times.
And I do read some issues like 2848 before, it seems the problem has been resolved, but I am not sure.
Here are some of my test results, and the docker env do cause OOM problem, and I don't know how that happens, could you please help me with that, many thanks.
the linux environment:

the docker environment(more Modsecurity rules):
The text was updated successfully, but these errors were encountered: