[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#758068: libapr1: mmap allocator severely limites apache scalability



Hi,

On Friday 15 August 2014 21:33:07, Stefan Fritsch wrote:
> It seems mod_security does its own things with apr allocators, which
> causes MaxMemFree not to have any effect for mod_security's
> allocations. I have asked them why they do that. Let's see what
> they respond.

there is now a bug report at 
https://github.com/SpiderLabs/ModSecurity/issues/768

Can you please try if the patch for mod_security attached to this mail 
fixes the issue?

Cheers,
Stefan
commit 45f2b726bc500542c5607176009a4fa3054d899e
Author: Stefan Fritsch <sf@sfritsch.de>
Date:   Sat Sep 6 20:08:24 2014 +0200

    no allocator

diff --git a/apache2/mod_security2.c b/apache2/mod_security2.c
index c0240ef..d6163be 100644
--- a/apache2/mod_security2.c
+++ b/apache2/mod_security2.c
@@ -438,17 +438,13 @@ static void store_tx_context(modsec_rec *msr, request_rec *r) {
  * Creates a new transaction context.
  */
 static modsec_rec *create_tx_context(request_rec *r) {
-    apr_allocator_t *allocator = NULL;
     modsec_rec *msr = NULL;
 
     msr = (modsec_rec *)apr_pcalloc(r->pool, sizeof(modsec_rec));
     if (msr == NULL) return NULL;
 
-    apr_allocator_create(&allocator);
-    apr_allocator_max_free_set(allocator, 1024);
-    apr_pool_create_ex(&msr->mp, r->pool, NULL, allocator);
+    apr_pool_create(&msr->mp, r->pool);
     if (msr->mp == NULL) return NULL;
-    apr_allocator_owner_set(allocator, msr->mp);
 
     msr->modsecurity = modsecurity;
     msr->r = r;

Reply to: