[asterisk-bugs] [Asterisk 0016152]: [patch] MixMonitor thread doesn't exit until channel is dropped

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Nov 19 15:29:23 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16152 
====================================================================== 
Reported By:                AlexMS
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   16152
Category:                   Applications/app_mixmonitor
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Target Version:             1.4.28
Asterisk Version:           SVN 
JIRA:                       SWP-289 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 226303 
Request Review:              
====================================================================== 
Date Submitted:             2009-10-29 06:07 CDT
Last Modified:              2009-11-19 15:29 CST
====================================================================== 
Summary:                    [patch] MixMonitor thread doesn't exit until channel
is dropped
Description: 
Hi,
I've noticed that when I apply MixMonitor/StopMixMonitor on a channel the
thread (mixmonitor_thread) only exits when the channel is dropped. If you
have several long calls being monitored, asterisk eats up a lot of memory -
in my case all of it.

For example, using the following dialplan

exten => 103,1,Answer
exten => 103,n,MixMonitor(myfile)
exten => 103,n,Playback(beep)
exten => 103,n,StopMixMonitor
exten => 103,n,Wait(3)
exten => 103,n,Hangup

and observing the CLI (below) you can see that the message "End MixMonitor
Recording" is always displayed (line 11) after the hang up and not after
the StopMixMonitor (line 6), as it used to be. I say used to be, because I
checked in versions 1.4.17 and 1.4.21.1 and it works fine. 

The problem occurs for sure in version 1.4.26 and trunk (revision
226303).

TRUNK CLI:
(1)    -- Executing [103 at from-internal:1] Answer("SIP/4000-08a713d0", "")
in new stack
(2)    -- Executing [103 at from-internal:2] MixMonitor("SIP/4000-08a713d0",
"myfile") in new stack
(3)    -- Executing [103 at from-internal:3] Playback("SIP/4000-08a713d0",
"beep") in new stack
(4)  == Begin MixMonitor Recording SIP/4000-08a713d0
(5)    -- <SIP/4000-08a713d0> Playing 'beep' (language 'en')
(6)    -- Executing [103 at from-internal:4]
StopMixMonitor("SIP/4000-08a713d0", "") in new stack
(7)  == MixMonitor close filestream
(8)    -- Executing [103 at from-internal:5] Wait("SIP/4000-08a713d0", "3")
in new stack
(9)    -- Executing [103 at from-internal:6] Hangup("SIP/4000-08a713d0", "")
in new stack
(10)  == Spawn extension (from-internal, 103, 6) exited non-zero on
'SIP/4000-08a713d0'
(11)  == End MixMonitor Recording SIP/4000-08a713d0
(12)Really destroying SIP dialog
'MzY2NzI1YzAxZTBhZmFlY2E0NTZhMGMwNDkzMjQ0M2U.' Method: ACK

1.4.17 & 1.4.21.2 CLI:
(1)    -- Executing [103 at from-internal:1] Answer("SIP/4000-081f01a0", "")
in new stack
(2)    -- Executing [103 at from-internal:2] MixMonitor("SIP/4000-081f01a0",
"myfile") in new stack
(3)  == Begin MixMonitor Recording SIP/4000-081f01a0
(4)    -- Executing [103 at from-internal:3] Playback("SIP/4000-081f01a0",
"beep") in new stack
(5)    -- <SIP/4000-081f01a0> Playing 'beep' (language 'en')
(6)    -- Executing [103 at from-internal:4]
StopMixMonitor("SIP/4000-081f01a0", "") in new stack
(7)  == End MixMonitor Recording SIP/4000-081f01a0
(8)    -- Executing [103 at from-internal:5] Wait("SIP/4000-081f01a0", "3")
in new stack
(9)    -- Executing [103 at from-internal:6] Hangup("SIP/4000-081f01a0", "")
in new stack
(10)  == Spawn extension (from-internal, 103, 6) exited non-zero on
'SIP/4000-081f01a0'


====================================================================== 

---------------------------------------------------------------------- 
 (0114018) svnbot (reporter) - 2009-11-19 15:29
 https://issues.asterisk.org/view.php?id=16152#c114018 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 230508

U   branches/1.4/apps/app_mixmonitor.c

------------------------------------------------------------------------
r230508 | dvossel | 2009-11-19 15:29:22 -0600 (Thu, 19 Nov 2009) | 10
lines

fixes MixMonitor thread not exiting when StopMixMonitor is used

(closes issue https://issues.asterisk.org/view.php?id=16152)
Reported by: AlexMS
Patches:
      stopmixmonitor_1.4.diff uploaded by dvossel (license 671)
Tested by: dvossel, AlexMS

Review: https://reviewboard.asterisk.org/r/424/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=230508 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-19 15:29 svnbot         Note Added: 0114018                          
======================================================================




More information about the asterisk-bugs mailing list