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 AFC9919C28 for ; Sat, 19 Mar 2016 21:05:48 +0000 (UTC) Received: (qmail 78894 invoked by uid 500); 19 Mar 2016 21:05:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 78821 invoked by uid 500); 19 Mar 2016 21:05:47 -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 78811 invoked by uid 99); 19 Mar 2016 21:05:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Mar 2016 21:05:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 667C1C1425 for ; Sat, 19 Mar 2016 21:05:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.802 X-Spam-Level: X-Spam-Status: No, score=-0.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 48Ui48jNYhM0 for ; Sat, 19 Mar 2016 21:05:46 +0000 (UTC) Received: from mail-qg0-f46.google.com (mail-qg0-f46.google.com [209.85.192.46]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 0D3DB5FADB for ; Sat, 19 Mar 2016 21:05:46 +0000 (UTC) Received: by mail-qg0-f46.google.com with SMTP id w104so127915526qge.1 for ; Sat, 19 Mar 2016 14:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=qL48xyo3mhzyUqJhQFAt6Wycgn9cIpLieCrGVW/40Gw=; b=iilDDtMBrlXz2FOdIbiYO5hdC0cPnw7rDiLZr/ifrqoC/NWkJPDk13NVy26PdUI+XT 31SvNUKNTmg7Q+hlt+eqWiBbT0wJWsP1bMleRvGnU1391nk1U6OhuPs7oVK1DH3QIeQw HzqJPOiS1hAEmkSVi8CCrfZwIqzwrtY9t7IhOPUiCYJRmilV5oaUtu8ZiFjFefgn18Al WPoud0ZnGHXaqhSABrw/7nZWPY+pyjEvdxGKFe7ojwmWsSjX0dt8aWSM7QMZw9Z1A1B8 nfn/KHcn3A16u2rP/U5eqFnozBvIz02AFoYGXzXnYUuoGgWuGpuYk5J5QnLOXrY96VQy BLAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=qL48xyo3mhzyUqJhQFAt6Wycgn9cIpLieCrGVW/40Gw=; b=ENZMPrix6Pd1KzdTgb3XgOkg5Maln+JHoMIKZspEvFRx1AqsxDn0f2IV0KQoR0DAlO A1fM5TbPIjc9nvt/tiFH0q0t1jckO1eF66W2K0gCOeY5w2e+D7YMnTkizHRSziGgrPNT sKyyEQzMUfoxTR+78f1v9eiyscSsSmvr7WEsp3OF7erCWT4tlPSGK9E/7IORJcO1OaQn k8YUGDdDyxl2hUgbcueJRFIzxVbv9wlweIkzDCP9XZdSsbHKI76+YCkEK4kcZ6ihsQDD On5nywGp95fWRdzbw1x1hgyDFX++OOiNN3fOWOGytc3ldXPPI43avftMQH+wFh55fFfH TPiw== X-Gm-Message-State: AD7BkJILrLZ1v7ABUQj1sHsNjerKVQx9ln3VIq5BHnq4LooL6XwzMNoWhfbh29CNPFaN2RO2P9KV2qZ6LetgHg== MIME-Version: 1.0 X-Received: by 10.140.20.183 with SMTP id 52mr31513958qgj.38.1458421539001; Sat, 19 Mar 2016 14:05:39 -0700 (PDT) Received: by 10.55.10.7 with HTTP; Sat, 19 Mar 2016 14:05:38 -0700 (PDT) Date: Sat, 19 Mar 2016 22:05:38 +0100 Message-ID: Subject: mod_proxy_hcheck review.. From: Yann Ylavic To: httpd-dev Content-Type: text/plain; charset=UTF-8 The proposed backport patch (v2) does not contain mod_proxy_hcheck.c itself, so I took the one from trunk, easy enough :) The (recent) changes around the call to [ap_proxy_]is_socket_connected() in ap_proxy_connect_backend()) broke the patch too (minor change). Regarding the implementation, IIUC, there is a scheduled hc thread per BalancerMember, each running hc_check(). The threads are somehow run one child at a time, thanks to mod_watchdog, but I'm not too familiar with it, so I may have overlooked that... However, it seems that there are some paths where the worker threads can allocate on (or use) the server config pool (ctx->p, a subpool of pconf). This (AFAICT) concerns hc_get_hcworker(), hc_determine_connection(), hc_get_backend() (where backend->p == ctx->p ??) and hc_check_http(). Shouldn't we either use a lock or create a subpool there? Or maybe use ptemp but it looks more like a thread pool, whereas ctx->p usages seem more related to process wide initialization (once? via balancer-manager only?)... Thanks for clarifiying. Anyway, this is really cool stuff! Regards, Yann.