From: Stefan Fritsch Date: Mon, 14 Jun 2010 19:07:02 +0000 (+0000) Subject: Change the eor bucket to use a pre-cleanup to run the log transaction hook. X-Git-Tag: 2.3.7~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1e908605507bb1fade55d35a517997584a044d1;p=apache Change the eor bucket to use a pre-cleanup to run the log transaction hook. This fixes some segfaults. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@954590 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index b1d1c7945e..9ea728164a 100644 --- a/STATUS +++ b/STATUS @@ -75,6 +75,8 @@ RELEASE SHOWSTOPPERS: http://marc.info/?l=apache-httpd-dev&m=123910381908293&w=1 + sf: Has been changed to a pre-cleanup and should be ok now. + * MPM event (maybe others, too) closes open files only after the connection has been closed. This could be fixed in apr-util or httpd: http://mail-archives.apache.org/mod_mbox/httpd-dev/201005.mbox/<201005172311.39558.sf@sfritsch.de> diff --git a/server/eor_bucket.c b/server/eor_bucket.c index b758bc9243..4d3e1ecfbe 100644 --- a/server/eor_bucket.c +++ b/server/eor_bucket.c @@ -73,9 +73,10 @@ AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list, * e.g. the parent pool of the request pool. In this case * eor_bucket_destroy might be called at a point of time when the * request pool had been already destroyed. + * We need to use a pre-cleanup here because a module may create a + * sub-pool which is still needed during the log_transaction hook. */ - apr_pool_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup, - apr_pool_cleanup_null); + apr_pool_pre_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup); } return ap_bucket_eor_make(b, r); }