Re: Squid 2.4-200105082300 memory leaks

From: John Gilbert <jgilbert@dont-contact.us>
Date: Wed, 09 May 2001 15:30:21 -0700

Hello Henrik, everyone,
What I'm worried about, which I think Purify is able to show, is the
repeated memory
allocations that are dropped, like 26 * 8kB and 20 * 1kB, and not the
malloced one time, not freed on shutdown leaks.. The problems we are
experiencing on our production
server are that the proxy process (which is limited in squid.conf to
756MB) continues to grow larger and larger over a span of about 4 to 5
days of use to about 1GB, then
it crashes. Setting the memory limit higher seems to cause it to crash
even faster. We
also see CPU usage at around 90% during loads of 100 hits per second,
where CPU load is less than 5% with loads of 60 hits per second.

I would be happy to give squid a much longer trial under Purify (or any
other memory leakage detection tool) to see just how many of these leaks
are usage dependent.

Purify has this runtime heap checking capability, I'm working with
Rational to get squid built with Purifys cc wrappers to take advantage
of these features. I've seen it
do some impressive runtime bounds error and variable initialization
checking on other
programs, but it currently doesn't play very well with squid.

Thanks.
John Gilbert
jgilbert@sgi.com

==========================================

Henrik Nordstrom wrote:

> Running purify in normal leak finding mode is not of very much help for
> finding memory leaks in Squid as Squid does not even attempt to clean up
> most data on shutdown. To get any useful data you need to compare with a
> "normal" leak report.
>
> If you think there is a memory leak then first thing you should check is
> the "Memory utilisation" page in cachemgr. Most leaks show up there as
> well.. (look for entries where "allocated high hours" is close to 0).
>
> Next, if the leak does not seem to be reflected in the "Memory
> utlisation" page, then you most likely need a malloc debugger with "heap
> snapshots" (or whatever to call it.. being able to show the memory
> allocation differences over time in a running process). A malloc
> debugger that can run the leak check on a running process is sometimes
> sufficient, but most times Squid has references to "leaked" memory, only
> that it does not know how to access these references..
>
> Events where I take for granted there are real memory leaks:
>
> a) Log rotation
>
> b) Reconfigure
>
> --
> Henrik Nordstrom
> Squid hacker
Received on Wed May 09 2001 - 16:30:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:00 MST