From fd22c1b9006ef4a40545b5c7b8f8fa611712b27b Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 12 Oct 2010 04:21:28 +0000 Subject: [PATCH] prefork MPM: Run cleanups for final request when process exits gracefully, in spite of faulty apr_reslist code. Backports: r943650 PR: 43857 Submitted by: Tom Donovan Reviewed by: trawick, rjung, wrowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1021621 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 22 ++++------------------ server/mpm/prefork/prefork.c | 5 +++++ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/CHANGES b/CHANGES index 92ccdee6d6e..09a2c64c8b2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@  -*- coding: utf-8 -*- Changes with Apache 2.2.17 + *) prefork MPM: Run cleanups for final request when process exits gracefully + to work around a flaw in apr-util. PR 43857. [Tom Donovan] + *) mod_reqtimeout: Do not wrongly enforce timeouts for mod_proxy's backend connections and other protocol handlers (like mod_ftp). Enforce the timeout for AP_MODE_GETLINE. If there is a timeout, shorten the lingering diff --git a/STATUS b/STATUS index ce7fb27d843..e74365971fb 100644 --- a/STATUS +++ b/STATUS @@ -84,27 +84,13 @@ CURRENT RELEASE NOTES: RELEASE SHOWSTOPPERS: + PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * prefork MPM: Run cleanups for final request when process exits gracefully. - PR: 43857 - Trunk patch: http://svn.apache.org/viewvc?rev=943650&view=rev - 2.2.x patch: Trunk patch works - (on hold) +1: trawick, rjung, wrowe - jorton points out that the problem symptom was probably the reslist - issue, which may have a better fix; also, this change could hide - other problems: - http://www.mail-archive.com/dev@apr.apache.org/msg23090.html - wrowe adds that the pre_cleanup registration is not in apr-util 1.3, it was - never backported, and that if this patch works, it's probably the best solve - for legacy 2.2. - jorton's requested footnotes for backport are at - http://mail-archives.apache.org/mod_mbox/httpd-dev/201010.mbox/%3C20101007095048.GA5423@redhat.com%3E - [/NOT/i redundant] - - - PATCHES PROPOSED TO BACKPORT FROM TRUNK: + + +PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] * unixd: set suexec_enabled correctly when httpd is run by non-root diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 28b60573f11..f5a72057bc7 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -679,6 +679,11 @@ static void child_main(int child_num_arg) die_now = 1; } } + /* This apr_pool_clear call is redundant, should be redundant, but compensates + * a flaw in the apr reslist code. This should be removed once that flaw has + * been addressed. + */ + apr_pool_clear(ptrans); clean_child_exit(0); } -- 2.47.2