From owner-svn-src-head@freebsd.org Sat Apr 15 02:32:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E73B8D3EB14; Sat, 15 Apr 2017 02:32:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C90ED1F5; Sat, 15 Apr 2017 02:32:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 52AA14E1; Fri, 14 Apr 2017 19:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1492223558; bh=+oGZTFoQn2TkAKJP/d4Kr4khMczEO+XEnmZQb8Q/WWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WrDEOdybLm4i1tJ7+JYBFallGREa/0MiYHQv8symN+0X1XN7SPkc1Vvg5jO7V9nLx fmsGhZciFd2JuLjwwO+uMbeM9+hOA6+1QDSs8bBb2mVE7ghpnIyIuKpTa8X3wXQBs9 WC5NO0valg/3/PP6WriK+RCGT+Sg0Znk34ZuW4fg= From: Peter Wemm To: Maxim Sobolev Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Hiren Panchasara Subject: Re: svn commit: r316874 - head/sys/kern Date: Fri, 14 Apr 2017 19:32:33 -0700 Message-ID: <6546471.KH0i3bg3hj@overcee.wemm.org> User-Agent: KMail/4.14.10 (FreeBSD/12.0-CURRENT; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201704141723.v3EHNS3B043902@repo.freebsd.org> <6942092.OsECkgAp13@overcee.wemm.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2010007.ntouo2SN7c"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Apr 2017 02:32:39 -0000 --nextPart2010007.ntouo2SN7c Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" 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 r3168= 74. > But since r285910 syslogd in head had been refactored a lot and I thi= nk > that particular bug has introduced that has been masked by the shutdo= wn() > on datagram sockets becoming a NOP after r285910. Then r316874 restor= ed our > historical behavior for the shutdown(2) and bingo, bug in the new sys= logd > code is now causing it to spin when shutdown() !=3D NOP. >=20 > -Max Hmm, there's a new problem: 45104 auditd CALL socket(PF_LOCAL,0x10000002,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) 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=20 already Umm.. did the patch forget to listen to incoming connections or somethi= ng? I haven't seen this before anywhere except when syslogd is wedged. >=20 > On Fri, Apr 14, 2017 at 12:46 PM, Peter Wemm wrote: > > On Friday, April 14, 2017 12:41:52 PM Maxim Sobolev wrote: > > > Thanks, Peter. I will try to look into this asap. > >=20 > > I don't understand what is going on yet. Presumably there must be o= ther > > changes in play that affect udp/select sometime between the origina= l 2015 > > change and this. The syslogd -s code is Old(TM). I'm also wonderin= g > > whether > > the -s code even works at all since the 2015 / r285910 change... > >=20 > > > -Max > > >=20 > > > On Apr 14, 2017 12:32 PM, "Peter Wemm" 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 > > > > > >=20 > > > > > > Log: > > > > > > Restore ability to shutdown DGRAM sockets, still forcing > >=20 > > ENOTCONN to > >=20 > > > > be > > > >=20 > > > > > > returned by the shutdown(2) system call. This ability has b= een > >=20 > > lost as > >=20 > > > > > > part > > > > > > of the svn revision 285910. > > > > > >=20 > > > > > > Reviewed by: ed, rwatson, glebius, hiren > > > > > > MFC after: 2 weeks > > > > > > Differential Revision: https://reviews.freebsd.org/D10= 351 > > > > >=20 > > > > > This appears to have broken syslogd and had a major change in= > >=20 > > behavior > >=20 > > > > with > > > >=20 > > > > > regards to select(2). > > > > >=20 > > > > > If you run syslogd with the -s flag (which is default), it no= w spins > >=20 > > at > >=20 > > > > 100% > > > >=20 > > > > > cpu as all the shutdown sockets now return readable from sele= ct. > > > > >=20 > > > > > Old releases / jails also manifest this behavor. If it wasn'= t for > > > > > losing > > > > > the ability to run old branch binaries I'd suggest changing s= yslogd > > > > > instead, but we depend on this in the cluster and I expect ot= hers do > > > > > too. > > > > >=20 > > > > > I'm not 100% certain that this change is the culprit but a he= ads-up > > > > > can't > > > > > hurt. I'll try reverting it on the freebsd cluster next, afte= r > > > > > fixing > > > > > the > > > > > broken auditing changes. > > > > >=20 > > > > > -Peter > > > >=20 > > > > I can confirm that reverting r316874 fixes syslogd and backward= s > > > > compatability > > > > with old branches. > > > >=20 > > > > -- > > > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc= .com; > > > > KI6FJV > > > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246= > >=20 > > -- > > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com= ; > > KI6FJV > > UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 =2D-=20 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 --nextPart2010007.ntouo2SN7c 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/vfNVuPoUNdaXCeyAngQFAljxhkEACgkQNdaXCeyA ngSYuwgAiYaKQFKr1C2yjuahP9uc782BCIvuvn7w+Eb+WzfU966Jh87jQlmzswxT ukf1hVk96LPALs55NqX6Z1ZfZ2oa0YN92dZ1px0+AryrAx+CPpgYYe+2Yrf3vYHu i84Z6ZgZjPb0Uf5Nmk7l8ypWHNxvCHZoyJDvFzwFbMECVrur1r6gYY76M3YCR2UK xQsKIrypebjc8j0Qe+GPLCOpaibYXRSA0Vl63pyp05aEf9KVN5PWjwmlnRHFNSh3 DH6O5vucb5IugU88FVNoxBJX8LmoRy6JI/ewyuDphKgquu45gRxFffaTAsO9wG/Y fNr5yzkas9EbmwLaTjOiOsh6/u4Jyg== =KM3L -----END PGP SIGNATURE----- --nextPart2010007.ntouo2SN7c--