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 16EE6426A for ; Fri, 17 Jun 2011 13:42:54 +0000 (UTC) Received: (qmail 14700 invoked by uid 500); 17 Jun 2011 13:42:53 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 14650 invoked by uid 500); 17 Jun 2011 13:42:53 -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 14642 invoked by uid 99); 17 Jun 2011 13:42:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 13:42:53 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jorton@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 13:42:46 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5HDgP4K032320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Jun 2011 09:42:25 -0400 Received: from turnip.manyfish.co.uk (vpn-10-98.rdu.redhat.com [10.11.10.98]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5HDgNC3016178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 17 Jun 2011 09:42:24 -0400 Received: from jorton by turnip.manyfish.co.uk with local (Exim 4.72) (envelope-from ) id 1QXZJW-00021E-Ha for dev@httpd.apache.org; Fri, 17 Jun 2011 14:42:22 +0100 Date: Fri, 17 Jun 2011 14:42:22 +0100 From: Joe Orton To: dev@httpd.apache.org Subject: mod_slotmem_shm pool handling Message-ID: <20110617134222.GA6850@redhat.com> Mail-Followup-To: dev@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) Organization: Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 mod_slotmem_shm is creating a subpool of pconf ("gpool") in the pre_config hook. It then hangs a cleanup off pconf in the post_config hook, which uses something with the structures in "gpool". This doesn't work (and segfaults with APR pool debugging) because the gpool contents are invalidated by the time the cleanup runs. Patch below moves the cleanup to the "gpool", which avoids the problem and doesn't seem to break anything else, but the subpool is never cleared or destroyed... so could we just remove the subpool altogether? (Is there is an unfullfilled intention to bound memory use across generations here perhaps?) Index: mod_slotmem_shm.c =================================================================== --- mod_slotmem_shm.c (revision 1136832) +++ mod_slotmem_shm.c (working copy) @@ -643,7 +643,7 @@ static int post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { - slotmem_shm_initialize_cleanup(p); + slotmem_shm_initialize_cleanup(gpool); return OK; }