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

Ted G (JIRA) noreply at issues.asterisk.org
Wed May 29 12:08:47 CDT 2019


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

Ted G commented on ASTERISK-28422:
----------------------------------

Ok, so at this point I believe the leak may be in the CONFBRIDGE menu config.

If you do this test you will see the memory go up very fast (this only happened once I introduced the CONFBRIDGE(menu settings:

{code}
[inbound]
exten => _X!,1,Answer
same => n,SET(i=1)
same => n,While($[${i} < 2])
same => n,SET(CONFBRIDGE(bridge,internal_sample_rate)=8000)
same => n,SET(CONFBRIDGE(bridge,record_conference)=no)
same => n,SET(CONFBRIDGE(bridge,record_file_append)=yes)
same => n,SET(CONFBRIDGE(bridge,record_file_timestamp)=no)
same => n,SET(CONFBRIDGE(user,quiet)=yes)
same => n,SET(CONFBRIDGE(user,timeout)=1)
same => n,SET(CONFBRIDGE(user,startmuted)=no)
same => n,SET(CONFBRIDGE(user,jitterbuffer)=yes)
same => n,SET(CONFBRIDGE(user,music_on_hold_class)=default)
same => n,SET(CONFBRIDGE(user,music_on_hold_when_empty)=no)
same => n,SET(CONFBRIDGE(menu,0)=leave_conference)
same => n,SET(CONFBRIDGE(menu,1)=leave_conference)
same => n,SET(CONFBRIDGE(menu,2)=leave_conference)
same => n,SET(CONFBRIDGE(menu,3)=leave_conference)
same => n,SET(CONFBRIDGE(menu,4)=leave_conference)
same => n,SET(CONFBRIDGE(menu,5)=leave_conference)
same => n,SET(CONFBRIDGE(menu,6)=leave_conference)
same => n,SET(CONFBRIDGE(menu,7)=leave_conference)
same => n,SET(CONFBRIDGE(menu,8)=leave_conference)
same => n,SET(CONFBRIDGE(menu,9)=leave_conference)
same => n,SET(CONFBRIDGE(menu,0)=leave_conference)
same => n,SET(CONFBRIDGE(menu,*)=leave_conference)
same => n,SET(CONFBRIDGE(menu,#)=leave_conference)
same => n,CONFBRIDGE(69)
same => n,EndWhile
same => n,Hangup
{code}


> 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: Ted G
>            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