[asterisk-bugs] [JIRA] (ASTERISK-27305) Memory leaks in ARI when using Content-Type: application/json

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Oct 3 15:20:08 CDT 2017


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

Asterisk Team commented on ASTERISK-27305:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> Memory leaks in ARI when using Content-Type: application/json
> -------------------------------------------------------------
>
>                 Key: ASTERISK-27305
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27305
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.17.2, 14.6.2, 15.0.0-rc1
>         Environment: CentOS 6.9, jansson 2.9
>            Reporter: David Hajek
>
> There is some memory leak when making ARI request with Content-Type: application/json. Every such call leaks few bytes of memory in json.c and its never freed. Making several thousands ARI requests results in asterisk being killed by kernel's OOM. Memory is not leaked when Content-Type application/json is not used. 
> We don't think this is duplicate of ASTERISK-27067.
> We tried latest 13.17.2, 14.6.2 and 15.0.0 and all these versions are affected.
> Steps to reproduce:
> # Run asterisk with MALLOC_DEBUG
> # Memory allocations in json.c after startup
> <code>
> asterisk  -rx 'memory show summary' | grep json.c
> 672 bytes in          5 allocations in file json.c
> </code>
> # Originate dummy call using ARI
> <code>
> curl -v -u ari:asterisk -X POST -H "Content-Type: application/json" "http://localhost:8088/ari/channels" -d '{"endpoint":"SIP/dummy", "extension":"123456", "context":"internal-routing", "priority":"1"}'
> </code>
> # Memory allocations in json.c after one ARI call. This memory is never freed and many requests results in OOM.
> <code>
> asterisk  -rx 'memory show summary' | grep json.c
>       2288 bytes in         19 allocations in file json.c
> </code>



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



More information about the asterisk-bugs mailing list