Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 78232 invoked from network); 3 Nov 2010 23:57:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Nov 2010 23:57:41 -0000 Received: (qmail 89231 invoked by uid 500); 3 Nov 2010 23:58:11 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 89181 invoked by uid 500); 3 Nov 2010 23:58:11 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 89173 invoked by uid 99); 3 Nov 2010 23:58:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 23:58:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of minfrin@sharp.fm designates 72.32.122.20 as permitted sender) Received: from [72.32.122.20] (HELO chandler.sharp.fm) (72.32.122.20) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 23:58:02 +0000 Received: from chandler.sharp.fm (localhost [127.0.0.1]) by chandler.sharp.fm (Postfix) with ESMTP id 167AA238059 for ; Wed, 3 Nov 2010 18:57:41 -0500 (CDT) Received: from [10.0.0.251] (87-194-125-18.bethere.co.uk [87.194.125.18]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: minfrin@sharp.fm) by chandler.sharp.fm (Postfix) with ESMTP id 83D44238058 for ; Wed, 3 Nov 2010 18:57:39 -0500 (CDT) Message-Id: <6224351D-B10A-43C0-AC9C-5349C3BE4DDB@sharp.fm> From: Graham Leggett To: dev@httpd.apache.org In-Reply-To: <201011032128.12775.sf@sfritsch.de> Content-Type: multipart/mixed; boundary=Apple-Mail-23--863670964 Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Proxy regressions Date: Thu, 4 Nov 2010 01:57:37 +0200 References: <201011032112.06345.sf@sfritsch.de> <201011032128.12775.sf@sfritsch.de> X-Mailer: Apple Mail (2.936) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-23--863670964 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 03 Nov 2010, at 10:28 PM, Stefan Fritsch wrote: > Strange, I have these problems only with prefork, not with event. > But with event I get a segfault in the reslist cleanup code. > > Can somebody cross-check this? This smelled like a pool lifetime issue, and looking closer it looked like we were cleaning up a brigade after we had returned the backend to the pool. The attached patch stops the crash, and it seems to run at a sensible speed again (I suspect the late cleanup of the brigade was sending the code into a spin). Can you give it a try? One proxy test still fails though: t/modules/proxy.............ok 7/15# Failed test 10 in t/modules/ proxy.t at line 34 t/modules/proxy.............FAILED test 10 Failed 1/15 tests, 93.33% okay This fails because the first bucket of the response has been corrupted: graham-leggetts-macbook-pro-3:httpd-test minfrin$ curl http://localhost:8536/reverse/modules/cgi/nph-102.pl sl/2.3.9-dev OpenS I've seen this a few weeks ago and it went away, so I suspect this isn't proxy that's doing it. Need to dig further. Regards, Graham -- --Apple-Mail-23--863670964 Content-Disposition: attachment; filename=httpd-mod_proxy-poollifetimefix.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="httpd-mod_proxy-poollifetimefix.patch" Content-Transfer-Encoding: 7bit Index: modules/proxy/mod_proxy_http.c =================================================================== --- modules/proxy/mod_proxy_http.c (revision 1030656) +++ modules/proxy/mod_proxy_http.c (working copy) @@ -1902,9 +1902,10 @@ /* Switch the allocator lifetime of the buckets */ ap_proxy_buckets_lifetime_transform(r, bb, pass_bb); + apr_brigade_cleanup(bb); /* found the last brigade? */ - if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) { + if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(pass_bb))) { /* signal that we must leave */ finish = TRUE; @@ -1928,7 +1929,6 @@ } /* make sure we always clean up after ourselves */ - apr_brigade_cleanup(bb); apr_brigade_cleanup(pass_bb); } while (!finish); --Apple-Mail-23--863670964 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-23--863670964--