Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 20:12:20 -0700
From:      Peter Wemm <peter@wemm.org>
To:        svn-src-all@freebsd.org
Cc:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>, src-committers <src-committers@freebsd.org>, Hiroki Sato <hrs@freebsd.org>, Hiren Panchasara <hiren@freebsd.org>, svn-src-head@freebsd.org, Maxim Sobolev <sobomax@sippysoft.com>
Subject:   Re: svn commit: r316874 - head/sys/kern
Message-ID:  <2109294.KVn8xeR1jZ@overcee.wemm.org>
In-Reply-To: <13691757.t3s7Qik7v1@overcee.wemm.org>
References:  <201704141723.v3EHNS3B043902@repo.freebsd.org> <C976394B-87C9-40E5-A66D-951B77D7982D@gmail.com> <13691757.t3s7Qik7v1@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1786590.cuBigVQMDk
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

On Friday, April 14, 2017 07:36:55 PM Peter Wemm wrote:
> On Friday, April 14, 2017 02:14:16 PM Ngie Cooper wrote:
> > > On Apr 14, 2017, at 14:10, Maxim Sobolev <sobomax@sippysoft.com> =
wrote:
> > >=20
> > > Peter, Ngie,
> > >=20
> > > Looks like out of that refactoring came a logical bug that is pre=
sent in
> > > the head, which causes syslod to first to shutdown the socket for=

> > > reading
> > > and then try to select/recv on it (which is somewhat stupid). And=
 that
> > > issue has been masked by shutdown() on datagram socket becoming
> > > effectively a NOP in 11 & head 20 months ago. It only affects hea=
d
> > > though, 11-stable still has the old code which does not include t=
hat
> > > half-closed socket into the select list. Attached patch is expect=
ed to
> > > fix head, Peter, it would be nice if you can give it a try (resto=
ring
> > > latest changes into uipc_sockets.c) and let me know if it helps.
> > >=20
> > > Thanks!
> >=20
> > CCing hrs@ for input as he did the refactoring.
> > Thanks!
> > -Ngie
> >=20
> > PS LGTM with the change. Will wait for feedback from wemm@.
>=20
> This is definitely not working.  I get ENOSPC  and listen queue overf=
lows on
> /var/run/logpriv now.
>=20
> Grabbing an old 10.3 /usr/sbin/syslogd and placing it on the top of t=
he 12.x
> one worked fine, aside from the include statements.

This can't be right:
                 if (SecureMode || res->ai_family =3D=3D AF_LOCAL) {
                        /* Forbid communication in secure mode. */
                        if (shutdown(s, SHUT_RD) < 0 &&
                            errno !=3D ENOTCONN) {
                                logerror("shutdown");
                                if (!Debug)
                                        die(0);
                        }
                        dprintf("listening on socket\n");
                        sl_recv =3D NULL;
                   }

This appears to disable unix domain sockets like /var/run/log and=20
/var/run/logpriv.

=2D-
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI=
6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
--nextPart1786590.cuBigVQMDk
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQEzBAABCAAdFiEEBgrA0Vr/vfNVuPoUNdaXCeyAngQFAljxj5UACgkQNdaXCeyA
ngQ3sQf/cDAHTNNMDmJHh7PtKclwVJGRNNWkRZ5dEfS5ES6eLB9+QZta48WStxby
9/0dTRJ2HjBctbVw+LpjCxVt0rEljCI3MNmYm+6mCOWSzeGhswGvfFjaHFASxXCT
Im0MNV47FEhupGvYbC1m+Lq1nB8v/91E4Rb0R/pr1eSVjlsidUOj60VL7J31p3Ge
OuuPn65pIT9AJLaMm17pvvujy5Y3lnvz1fRPFmNSiwRqK+v8UULRS08NttFebU+Q
1L1RlWJjc/voemKCslc14ET5x6Wz8MOorHKABFxgSrTksPkWbE0bwN0bVu/yO6tI
QGb1a5oESB2F4TpqB7bJ8Vyp7KCtMg==
=ErrD
-----END PGP SIGNATURE-----

--nextPart1786590.cuBigVQMDk--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2109294.KVn8xeR1jZ>