All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: burn@swtf.dyndns.org, linux-audit@redhat.com,
	Paul Moore <paul@paul-moore.com>
Cc: Richard Guy Briggs <rgb@redhat.com>,
	Linux Audit <linux-audit@redhat.com>
Subject: Re: Occasional delayed output of events
Date: Mon, 18 Jan 2021 09:31:51 -0500	[thread overview]
Message-ID: <3095712.44csPzL39Z@x2> (raw)
In-Reply-To: <17715c36170.27df.85c95baa4474aabc7814e68940a78392@paul-moore.com>

On Monday, January 18, 2021 8:54:30 AM EST Paul Moore wrote:
> >>> I like the N of M concept but there would be a LOT of change -
> >>> especially
> >>> for all the non-kernel event sources. The EOE would be the most
> >>> seamless, but at a cost. My preference is to allow the 2 second 'timer'
> >>> to be configurable.
> >> 
> >> Agree with Burn, numbering the records coming up from the kernel is
> >> going to be a real nightmare, and not something to consider lightly.
> >> Especially when it sounds like we don't yet have a root cause for the
> >> issue.
> > 
> > A very long time ago, we had numbered records. But it was decided that
> > there's no real point in it and we'd rather just save disk space.
> 
> With the current kernel code, adding numbered records is not something to
> take lightly.

That's why I'm saying we had it and it was removed. I could imagine that if 
you had auditing of the kill syscall enabled and a whole process group was 
being killed, you could have hundreds of records that need numbering. No good 
way to know in advance how many records make up the event.

> > I know that the kernel does not serialize the events headed for user
> > space. But I'm curious how an event gets stuck and others can jump ahead
> > while one that's already inflight can get hung for 4 seconds before it's
> > next record goes out?
> 
> Have you determined that the problem is the kernel? 

I assume so because the kernel adds the timestamp and choses what hits the 
socket next. Auditd does no ordering of events. It just looks up the text 
event ID, some minor translation if the enriched format is being used, and 
writes it to disk. It can handle well over 100k records per second.

> Initially it was looking like it was a userspace issue, is that no longer
> the general thought?

I don't see how user space could cause this. Even if auditd was slow, it 
shouldn't take 4 seconds to write to disk and then come back to read another 
record. And even it did, why would the newest record go out before completing 
one that's in progress? Something in the kernel chooses what's next. I 
suspect that might need looking at.

> Also, is there a reliable reproducer yet?

I don't know of one. But, I suppose we could modify ausearch to look for 
examples of this.

-Steve


--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


  reply	other threads:[~2021-01-18 14:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-01 21:22 Occasional delayed output of events Burn Alting
2021-01-03 15:41 ` Steve Grubb
2021-01-04  7:55   ` Burn Alting
2021-01-04 14:46     ` Steve Grubb
2021-01-04 20:12       ` Burn Alting
2021-01-10  4:39         ` Burn Alting
2021-01-15 22:18           ` Burn Alting
2021-01-16  0:35             ` Richard Guy Briggs
2021-01-16  2:42               ` Burn Alting
2021-01-17 14:07                 ` Paul Moore
2021-01-17 21:12                   ` Steve Grubb
2021-01-18 13:54                     ` Paul Moore
2021-01-18 14:31                       ` Steve Grubb [this message]
2021-01-18 20:34                         ` Burn Alting
2021-01-18 20:36                         ` Paul Moore
2021-01-19  8:18                           ` Burn Alting
2021-01-19 15:31                             ` Lenny Bruzenak
2021-01-19 19:11                             ` Paul Moore
2021-01-19 19:38                               ` Burn Alting
2021-01-19 20:26                                 ` Paul Moore
2021-01-19 21:51                                   ` Steve Grubb
2021-01-20  6:38                                     ` Burn Alting
2021-01-20 22:50                                       ` Paul Moore
2021-01-23 22:55                                         ` Burn Alting
2021-01-25 23:53                                           ` Steve Grubb
2021-01-26  0:11                                             ` Burn Alting
2021-01-26  0:20                                               ` Steve Grubb
2021-01-26  0:29                                                 ` Burn Alting
2021-01-26 11:53                                                   ` Burn Alting
2021-01-26 20:42                                                     ` Steve Grubb
2021-01-27 12:12                                                       ` Burn Alting
2021-01-19 20:42                               ` Richard Guy Briggs

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=3095712.44csPzL39Z@x2 \
    --to=sgrubb@redhat.com \
    --cc=burn@swtf.dyndns.org \
    --cc=linux-audit@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=rgb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.