[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] Asterisk consuming lots of memory in frame.c cache
From:       James Lamanna <jlamanna () gmail ! com>
Date:       2014-11-28 19:18:46
Message-ID: CADScKLy+48xrJHK47NDXf29dCNpoqibTXPhs50O2Wm9isDywtg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Nov 26, 2014 at 4:54 PM, James Lamanna <jlamanna@gmail.com> wrote:

> Hi,
> I have filed a bug for this here:
> https://issues.asterisk.org/jira/browse/ASTERISK-24555
>
> It appears that something in Asterisk 11 is continuously allocating frames
> and not freeing them.
> This causes Asterisk 11.14.0 to allocate almost 4GB of memory within a
> couple of days and ~15000 calls.
> This PBX is primarily used for faxing (Asterisk + IAXModem & T.38 Gateway)
> so I'm wondering if the issue is in the SLIN codec or the T.38 gateway code.
>
> I've taken a quick glance and I haven't seen any mismatched ast_frdup() /
> ast_frfree() yet.
>
> Thanks.
>
>
I did a quick valgrind run and attempted a couple of faxes.
I found 7 or so entries in the valgrind log with:

==30640== 211,203 bytes in 279 blocks are definitely lost in loss record
1,772 of 1,789
==30640==    at 0x4C267CC: calloc (vg_replace_malloc.c:467)
==30640==    by 0x4DC50E: ast_frdup (utils.h:523)
==30640==    by 0x47125F: __ast_queue_frame (channel.c:1284)
==30640==    by 0x1EF75589: __do_deliver (chan_iax2.c:3102)
==30640==    by 0x1EF76C5A: schedule_delivery (chan_iax2.c:4374)
==30640==    by 0x1EF8F497: socket_process_helper (chan_iax2.c:12010)
==30640==    by 0x1EF99C37: iax2_process_thread (chan_iax2.c:12030)
==30640==    by 0x56C458: dummy_start (utils.c:1192)
==30640==    by 0x5E359C9: start_thread (pthread_create.c:300)
==30640==    by 0x271A66FF: ???

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov \
26, 2014 at 4:54 PM, James Lamanna <span dir="ltr">&lt;<a \
href="mailto:jlamanna@gmail.com" target="_blank">jlamanna@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div \
dir="ltr">Hi,<div>I have filed a bug for this here:</div><div><a \
href="https://issues.asterisk.org/jira/browse/ASTERISK-24555" \
target="_blank">https://issues.asterisk.org/jira/browse/ASTERISK-24555</a><br></div><div><br></div><div>It \
appears that something in Asterisk 11 is continuously allocating frames and not \
freeing them.</div><div>This causes Asterisk 11.14.0 to allocate almost 4GB of memory \
within a couple of days and ~15000 calls.</div><div>This PBX is primarily used for \
faxing (Asterisk + IAXModem &amp; T.38 Gateway) so I&#39;m wondering if the issue is \
in the SLIN codec or the T.38 gateway code.</div><div><br></div><div>I&#39;ve taken a \
quick glance and I haven&#39;t seen any mismatched ast_frdup() / ast_frfree() \
yet.</div><div><br></div><div>Thanks.</div><span class=""><font \
color="#888888"><div><br></div></font></span></div></blockquote><div><br></div><div>I \
did a quick valgrind run and attempted a couple of faxes.</div><div>I found 7 or so \
entries in the valgrind log with:</div><div><br></div><div><div>==30640== 211,203 \
bytes in 279 blocks are definitely lost in loss record 1,772 of \
1,789</div><div>==30640==      at 0x4C267CC: calloc \
(vg_replace_malloc.c:467)</div><div>==30640==      by 0x4DC50E: ast_frdup \
(utils.h:523)</div><div>==30640==      by 0x47125F: __ast_queue_frame \
(channel.c:1284)</div><div>==30640==      by 0x1EF75589: __do_deliver \
(chan_iax2.c:3102)</div><div>==30640==      by 0x1EF76C5A: schedule_delivery \
(chan_iax2.c:4374)</div><div>==30640==      by 0x1EF8F497: socket_process_helper \
(chan_iax2.c:12010)</div><div>==30640==      by 0x1EF99C37: iax2_process_thread \
(chan_iax2.c:12030)</div><div>==30640==      by 0x56C458: dummy_start \
(utils.c:1192)</div><div>==30640==      by 0x5E359C9: start_thread \
(pthread_create.c:300)</div><div>==30640==      by 0x271A66FF: \
???</div></div><div><br></div><div><br></div></div></div></div>



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic