Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2011 11:07:45 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        Daniil Cherednik <dcherednik@masterhost.ru>, freebsd-stable@freebsd.org
Subject:   Re: 8.2 + apache == a LOT of sigprocmask
Message-ID:  <20111115090745.GO50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <4EC17F57.5030008@FreeBSD.org>
References:  <4EC17AAF.9050807@FreeBSD.org> <4EC17F57.5030008@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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).

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEUEARECAAYFAk7CK+EACgkQC3+MBN1Mb4g34ACeIehqW4571CMhvULXoPb/YAmr
eCMAl2asO0EOax3iKkh0SMh81Y/X5Og=
=TdFv
-----END PGP SIGNATURE-----

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