Summary:ASTERISK-11116: Asterisk is crashing when using chanspy + MixMonitor
Reporter:FACORAT Fabrice (dark_schneider971)Labels:
Date Opened:2007-12-27 12:05:36.000-0600Date Closed:2011-06-07 14:00:52
Versions:Frequency of
Environment:Attachments:( 0) chanspy_crash_debug_cz
( 1) chanspy_crash_debug_de
Description:I'm using asterisk on Mandriva Linux, 32bit system, kernel 2.6.24.
SIP channels are used, CDR loging with PostreSQL, no realtime, G711 codec usage.
There's about 30 SIP clients.

All outgoing calls are recorded with MixMonitor in wav format.

I noticed that when using ChanSpy, asterisk will just crash.

I will have to test when disabling recording.
Comments:By: Russell Bryant (russell) 2007-12-27 13:35:25.000-0600

Please try the following branch, which is based on 1.4, and see if it fixes your problem ...

svn co http://svn.digium.com/svn/asterisk/team/file/audiohooks-1.4

By: FACORAT Fabrice (dark_schneider971) 2008-01-01 09:25:39.000-0600

Ok, I'm about to test this branch to see if this help. I compiled it today, and it will enter in production tommorrow.
I've also enabled many debug options ( malloc, thread, lock, don't optimize ).

By: FACORAT Fabrice (dark_schneider971) 2008-01-16 13:37:17.000-0600

Sorry for the delay.
OK, the SVN version you gave me is in production since about 2 weeks, and there are no longer crash from what I hear. People even report that ChanSpy and recordings have better quality.

By: Joshua C. Colp (jcolp) 2008-01-16 14:34:31.000-0600

Fixed in 1.4 as of revision 98972.

By: FACORAT Fabrice (dark_schneider971) 2008-01-20 07:08:25.000-0600

Sorry, but it seems that the issue is not fixed.
Under normal load ( about 30 simultaneous calls ), the server will crash when doing ChanSpy. Seems to crash at the third ChanSpy. So i'm reopening the bug.
I will send debug logs output shortly and i will provide the dialplan in extension.conf

By: FACORAT Fabrice (dark_schneider971) 2008-01-22 06:44:37.000-0600

Here is the diaplan used for outgoing calls :

exten => _0.,1,Set(CALLFILENAME=${CALLERID(num)}_to_${EXTEN}-${STRFTIME(${EPOCH},,%Y%m%d-%H:%M:%S)})
exten => _0.,2,Set(SPYGROUP=${CALLERID(num):8:2})
exten => _0.,3,Set(CALLERID(num)=0276519902)
exten => _0.,4,MixMonitor(Table_2/${CALLFILENAME}.wav)
exten => _0.,5,Dial(SIP/${EXTEN}@altitude_telecom,45)
exten => _0.,6,Hangup
exten => 100,1,Dial(SIP/test)

Here is the dialplan used to ChanSpied :

exten => _3XX,1,ChanSpy(|wqg(${EXTEN:1:2}))
exten => _3XX,2,Hangup

By: FACORAT Fabrice (dark_schneider971) 2008-01-22 07:19:26.000-0600

chanspy_crash_debug_cz contains debug logfile content when the ChanSpy was initiated.

chanspy_crash_debug_de contains debug logfile content when asterisk just crash. As you can see, asterisk will crash without warning at about "Jan 18 12:15:26", 2 minutes after the beginning of the ChanSpy. Please note the deadlock warning at "Jan 18 12:15:16"

It seems that this deadlock warning appear only when doing ChanSpy.
Indeed the first ChanSpy was done at "Jan 18 12:11:12" ( not provided in the two uploaded logfiles ). The first deadlock warning appear at "Jan 18 12:11:18". There were no deadlock warnings before.

By: Joshua C. Colp (jcolp) 2008-01-29 12:01:16.000-0600

Can you please get new logs without DEBUG_SCHEDULER enabled? It is making it extremely hard to see what is going on... along with debug set to console in logger.conf, core set debug 9 and complete console output.

By: jmls (jmls) 2008-02-17 13:07:58.000-0600

Dark_Schneider971, please could you supply the requested logs ? Thanks

By: Joshua C. Colp (jcolp) 2008-03-19 13:09:35

Suspended due to lack of feedback.