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

Joshua Colp (JIRA) noreply at issues.asterisk.org
Wed Jun 8 10:56:56 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-25262:
-----------------------------------

    Reviewboard Link: https://gerrit.asterisk.org/2972 https://gerrit.asterisk.org/2973

> 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
>            Assignee: Joshua Colp
>
> 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