Re : Re: Found Memory Leak in Squid at cbdata

From: atit_ldce <atit_ldce@dont-contact.us>
Date: Tue, 10 Jun 2003 15:50:25 +0530 (GMT+05:30)

Hello Henrik,
This is the frequest memory leak I am sending u log file telling memory leak info generated via XMALLOC_xxx options in squid.
This is log file after squid has served only 2 requests.

Actually i am facing vary serious problem of memory leak in squid.

Squid is serving about 1200 request/minute on redhat linux box with kernel 2.4 and memory 1GB RAM
Memory utilized by Squid is going to increase with time.
So we need to restart squid once daily.
Can u give me direction to handle this problem of squid.
Waiting for reply
====== atit

----- Original Message -----
From: Henrik Nordstrom <hno@marasystems.com>
To: atit_ldce <atit_ldce@icenet.net>,squid-dev@squid-cache.org
Sent: Tue Jun 10 15:05:08 GMT+05:30 2003
Subject: Re: Found Memory Leak in Squid at cbdata

 On Tuesday 10 June 2003 06.55, atit_ldce wrote:
> Hello Squid Developers,
> I found one memory leak at cbdata.c:109
> label = xmalloc(strlen(name) + 20);
>
> memory is allocated to char pointer label, then in memPoolCreate
> there is pool->label = label (in MemPool.c)
> but it is not cleared afterwards when MemPool is destroyed(in
> MemPool.c:memPoolDestroy()).
>
> and enabling memory debug also shows memory leak at cbdata. :109.
> does string pointed by mempool->label is referrenced after by any
> other part of squid after destroying MemPool.
>
> if no then definately there is memory leak not deallocating memory
> assigned to string.

Yes, there is many such one-time memory leaks in Squid where Squid
allocates some memory on startup but never frees it on shutdown.
There is little to be gained from spending lots of time on getting
rid of this type of memory leaks as the memory is automatically freed
when the application (squid) terminates even if not explicitly freed.

The memory leaks which matters most for Squid is the leaks related to
normal processing, i.e. the kind of leaks which can leak more than
once during the lifetime of Squid.

Regards
Henrik

_____________________________________________________________________
Get your internet connection from the fastest growing digital network.
ICENET
visit our site www.icenet.net

Received on Tue Jun 10 2003 - 04:25:11 MDT

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