Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09C737FFC for ; Thu, 27 Oct 2011 02:17:10 +0000 (UTC) Received: (qmail 78845 invoked by uid 500); 27 Oct 2011 02:17:09 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 78821 invoked by uid 500); 27 Oct 2011 02:17:08 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 78814 invoked by uid 99); 27 Oct 2011 02:17:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 02:17:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.160.177] (HELO mail-gy0-f177.google.com) (209.85.160.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 02:17:03 +0000 Received: by gyd10 with SMTP id 10so2865114gyd.22 for ; Wed, 26 Oct 2011 19:16:42 -0700 (PDT) Received: by 10.68.74.227 with SMTP id x3mr71333612pbv.51.1319681802150; Wed, 26 Oct 2011 19:16:42 -0700 (PDT) Received: from harpua.redhotpenguin.com (c-67-169-76-3.hsd1.ca.comcast.net. [67.169.76.3]) by mx.google.com with ESMTPS id ml4sm10531481pbc.0.2011.10.26.19.16.40 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Oct 2011 19:16:41 -0700 (PDT) Date: Wed, 26 Oct 2011 19:16:39 -0700 From: Fred Moyer To: Max Barry Cc: modperl@perl.apache.org Message-ID: In-Reply-To: <4EA88476.7000507@maxbarry.com> References: <4EA78501.7060502@maxbarry.com> <4EA88476.7000507@maxbarry.com> Subject: Re: Apache Children Stuck on futex X-Mailer: sparrow 1.4 (build 904) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Have you tried this with mod_perl 2.0.5, or 2.0.6-dev? May have been resolved already. On Wednesday, October 26, 2011 at 3:06 PM, Max Barry wrote: > > On 26/10/11 14:56, Max Barry wrote: > > I'm trying to solve a long-running problem whereby my Apache mod_perl > > processes get stuck in a "FUTEX_WAIT" state instead of exiting. > > > > I believe this is the same issue as reported here: > > http://www.gossamer-threads.com/lists/modperl/modperl/99879 > > > > The problem occurs fairly frequently following a burst of traffic, when > > Apache spawns new processes, then attempts to cull them afterward. It > > also occurred, before I disabled this, when Apache tried to cull a > > process upon reaching MaxRequestsPerChild. > > Further to this, I've found that the problem occurs even on a fresh > Apache/mod_perl install; i.e. after completely removing Apache & > mod_perl, including /etc/apache2/, and doing only this: > > 1. sudo apt-get install apache2-mpm-worker libapache2-mod-perl2 > apache2-doc > > 2. Edit the 'default' site thusly: > > --- /etc/apache2/sites-available/default.original 2011-10-27 > 08:44:11.383803928 +1100 > +++ /etc/apache2/sites-available/default 2011-10-27 08:44:51.795391116 +1100 > @@ -19,6 +19,9 @@ > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > + > + SetHandler perl-script > + PerlResponseHandler ModPerl::RegistryBB > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > 3. Add a low 'MaxRequestsPerChild' directive (not strictly necessary, > but makes the problem much more visible): > > --- /etc/apache2/httpd.conf.original 2011-10-27 08:52:48.898361041 +1100 > +++ /etc/apache2/httpd.conf 2011-10-27 08:58:52.384091605 +1100 > @@ -0,0 +1 @@ > +MaxRequestsPerChild 10 > > 4. sudo /etc/init.d/apache2 restart > > 5. ab -n 450 -c 175 http://localhost/cgi-bin/ > > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking localhost (be patient) > Completed 100 requests > Completed 200 requests > Completed 300 requests > Completed 400 requests > apr_poll: The timeout specified has expired (70007) > Total of 426 requests completed > > (The number "426" above varies: sometimes it's as low as 400, sometimes > all requests complete. Usually, though, it's around 430.) > > I've also established that: > > * The problem occurs regardless of whether ModPerl::Registry, > ModPerl::RegistryBB, or ModPerl::PerlRun is used. > > * The problem occurs even when all Apache modules are disabled except > for alias, authz_host, and mod_perl. > > * The problem occurs even when no script is being run: i.e. Apache is > asked for "/cgi-bin/nonexistentscript.cgi", or just "/cgi-bin/". > > This is pretty perplexing. > > Max.