[asterisk-bugs] [JIRA] (ASTERISK-25262) Memory leak when a caller channel does multiple dials and CEL is enabled

Corey Farrell (JIRA) noreply at issues.asterisk.org
Mon Oct 19 08:49:33 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227941#comment-227941 ] 

Corey Farrell commented on ASTERISK-25262:
------------------------------------------

Based on your destr

> Memory leak when a caller channel does multiple dials and CEL is enabled
> ------------------------------------------------------------------------
>
>                 Key: ASTERISK-25262
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25262
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CEL/General
>    Affects Versions: 13.4.0
>            Reporter: Etienne Lessard
>
> Given I two users, SIP/alice and SIP/bob
> Given I have the following queues.conf:
> {noformat}
> [general]
> [foo]
> ringinuse = no
> timeout = 1
> retry = 1
> member => SIP/alice
> {noformat}
> Given I have the following extension in extensions.conf:
> {noformat}
> exten = 201,1,Queue(foo)
> {noformat}
> Given I have the following cel.conf:
> {noformat}
> [general]
> enable = yes
> {noformat}
> When Bob dials the 201 extension
> And Alice never answers
> Then Alice is called every 2 seconds
> And the asterisk process memory usage grows a little each time Alice is called
> And the only way for the memory to be freed is to stop/restart asterisk
> In this scenario, a SIP/bob channel creates a new SIP/alice channel and dials it once every 2 second. The callback function "cel_dial_cb" in cel.c is thus called once (or twice in fact) every 2 seconds. An ast_multi_channel_blob is then stored in the "cel_dialstatus_store" ao2_container. But most of these ast_multi_chanel_blob object are never unlinked from the container, and thus memory usage of the asterisk process grows.
> Took me a while to understand the leak; when I first saw it was occurring in asterisk, I tried running a REF_DEBUG version of asterisk, but since the container is cleaned at exit, it didn't show up; similar thing when running valgrind.
> To give you an idea of the leak, on my test setup, after ~600 dial to SIP/alice, VSZ and RSS have grown about 10 MB each.
> I used the Queue application in this example, but it's also possible to leak with the Dial application, or in fact any application that can create and "dial" channels.
> It's also possible to use a tool like sipp to leak memory more rapidly.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list