[Home]

Summary:ASTERISK-06623: crash / segfault (or other evil) when call is ended while MixMonitoring
Reporter:benjamin9999 (benjamin9999)Labels:
Date Opened:2006-03-27 11:16:55.000-0600Date Closed:2006-05-03 13:01:56
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:from SVN.
i have problems with very short .wav output and used patch#1 from ASTERISK-6396457, which fixed that problem.

besides, that it crashes every time i use it.

calls in question happen to be SIP <-> SIP, g711u.

in my profile, i have always set ---limit stack 8192---

file writes fine during the call, when we hang up, asterisk crashes.

if i remove the stack limit, asterisk wont crash, but bad things happen.  ast_sched gets noisy trying to remove things that don't exist, app_queue is unable to start new threads (i don't use app_queue) and the next time pthread is started for MixMonitor (on the 2nd call) the thread fails.

the box runs Linux 2.4.32, and is otherwise fine and has been running asterisk for a long time without problems.

i wanted to switch from Monitor to MixMonitor, but it crashes 100% of time this way.  i have used the latest release, as well as SVN from yesterday (Asterisk SVN-trunk-r15026M, march-26)

i included some details from my console, as well as bt full.  

****** ADDITIONAL INFORMATION ******

---- asterisk console ----
   -- Executing MixMonitor("SIP/3002-83be", "rx-2006-03-27 12:04:18.wav|b") in new stack
 == Begin MixMonitor Recording SIP/3002-83be
   -- Executing Dial("SIP/3002-83be", "SIP/2003&SIP/2007&SIP/2010|20i|tr") in new stack
   -- Called 2003
   -- Called 2007
   -- Called 2010
   -- SIP/2003-0b22 is ringing
   -- SIP/2010-d3ea is ringing
   -- SIP/2007-e73b is ringing
   -- SIP/2003-0b22 answered SIP/3002-83be
 == Spawn extension (inbound, s, 7) exited non-zero on 'SIP/3002-83be'
 == End MixMonitor Recording SIP/3002-83be
Ouch ... error while writing audio data: : Broken pipe
zsh: 18336 segmentation fault  asterisk -vvvc
root@asterisk ~ #




---- bt full output ----
(gdb) bt full
#0  0x080629be in detach_spies (chan=0x81d6128) at channel.c:1136
       spy = (struct ast_channel_spy *) 0x40edfa34
#1  0x080631ec in ast_hangup (chan=0x81d6128) at channel.c:1318
       res = 0
#2  0x08075012 in __ast_pbx_run (c=0x81d6128) at pbx.c:2316
       firstpass = 0
       digit = 0
       exten = '\0' <repeats 255 times>
       pos = 0
       waittime = 0
       res = -1
       autoloopflag = 0
#3  0x0807519e in pbx_thread (data=0x81d6128) at pbx.c:2366
       c = (struct ast_channel *) 0x81d6128
#4  0x40024050 in pthread_detach () from /lib/libpthread.so.0
No symbol table info available.
ASTERISK-1  0x4019927a in clone () from /lib/libc.so.6
No symbol table info available.
(gdb)
Comments:By: benjamin9999 (benjamin9999) 2006-03-27 11:18:50.000-0600

i forgot to mention that it fails the same way, even without the patch from ASTERISK-1891, but then i also have corrupt audio data.

By: BJ Weschke (bweschke) 2006-03-29 22:51:33.000-0600

Does the issue still exist with the current revision of /trunk ( > 16386) ?

By: Andrey S Pankov (casper) 2006-03-30 16:02:25.000-0600

"print chan->spies->list" in gdb

By: Serge Vecher (serge-v) 2006-05-03 13:01:56

If this problem still exists in the latest trunk, please reopen with a backtrace from non-optimized build.