public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: Odd memory usage in auditd
Date: Thu, 7 Oct 2010 15:51:23 -0400	[thread overview]
Message-ID: <201010071551.23311.sgrubb@redhat.com> (raw)
In-Reply-To: <DF69A264612A3D4B961979B6957E8CFB0186F4D3@NEXCHANGE.nexor.co.uk>

On Thursday, October 07, 2010 05:52:49 am Ross Kirk wrote:
> Has anybody got any advice for the following problem? As I'm seeing some
> very odd behaviour with the auditd daemon in RHEL5.2 where under heavy
> system load the auditd process doesn't free any resources until all memory
> is consumed and the kernel kills the process with an Out Of Memory error.

I seem to recall something about disk flushing causing auditd to look like its 
the culprit. Do you have barriers enabled on ext3? You might also try setting 
the flushing to something else like none and see if that does anything.


> The system I have is a heavily customised RHEL5.2 with some fairly
> stringent auditing rules specified, the config is attached. In addition to
> these rules there will be various SELinux AVCs being raised as well as
> events from my own software so the auditing system is kept quite busy, see
> the attached report.txt for the aureport summary .

I don't see anything terribly unusual. The audit rules didn't make it, but the 
backlog setting is the only thing I would be interested in seeing.



> I can reproduce this behaviour consistently by generating a heavy system
> load (CPU 100% usage) while also generating a significant number of audit
> events. After about 20 minutes the auditd process will have grown from 8Mb
> of memory to around 1Gb;
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 
> 3037 root      16  -3 2763m 921m   16 S  3.7 91.2   0:26.49 auditd
> 
> If the system is kept busy eventually auditd will consume all the memory
> available on the system and the process be killed by the kernel with an
> Out Of Memory error.

Try playing with the disk flushing and let us know how that works out. There 
are no known memory leaks in recent version of auditd. I try to keep malloc 
down to a minimum to prevent this and memory fragmentation to creep in.

-Steve

  reply	other threads:[~2010-10-07 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  9:52 Odd memory usage in auditd Ross Kirk
2010-10-07 19:51 ` Steve Grubb [this message]
2010-10-11 15:50   ` Ross Kirk
2010-10-11 16:47     ` Steve Grubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201010071551.23311.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox