Search squid archive

Re: Re: Maximum Resident Size

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

 



On 16/01/2013 2:08 a.m., csn233 wrote:
On Tue, Jan 15, 2013 at 5:27 PM, M A Young <m.a.young@xxxxxxxxxxxx> wrote:

It is bug 3567 - squid leaks httprequests if presented with a request with
NULL characters in the headers or an invalid HTTP version. It requires bad
requests from the client, but unfortunately we seem to have a badly behaved
app some people use here.

         Michael Young
I'm certainly see a lot of "WARNING: HTTP header contains NULL
characters", and a quick analysis of the frequency of these entries
seem to correlate to the rate of memory growth, and that HttpRequest
forms the biggest chunk of my memory usage.

Is the one-liner patch applicable to both 3.1 and 3.2?

No the patch won't apply to 3.2 or later due to code additions in the file. The problem with the patch particularly is that there are several places in that function which do a "goto finish" and may leak the request object, I suspect at least three of them are doing so.

I think a better fix is to change the pointer from a HttpRequest* to a HttpRequest::Pointer. That way we ref-count the object created properly and whenever the function exists it will get destructed properly instead of leaking. Doing a quick test now and will add a patch for 3.2 to the bug report if it builds.

Amos


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux