From owner-freebsd-stable@FreeBSD.ORG Tue Nov 15 10:09:07 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 756981065672 for ; Tue, 15 Nov 2011 10:09:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta07.westchester.pa.mail.comcast.net (qmta07.westchester.pa.mail.comcast.net [76.96.62.64]) by mx1.freebsd.org (Postfix) with ESMTP id 21CA28FC0A for ; Tue, 15 Nov 2011 10:09:06 +0000 (UTC) Received: from omta24.westchester.pa.mail.comcast.net ([76.96.62.76]) by qmta07.westchester.pa.mail.comcast.net with comcast id xN8G1h0011ei1Bg57N97yk; Tue, 15 Nov 2011 10:09:07 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta24.westchester.pa.mail.comcast.net with comcast id xN951h0151t3BNj3kN96c0; Tue, 15 Nov 2011 10:09:07 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 7366E102C1D; Tue, 15 Nov 2011 02:09:04 -0800 (PST) Date: Tue, 15 Nov 2011 02:09:04 -0800 From: Jeremy Chadwick To: Kostik Belousov Message-ID: <20111115100904.GA92795@icarus.home.lan> References: <4EC17AAF.9050807@FreeBSD.org> <4EC17F57.5030008@FreeBSD.org> <20111115090745.GO50300@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111115090745.GO50300@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Daniil Cherednik , Doug Barton , freebsd-stable@freebsd.org, freebsd-apache@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 10:09:07 -0000 On Tue, Nov 15, 2011 at 11:07:45AM +0200, Kostik Belousov wrote: > 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: > > > > > > http://lists.freebsd.org/pipermail/freebsd-questions/2011-October/234520.html > > > > > > That basically describes what we're seeing as well, including the > > > "doesn't happen on Linux" part. > > > > > > Does anyone have any ideas about this? > > > > > > With incredibly similar stuff running on 7.x we didn't see this problem, > > > so it seems to be something new in 8. > > > > 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: > > > > 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) > > > > 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). I hate cross-posting, but: adding freebsd-apache@ to the list. Some of the Apache folks (not just port committers) may have some insight to Kostik's findings. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |