Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A568C18718 for ; Mon, 24 Aug 2015 14:58:37 +0000 (UTC) Received: (qmail 33469 invoked by uid 500); 24 Aug 2015 14:58:37 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 33399 invoked by uid 500); 24 Aug 2015 14:58:37 -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 33389 invoked by uid 99); 24 Aug 2015 14:58:37 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 14:58:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9DF3518034C for ; Mon, 24 Aug 2015 14:58:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.008 X-Spam-Level: X-Spam-Status: No, score=-0.008 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.006, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id o1se1He678xr for ; Mon, 24 Aug 2015 14:58:35 +0000 (UTC) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 74F4A42921 for ; Mon, 24 Aug 2015 14:58:35 +0000 (UTC) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C3BF1A2C22 for ; Mon, 24 Aug 2015 14:58:34 +0000 (UTC) Received: from dhcp-24-191.brq.redhat.com (vpn1-7-150.ams2.redhat.com [10.36.7.150]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7OEwXgQ021615 for ; Mon, 24 Aug 2015 10:58:34 -0400 Message-ID: <55DB3119.4060208@redhat.com> Date: Mon, 24 Aug 2015 16:58:33 +0200 From: =?UTF-8?B?SmFuIEthbHXFvmE=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: PR 58267: Regression in 2.2.31 caused by r1680920 References: <55DB2E9A.10307@redhat.com> In-Reply-To: <55DB2E9A.10307@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 On 08/24/2015 04:47 PM, Jan Kaluža wrote: > Hi, > > unfortunately, the r1680920 brought undesired behavior described in PR > 58267 to 2.2.x. The bug is well described in the PR, so I won't describe > it in this email. > > I have tried to debug it and I think the problem is that we use also > server->server_hostname to compute the hash in the > ap_proxy_set_scoreboard_lb. This hash is used to find out proper > ap_scoreboard field. > > It all happens in mod_proxy.c:child_init's scope. > > If the "" has been defined, all the > BalancerMembers are initialized with the hash computed with usage of > global server->server_hostname. > > Later, if the "ProxyPass /foobar/ Balancer://foobar/" has been used in > the VirtualHost, ap_proxy_initialize_worker_share is called again with > server->server_hostname set to the VirtualHost's one. > > Now, the root of the error is that the scoreboard size is static (set to > proxy_lb_workers + PROXY_DYNAMIC_BALANCER_LIMIT), but it is not > incremented when ProxyPass with balancer is used in the virtualhost. > This leads to lack of space in scoreboard when Balancers are used in > multiple virtualhosts. > > I think there are two possible fixes: > > 1) Do not use server->server_hostname when computing hash which is used > to determine right scoreboard field. I think this would fix this bug, > but I'm not sure what would happen in situations when you define 2 > balancers with the same name in different virtualhosts... > > On the other-side, when there is global Proxy balancer, it make sense to > use the same worker->s for all the ProxyPass in virtualhosts. It seems that 2.4.x uses just the name of the worker to determine slot for shared memory, so maybe it wouldn't be a problem for 2.2.x too... Jan Kaluza > 2) Increment proxy_lb_workers according to number of workers in balancer > when using "ProxyPass /foobar/ Balancer://foobar/" in the VirtualHost. > The scoreboard would have right size and ap_proxy_set_scoreboard_lb > would not fail then. > > > Since it's 2.2.x which should be probably stable without big changes, > I'm asking the list for more opinions... I will try to implement patch > for option 2) tomorrow and see if this really fixes the issue. > > Regards, > Jan Kaluza