[asterisk-dev] memory leak with static users

Gianpietro Germi g.germi at selta.it
Thu Nov 5 11:58:49 CST 2009


Hi,

Il giorno gio, 05/11/2009 alle 10.50 +0200, Tzafrir Cohen ha scritto:
> Hi,
> 
> On Wed, Nov 04, 2009 at 04:13:04PM +0100, Gianpietro Germi wrote:
> > Hi,
> > we're using Asterisk 1.6.1.1.
> > 
> > We've got a memory leak with unconnected static users.
> 
> Good. Please report it in http://issues.asterisk.org/ .

Ok, i'll do it.

> 
> Also,
> 
> > 
> > Our template for static users in users.conf is:
> > [static](!)
> > hassip=yes
> > hasiax=no
> > type=friend
> > 
> > [100](static)
> > context=periferico
> > host=192.168.0.1
> > port=5060
> > username=100
> > [101](static)
> > context=periferico
> > host=192.168.0.2
> > port=5060
> > username=101
> > ......
> > 
> > This template generates polling with SIP OPTIONS messages to static
> > users.
> > We don't generate call then these messages are the only object created
> > more than once (i think..).
> > If users aren't connected we have a memory leak: the memory used by
> > Asterisk grow up and generate (after a time that depends from the number
> > of static users) an OOM and his consequent kill.
> 
> How long do you have to run this? How many running calls do you have?

I run this for few hours, without making calls, only SIP OPTIONS
polling.
But i noticed memory grow up continuously (/proc/meminfo
and /proc/<asteriskPID>/statm), after ech polling.

> 
> > 
> > Using refcounter debug (uncomment REF_DEBUG macro in chan_sip.c), we
> > noticed only peer objects (builded by build_peer) have "Refcount not
> > zero".
> 
> Can you try building Asterisk with memory allocations debug and see if
> memory allocated from a certain memory allocation point (or module)
> keeps increasing?
> 

I have to use the doc/valgrind.txt procedure or it's sufficient set
compiler flags and read some kind of file?


Thanks,
Gianpietro




More information about the asterisk-dev mailing list