[asterisk-bugs] [JIRA] (ASTERISK-27656) Seems there is a memory leak in "stasis_channels.c"

Alex Hermann (JIRA) noreply at issues.asterisk.org
Fri Feb 9 11:15:13 CST 2018


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

Alex Hermann commented on ASTERISK-27656:
-----------------------------------------

I reverted all commits one-by-one since 13.18 affecting the suspect files:
{code}
git log --oneline origin/13.18..origin/13 --no-merges -- main/cdr.c main/stasis.c main/stasis_channels.c
{code}

and arrived at the following commit as the culprit:

{code}
commit 85723a9e506bda9e21dbf3c06d93d961f10c6b75
Author: Richard Mudgett <rmudgett at digium.com>
Date:   Mon Oct 2 17:42:48 2017 -0500

    cdr.c: Add container to key off of Party B channel names.
{code}

Unfortunately, this commit is not revertible by itself. To get a compilable Asterisk without this bug revert these commits:

{code}
2b85799512 AST-2017-010: Fix cdr_object_update_party_b_userfield_cb() buf overrun
7f8c212e75 cdr.c: Rename the Party A CDR container.
85723a9e50 cdr.c: Add container to key off of Party B channel names.
{code}

Please mark this bug as a regression.

> Seems there is a memory leak in "stasis_channels.c"
> ---------------------------------------------------
>
>                 Key: ASTERISK-27656
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27656
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/General, Resources/res_stasis
>    Affects Versions: 13.19.0, 15.2.0
>         Environment: Debian 9 with asterisk-13.19.0
>            Reporter: Kristijan Vrban
>         Attachments: 27656-memory-show-allocations-after.txt.gz, 27656-memory-show-summary-after.txt, 27656-memory-show-summary-before.txt, valgrind.txt
>
>
> Seems there is a memory leak in "stasis_channels.c"
> Command asterisk -rx'memory show summary' |sort -n
> show that 23443200 bytes in      15984 allocations in file stasis_channels.c is growing with every call.
> Minimal example config to reproduce:
> sip.conf
> {noformat}
> [general]
> bindaddr=192.168.198.133
> [peer_in]
> type=peer
> insescure=port,invite
> port=5099
> host=192.168.198.133
> disallow=all
> allow=alaw
> allow=ulaw
> directmedia=no
> context=default
> {noformat}
> extensions.conf
> {noformat}
> [default]
> exten => 333,1,Dial(SIP/${EXTEN}@192.168.198.140)
> exten => 333,n,Hangup
> {noformat}
> and then sipp it, and check with command:
> asterisk -rx'memory show summary' |sort -n



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



More information about the asterisk-bugs mailing list