[asterisk-bugs] [Asterisk 0013435]: Asterisk 1.4.21.2 crash ast_do_masquerade (segfault at 00000000000000d8 rip 0000003ad54082f9 rsp 0000000040523fb0 error)

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 8 15:53:11 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13435 
====================================================================== 
Reported By:                geoff2010
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13435
Category:                   Core/General
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-06 16:20 CDT
Last Modified:              2008-09-08 15:53 CDT
====================================================================== 
Summary:                    Asterisk 1.4.21.2 crash ast_do_masquerade (segfault
at 00000000000000d8 rip 0000003ad54082f9 rsp 0000000040523fb0 error)
Description: 
I currently have 4 asterisk systems which are all experiencing this issue. 
I was running 1.4.20.1 and have recently upgraded to the 1.4.21.2 and the
bug still exists.

I am currently using FastAGI and AMI to control the calls on our system. 
this bug seems to be caused by an AMI redirect to a new context.

I am seeing the following as the last entry in my asterisk log

[Sep  6 16:23:27] WARNING[4122] channel.c: SIP/bw-13d384c0 is already
going to masquerade as Local/OFFHOOK at acd_dial_offhook-bd26,1

What I believe leads to the crash is the following:

1 - Issue an manager originate to a Local channel into an "outdial"
context.

2 - the "outdial" context dials via SIP through our gateway provider

3 - Upon ANSWER a FastAGI script is executed which notifies a higher level
application on another server via TCP that the call was answered.  the
higher level application sends a message back to the Java server (on
another thread) which issues an AMI redirect to a new context to play "on
hold" audio to the freshly generated outbound call. 

Example:

Java Thread1 - FastAGI Script sends TCP message to server to notify of
answer

Java Thread2 - receives the TcP response from server to play a specific
"hold" audio file to the newly answered call.  This Issues an AMI redirect
to asterisk which causes the FastAGI script in Thread1 to terminate and the
call is then moved to the new "hold" context

At some point in the redirect process the system crashes with a segfault. 
This happens about every 2 hours when the system is doing a good bit of
dialing.

thanks,
Geoff
====================================================================== 

---------------------------------------------------------------------- 
 (0092194) svnbot (reporter) - 2008-09-08 15:53
 http://bugs.digium.com/view.php?id=13435#c92194 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 141806

U   branches/1.4/main/pbx.c

------------------------------------------------------------------------
r141806 | russell | 2008-09-08 15:53:10 -0500 (Mon, 08 Sep 2008) | 7 lines

When doing an async goto, detect if the channel is already in the middle
of a
masquerade.  This can happen when chan_local is trying to optimize itself
out.
If this happens, fail the async goto instead of bursting into flames.

(closes issue http://bugs.digium.com/view.php?id=13435)
Reported by: geoff2010

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-08 15:53 svnbot         Checkin                                      
2008-09-08 15:53 svnbot         Note Added: 0092194                          
======================================================================




More information about the asterisk-bugs mailing list