[asterisk-dev] memory leak with static users

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Nov 5 02:50:29 CST 2009


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/ .

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?

> 
> 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?

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list