diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/patches/00list | 1 | ||||
-rwxr-xr-x | debian/patches/054_reduce_mem_usage.dpatch | 57 |
3 files changed, 61 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 7de9034e..b6fe7d19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ apache2 (2.2.6-3) UNRELEASED; urgency=low * Add Homepage field to debian/control. + * Allocate fewer bucket brigades in case of a flush bucket. This might help + with the memory leaks reportet in #399776 and #421557. - -- Stefan Fritsch <sf@debian.org> Tue, 04 Dec 2007 22:47:32 +0100 + -- Stefan Fritsch <sf@debian.org> Tue, 04 Dec 2007 22:59:20 +0100 apache2 (2.2.6-2) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index 4c3d9530..4c574449 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -18,3 +18,4 @@ 099_config_guess_sub_update 052_logresolve_linelength.dpatch 053_bad_file_descriptor_PR42829.dpatch +054_reduce_mem_usage.dpatch diff --git a/debian/patches/054_reduce_mem_usage.dpatch b/debian/patches/054_reduce_mem_usage.dpatch new file mode 100755 index 00000000..5300b8f9 --- /dev/null +++ b/debian/patches/054_reduce_mem_usage.dpatch @@ -0,0 +1,57 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 054_reduce_mem_usage.dpatch by Stefan Fritsch <sf@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Allocate fewer bucket brigades in case of a flush bucket. +## DP: Might help with #399776 and #421557 + +@DPATCH@ +diff -urNad trunk~/modules/http/chunk_filter.c trunk/modules/http/chunk_filter.c +--- trunk~/modules/http/chunk_filter.c 2006-07-12 05:38:44.000000000 +0200 ++++ trunk/modules/http/chunk_filter.c 2007-12-02 18:52:20.955996723 +0100 +@@ -85,7 +85,9 @@ + } + if (APR_BUCKET_IS_FLUSH(e)) { + flush = e; +- more = apr_brigade_split(b, APR_BUCKET_NEXT(e)); ++ if (e != APR_BRIGADE_LAST(b)) { ++ more = apr_brigade_split(b, APR_BUCKET_NEXT(e)); ++ } + break; + } + else if (e->length == (apr_size_t)-1) { +diff -urNad trunk~/server/protocol.c trunk/server/protocol.c +--- trunk~/server/protocol.c 2006-07-12 05:38:44.000000000 +0200 ++++ trunk/server/protocol.c 2007-12-02 18:51:19.200477476 +0100 +@@ -1385,6 +1385,7 @@ + + typedef struct { + apr_bucket_brigade *bb; ++ apr_bucket_brigade *tmpbb; + } old_write_filter_ctx; + + AP_CORE_DECLARE_NONSTD(apr_status_t) ap_old_write_filter( +@@ -1399,8 +1400,7 @@ + * can simply insert our buffered data at the front and + * pass the whole bundle down the chain. + */ +- APR_BRIGADE_CONCAT(ctx->bb, bb); +- bb = ctx->bb; ++ APR_BRIGADE_PREPEND(bb, ctx->bb); + ctx->bb = NULL; + } + +@@ -1449,7 +1449,12 @@ + ctx = r->output_filters->ctx; + + if (ctx->bb == NULL) { +- ctx->bb = apr_brigade_create(r->pool, c->bucket_alloc); ++ if (ctx->tmpbb == NULL) { ++ ctx->tmpbb = ctx->bb = apr_brigade_create(r->pool, c->bucket_alloc); ++ } ++ else { ++ ctx->bb = ctx->tmpbb; ++ } + } + + return ap_fwrite(f->next, ctx->bb, str, len); |