httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50559] New: Memory leak on long lines, leading to complete system freeze
Date Fri, 07 Jan 2011 13:08:51 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50559

           Summary: Memory leak on long lines, leading to complete system
                    freeze
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: mod_substitute
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: marc.stern@approach.be


It seems that there is a finite memory leak, that is it does not increase
indefinitely, but much too high any way. I managed to reproduce the problem on
a low scale, but, when this happen in production (Linux), processes memory
increases up to several GB, knocking down the complete OS (kernel not able to
react because od too much swap).

This description is valid for Windows/Unix, but the measures are the scaled
down Windows ones.
Here it is, in 3 steps:
 - Almost empty config, only mod_substitue loaded.
 - Start the server with "httpd -X" (for the measurements).
 - The initial memory size of the process is 3 MB.

Test 1:
I create a text file containing a very long line (250,000 char) containing
(each) 32 times the string "xxxx" (with the quotes).
I add the directive
   Substitute  "s`(?<=\")xxxx`-xxxx`i"
On the first request, the memory increase up to 3.5 MB - no problems.
I resend the same request several hundred times (sequentially) and the memory
does not increase.

Test 2:
I add, after the previous substitute, the directive
   Substitute  "s`zzzzzzzzzzzz`yyy`i"
The text file does not contain the string zzzzzz, so the rule never matches.
On the first request, the memory increase up to 20 MB - this definitely looks
like a bug ...
I resend the same request several hundred times (sequentially) and the memory
does not increase.

Test 3:
Same as test 2, but I copy the line in the text file a second time (on a new
line).
On the first request, the memory increase up to 20 MB - as previously.
I resend the same request several hundred times (sequentially) and the memory
increases on each request.
It stabilizes around 55 MB.
If I add the line a third time, it goes up to 75 MB.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message