[asterisk-dev] iax2-parser.c - Memory

Corentin Le Gall clegall at proformatique.com
Fri Jul 25 10:33:19 CDT 2008


Hi Eric,

Maybe this could be helpful for you.
We had a serious issue with one of our customers while running in 1.4.20 then 1.4.21,
among which some iax2 deadlock problem.
We first patched our server with this fix : http://bugs.digium.com/view.php?id=12795,
however it was clearly not enough, but later on the 1.4.21.1 did correct a major issue
(the so-called "TYPO" bug).

Now, on this special customer's asterisk, the uptime is more than 8 days.
It runs with an 1.4.21.1 asterisk + 12795 patch (we didn't try without it).
It has IAX2 connections, as well as 2 E1's.
In the queue_log, the last lines now begin with
1216999210|1216999194.105675 (this latter number gives an *idea* about the number
of processed calls ...)
And the memory is about 60 MB now.

At first sight, nothing to do with your memory problems, but since we seem to meet close
configurations, maybe this 12795 patch (only dealing with mutexes) prevents "us" to run into
them ...
This is not a very scientific point of view, I agree, but this is asterisk world :-)

More precisely, we applied this diff only :
http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?r1=123391&r2=123390&pathrev=123391

Cheers,

-- 
Corentin LE GALL
Proformatique - 67 rue Voltaire - 92800 Puteaux
Tel. : 01 41 38 99 60 - Fax. : 01 41 38 99 70
http://www.proformatique.com



On Fri, 25 Jul 2008 15:24:50 +0100
Eric Dantie <edantie at gmail.com> wrote:

> On Fri, 2008-07-25 at 07:06 -0500, Russell Bryant wrote:
> > Eric Dantie wrote:
> > > I'm using asterisk-1.4.21.1 in production and more or less after a week
> > > of intensive use (more or less 200.000 calls) the system stop working
> > > because of lack of memory.
> > > 
> > > After investigating the possibles causes, I found that the problem is in
> > > channel/iax_parser.c. If compiled with MALLOC_DEBUG, memory show summary
> > > is showing more and more memory used. The code looks good.
> > > 
> > > Solution found:
> > > - Compiling with LOW_MEMORY so that unused blocks are really freed.
> > > 
> > > Problem compiling with LOW_MEMORY: if asterisk is using dundi, then
> > > asterisk crash (http://bugs.digium.com/view.php?id=13154)
> > > 
> > > Hope that help someone with same problems.
> > 
> > Some amount of memory consumption in that code is expected, as it tries 
> > to maintain a cache of unused frames for optimization purposes.  How 
> > much memory is it consuming when it becomes a problem for you?
> > 
> 
> The cache is growing till more or less 3GB of RAM, and then start to
> complain for the lack of memory (the server has only 4GB of RAM, 32
> bits).
> 
> I think it goes out of normal use of memory for an only max 120
> simultaneous calls (2 E1).
> 
> 
> 
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list