From 0465351e589232520750cac2a7f08bea2e46fe58 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Thu, 26 Dec 2013 18:25:04 +0000 Subject: [PATCH] mod_proxy_http: Core dumped under high load. PR 50335 trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1534321 http://svn.apache.org/viewvc?view=revision&revision=1550061 Submitted by: Jan Kaluza Reviewed by: jim, jorton, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1553540 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ modules/proxy/mod_proxy_http.c | 6 +++++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index baff16c911..0427552081 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.8 + * mod_proxy_http: Core dumped under high load. PR 50335 + [Jan Kaluza ] + *) mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size previously limited to 64MB. [Jens Låås ] diff --git a/STATUS b/STATUS index 7c55680290..a737d38cda 100644 --- a/STATUS +++ b/STATUS @@ -98,12 +98,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy_http: Core dumped under high load. Bugz 50335 - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1534321 - http://svn.apache.org/viewvc?view=revision&revision=1550061 - 2.4.x patches: trunk patches work - +1: jim, jorton, minfrin - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 714014de46..de7b5cdd90 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -710,7 +710,7 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r, force10 = 0; } - header_brigade = apr_brigade_create(p, origin->bucket_alloc); + header_brigade = apr_brigade_create(p, bucket_alloc); rv = ap_proxy_create_hdrbrgd(p, header_brigade, r, p_conn, worker, conf, uri, url, server_portstr, &old_cl_val, &old_te_val); @@ -1813,6 +1813,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, } } while (interim_response && (interim_response < AP_MAX_INTERIM_RESPONSES)); + /* We have to cleanup bb brigade, because buckets inserted to it could be + * created from scpool and this pool can be freed before this brigade. */ + apr_brigade_cleanup(bb); + /* See define of AP_MAX_INTERIM_RESPONSES for why */ if (interim_response >= AP_MAX_INTERIM_RESPONSES) { return ap_proxyerror(r, HTTP_BAD_GATEWAY, -- 2.40.0