Project

General

Profile

Actions

Bug #1358

closed

Gradual memory leak using reload (kill -USR2 $pid)

Added by Jay MJ over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Greetings,

Per discussion on mailing list, entering ticket for reproducible memory leak while using 'kill -USR2 pid' command to initiate a reload of the suricata process. Each time the reload function is called, allocated ram will typically double for suricata processes, eventually eating into swap. This appears regardless of capture method (tested and same using pcap live and af-packet).

Better memory management is needed to prevent this from happening.

  • My experience:
    Pulling new rules and reloading (via systemd unit as 'suri' user) every two hours caused all memory and swap to be consumed in 5 days (16/8 GB respectively). Testing with ad-hoc reloads reproduces memory allocation at about 1.5x - 2x memory allocation each time. I am running suricata 2.1beta2 64-bit (have not tested 2.0 series) on ArchLinux kernel 3.17.6-1-ARCH in VMware 11 environment (8 cores, 24 GB).
  • Mailing list, per Peter Manev:
    I was able to reproduce your behavior (on Ubuntu Trusty LTS, 3.13
    kernel) -> simple kill -USR pid on the latest dev while inspecting
    some traffic.
Actions

Also available in: Atom PDF