-
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
Resolve memory leak (bison-generated position.filename) #2876
Conversation
Just a short summary: I checked both current master and patched version with help of ftwrunner (that's the new version) through Valgrind. The results were: before the patch:
after applying the patch:
The Btw Valgrind also reports that there are few conditional jumps, like this:
in two places: one of them is in line 436 in rules_with_actions.cc, the other one is in line 361. |
As this issue affects a lot of users of ModSecurity in production, is it possible to release 3.0.9 early? I see a couple of issues in the backlog for 3.0.9, but I think the priority should be given to having fixes like this released. |
Hello @dvershinin , Just curious: have you confirmed that the existing fixes resolve the matter in your installation(s)? |
@martinhsv not that I can tell because we rely on strictly packaged installations based on tagged releases, so haven't really tested whether these changes resolve memory leaks but indeed those who reload nginx often are the ones affected. |
This is a proposed fix to address the most prominent remaining memory leak that can occur when doing nginx reload (but not restart).
The size of the memory leak is proportional to the number of '.conf' filenames being read in by the bison parser.