[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: mdev -d can (silently) die with "read: no buffer space available"
From:       Jan =?iso-8859-1?Q?Kl=F6tzke?= <jan () kloetzke ! net>
Date:       2019-12-16 21:29:35
Message-ID: 20191216212935.GC6138 () tuxedo
[Download RAW message or body]

On Mon, Dec 16, 2019 at 04:53:32PM +1000, Alexander Zangerl wrote:
> On Sun, 15 Dec 2019 22:15:21 +0100, Jan Kl=C3=B6tzke writes:
> >On Sun, Dec 15, 2019 at 08:44:14AM +1000, Alexander Zangerl wrote:
> >> i only increased BUFFER_SIZE.
> ...
> >This is strange. The read() call will always return a single event.
> =

> sorry - i spoke too early; my mdev with 64kb BUFFER_SIZE and 2mb RCVBUF
> did die in the meantime, after one of my laptop's suspend-resume cycles.
> upping BUFFER_SIZE is clearly not sufficient.
> =

> >OTOH udevd seems to use a whooping 128MiB for the netlink socket receive
> >buffer. And the ENOBUFS error is exactly what should be returned if the
> >receive buffer overflows.
> =

> i'll experiment with bigger RCVBUF sizes over the next week or so and
> will report back then.

:+1:

> >Hmm, adding a stat() for each event that is processed does not seem
> >right. In the normal case there will never be a mdev.log...
> =

> access("/dev/mdev.log",F_OK) would also work. i'm happy with any solution
> that makes mdev easier to debug, i just saw the stat/access approach as t=
he
> least intrusive and smallest possible change.
> =

> >As a user that's what I would expect from a daemon: reload the
> >configuration on SIGHUP and do a log-rotation on SIGUSR1. I think the
> >patch won't be big to implement that.
> =

> if you do work on that sleeker setup with config rereading then you
> might want to take a brief look at the line numbers logged by the mdev
> daemon: right now it always says "rule matched, line -1" regardless of
> what line (if any) does match.

I'll solve that too. It looks like an easy fix.

/Jan
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic