Skip to content

Memory leak #7

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

Closed
LinuxJedi opened this issue Feb 16, 2016 · 6 comments
Closed

Memory leak #7

LinuxJedi opened this issue Feb 16, 2016 · 6 comments
Assignees

Comments

@LinuxJedi
Copy link
Contributor

I haven't fully diagnosed the leak yet but I've managed to get some readouts in the attached massif output in the hope it will aid you in finding the route cause.

The leak appears to happen when using this:

SecRule ARGS "@contains test" "id:50,auditlog,phase:2,t:trim,block"

As part of the following:

  modsecurity_rules '
    SecRuleEngine On
    SecAuditEngine On
    SecAuditLogParts ABCIFHZ
    SecAuditLogType Serial
    SecAuditLog /tmp/audit.log
    SecRule ARGS "@contains test" "id:50,auditlog,phase:2,t:trim,block"
    SecRule ARGS "@streq block403" "id:11,phase:1,status:403,block"
    SecRule ARGS "@streq redirect302" "id:3,phase:1,status:302,redirect:http://www.modsecurity.org"

  ';

Several KB appear to be leaked on every request which significantly grows over time.

massif.out.11899.zip

@zimmerle zimmerle self-assigned this Feb 16, 2016
@zimmerle
Copy link
Contributor

Hi @LinuxJedi,

Good observation. I am investigating.

@zimmerle
Copy link
Contributor

Hi @LinuxJedi,

I have made a good improvement on the memory management in general. There isn't a linear growth anymore. I am not closing this issue yet because I want to test with the full OWASP CRS before consider it done. Tomorrow I will continue with the tests.

@zimmerle
Copy link
Contributor

Closing this issue after test with OWASP CRS. No leak was identified.

@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Jun 8, 2016

@zimmerle did your changes for memory management optimization get committed? I've been playing around with this some more and noticing non-trivial leaks that seem to correspond with what @LinuxJedi found. I can provide some more debug info if you need.

@zimmerle
Copy link
Contributor

zimmerle commented Jun 8, 2016

Hi @p0pr0ck5,

Yes, those modifications were committed. @LinuxJedi also reported other memory issues here: owasp-modsecurity/ModSecurity#1078 some of those may lead to memory leak.

It will be very helpful if you can attach the massif output of your findings on owasp-modsecurity/ModSecurity#1078

@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Jun 8, 2016

Silly me, I should have realized that the commit went to libmodsec, not this connector :p I'll do more debugging and ensure a clean build, and toss up some debug info tomorrow.

dennus pushed a commit to dennus/ModSecurity-nginx that referenced this issue Apr 23, 2018
…rity from fix/by_address_sanitizer_notes to develop

* commit 'ad071ca5f518d98af21d5fc730bbb87f01a0bc3a':
  Minor fixes for notes from AddressSanitizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants