[asterisk-bugs] [JIRA] (ASTERISK-28422) Potential memory Leak in Confbridge

Benjamin Keith Ford (JIRA) noreply at issues.asterisk.org
Wed May 29 10:35:47 CDT 2019


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

Benjamin Keith Ford commented on ASTERISK-28422:
------------------------------------------------

Sorry for the confusion, I wasn't referring to testing it over time; I was referring to testing specific options with a loop. This would be really beneficial for us to see if it's something specific or more broad. It may just be something not being freed correctly in the code, we just need to find out where to look.

I've tested via two different approaches:
# Using SET in the dialplan multiple times, then checking memory allocations.
# SET the variable multiple times via a loop in a simple AGI script.

Neither one produced any results, unfortunately:
{noformat}
                         before      after
memory show allocations: 12621704    12478607
memory show summary:     12538387    12478184

before: 1128 bytes in          3 allocations in file app_confbridge.c
after:  1128 bytes in          3 allocations in file app_confbridge.c
before: 62828 bytes in         23 allocations in file confbridge/conf_config_parser.c
after:  62828 bytes in         23 allocations in file confbridge/conf_config_parser.c
{noformat}
Other allocations were the same in suspect areas, too.

Simple scenarios for testing:
# Dialplan (run repeatedly)
{code}
exten => 123,1,Answer()
 same => n,SET(CONFBRIDGE(user,startmuted)=yes)
 same => n,Hangup()
{code}
# AGI
{code}
#!/bin/bash

LOOP=0

echo "ANSWER"
while [ $LOOP -lt 100 ]; do
        echo "EXEC SET CONFBRIDGE(user,startmuted)=yes"
        let LOOP=LOOP+1
done
echo "HANGUP"
{code}

Memory allocations seemed to not change at all before and after. We'll have to try narrowing down the problem more.

> Potential memory Leak in Confbridge
> -----------------------------------
>
>                 Key: ASTERISK-28422
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28422
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_confbridge
>    Affects Versions: 16.3.0
>         Environment: Debian GNU/Linux 9.8 (stretch)
> Using AGI
>            Reporter: Ted G
>            Assignee: Unassigned
>            Severity: Minor
>
> When users on my system join a conference bridge some variables are being set dynamically like so:
> {noformat}
> ast_setvar("CONFBRIDGE(bridge,record_file)", recfn);
> ast_setvar("CONFBRIDGE(user,startmuted)", mute ? "yes" : "no");
> ast_setvar("CONFBRIDGE(user,music_on_hold_class)", music ? music : "default");
> ast_setvar("CONFBRIDGE(user,music_on_hold_when_empty)", music ? "yes" : "no");
> {noformat}
> All of this works fine, however users are quite often taken off the bridge to change these settings so every time they enter the bridge these settings are applied based on whatever configuration they are using.
> My assumption is that once the channel is destroyed (upon Hangup) these settings vanish.  I am not using confbridge.conf at all.
> My assumption appears false however as memory usage continues to grow day by day:
> {noformat}
>    54616804 bytes in      15255 allocations in file confbridge/conf_config_parser.c
> {noformat}



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



More information about the asterisk-bugs mailing list