svn commit: r316874 - head/sys/kern
Peter Wemm
peter at wemm.org
Sat Apr 15 02:32:39 UTC 2017
On Friday, April 14, 2017 02:21:05 PM Maxim Sobolev wrote:
> Peter, It is actually the other way around. If you take syslogd code out of
> 11-stable and earlier that would work just fine with or without r316874.
> But since r285910 syslogd in head had been refactored a lot and I think
> that particular bug has introduced that has been masked by the shutdown()
> on datagram sockets becoming a NOP after r285910. Then r316874 restored our
> historical behavior for the shutdown(2) and bingo, bug in the new syslogd
> code is now causing it to spin when shutdown() != NOP.
>
> -Max
Hmm, there's a new problem:
45104 auditd CALL socket(PF_LOCAL,0x10000002<SOCK_DGRAM|SOCK_CLOEXEC>,0)
45104 auditd RET socket 3
45104 auditd CALL connect(0x3,0x7fffffffdbd8,0x6a)
45104 auditd STRU struct sockaddr { AF_LOCAL, /var/run/logpriv }
45104 auditd NAMI "/var/run/logpriv"
45104 auditd RET connect 0
45104 auditd CALL sendto(0x3,0x7fffffffe130,0x2f,0,0,0)
45104 auditd RET sendto -1 errno 55 No buffer space available
45104 auditd CALL open(0x800da5c67,0x100005<O_WRONLY|O_NONBLOCK|
O_CLOEXEC>)
45104 auditd NAMI "/dev/console"
45104 auditd RET open 4
.. and it all goes to /dev/console instead.
On restarting syslogd:
Apr 15 02:17:43 repoman2 syslogd: exiting on signal 15
sonewconn: pcb 0xfffff80051e72680: Listen queue overflow: 16 already in queue
already
Umm.. did the patch forget to listen to incoming connections or something?
I haven't seen this before anywhere except when syslogd is wedged.
>
> On Fri, Apr 14, 2017 at 12:46 PM, Peter Wemm <peter at wemm.org> wrote:
> > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote:
> > > Thanks, Peter. I will try to look into this asap.
> >
> > I don't understand what is going on yet. Presumably there must be other
> > changes in play that affect udp/select sometime between the original 2015
> > change and this. The syslogd -s code is Old(TM). I'm also wondering
> > whether
> > the -s code even works at all since the 2015 / r285910 change...
> >
> > > -Max
> > >
> > > On Apr 14, 2017 12:32 PM, "Peter Wemm" <peter at wemm.org> wrote:
> > > > On Friday, April 14, 2017 11:49:26 AM Peter Wemm wrote:
> > > > > On Friday, April 14, 2017 05:23:28 PM Maxim Sobolev wrote:
> > > > > > Author: sobomax
> > > > > > Date: Fri Apr 14 17:23:28 2017
> > > > > > New Revision: 316874
> > > > > > URL: https://svnweb.freebsd.org/changeset/base/316874
> > > > > >
> > > > > > Log:
> > > > > > Restore ability to shutdown DGRAM sockets, still forcing
> >
> > ENOTCONN to
> >
> > > > be
> > > >
> > > > > > returned by the shutdown(2) system call. This ability has been
> >
> > lost as
> >
> > > > > > part
> > > > > > of the svn revision 285910.
> > > > > >
> > > > > > Reviewed by: ed, rwatson, glebius, hiren
> > > > > > MFC after: 2 weeks
> > > > > > Differential Revision: https://reviews.freebsd.org/D10351
> > > > >
> > > > > This appears to have broken syslogd and had a major change in
> >
> > behavior
> >
> > > > with
> > > >
> > > > > regards to select(2).
> > > > >
> > > > > If you run syslogd with the -s flag (which is default), it now spins
> >
> > at
> >
> > > > 100%
> > > >
> > > > > cpu as all the shutdown sockets now return readable from select.
> > > > >
> > > > > Old releases / jails also manifest this behavor. If it wasn't for
> > > > > losing
> > > > > the ability to run old branch binaries I'd suggest changing syslogd
> > > > > instead, but we depend on this in the cluster and I expect others do
> > > > > too.
> > > > >
> > > > > I'm not 100% certain that this change is the culprit but a heads-up
> > > > > can't
> > > > > hurt. I'll try reverting it on the freebsd cluster next, after
> > > > > fixing
> > > > > the
> > > > > broken auditing changes.
> > > > >
> > > > > -Peter
> > > >
> > > > I can confirm that reverting r316874 fixes syslogd and backwards
> > > > compatability
> > > > with old branches.
> > > >
> > > > --
> > > > Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com;
> > > > KI6FJV
> > > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
> >
> > --
> > Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com;
> > KI6FJV
> > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
--
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170414/61c09576/attachment.sig>
More information about the svn-src-all
mailing list