From owner-freebsd-stable@FreeBSD.ORG Tue Nov 15 09:20:15 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F841065672 for ; Tue, 15 Nov 2011 09:20:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 8CEEF8FC0A for ; Tue, 15 Nov 2011 09:20:14 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pAF97k9O046285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Nov 2011 11:07:47 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pAF97kVt002458; Tue, 15 Nov 2011 11:07:46 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pAF97kIX002457; Tue, 15 Nov 2011 11:07:46 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 Nov 2011 11:07:45 +0200 From: Kostik Belousov To: Doug Barton Message-ID: <20111115090745.GO50300@deviant.kiev.zoral.com.ua> References: <4EC17AAF.9050807@FreeBSD.org> <4EC17F57.5030008@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tB7rUN7dYh5/jfh0" Content-Disposition: inline In-Reply-To: <4EC17F57.5030008@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Daniil Cherednik , freebsd-stable@freebsd.org Subject: Re: 8.2 + apache == a LOT of sigprocmask X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2011 09:20:15 -0000 --tB7rUN7dYh5/jfh0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 14, 2011 at 12:51:35PM -0800, Doug Barton wrote: > On 11/14/2011 12:31, Doug Barton wrote: > > Trying to track down a load problem we're seeing on 8.2-RELEASE-p4 i386 > > in a busy web hosting environment I came across the following post: > >=20 > > http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/23452= 0.html > >=20 > > That basically describes what we're seeing as well, including the > > "doesn't happen on Linux" part. > >=20 > > Does anyone have any ideas about this? > >=20 > > With incredibly similar stuff running on 7.x we didn't see this problem, > > so it seems to be something new in 8. >=20 > Just took a closer look at our ktrace, and actually our pattern is > slightly different than the one in that post. In ours the second option > is null, but the third is set: >=20 > 74195 httpd 0.000017 RET sigprocmask 0 > 74195 httpd 0.000013 CALL sigprocmask(SIG_BLOCK,0,0xbfbf89d4) > 74195 httpd 0.000009 RET sigprocmask 0 > 74195 httpd 0.000013 CALL sigprocmask(SIG_BLOCK,0,0xbfbf89d4) > 74195 httpd 0.000009 RET sigprocmask 0 > 74195 httpd 0.000012 CALL sigprocmask(SIG_BLOCK,0,0xbfbf89d4) >=20 > But repeated hundreds of times in a row. The calls cannot come from rtld, they are generated by some setjmp() invocation. If signal-safety is not needed, sigsetjmp() should be used instead. Quick grep of the apache httpd source shows a single setjmp() in their copy of pcre. No idea is it to safe to change setjmp() into sigsetjmp(?, 0). --tB7rUN7dYh5/jfh0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEUEARECAAYFAk7CK+EACgkQC3+MBN1Mb4g34ACeIehqW4571CMhvULXoPb/YAmr eCMAl2asO0EOax3iKkh0SMh81Y/X5Og= =TdFv -----END PGP SIGNATURE----- --tB7rUN7dYh5/jfh0--