[Home]

Summary:ASTERISK-13138: Enabling qualify on a SIP TCP peer brings pain and coredumps
Reporter:David McNett (nugget)Labels:
Date Opened:2008-11-29 22:11:19.000-0600Date Closed:2008-12-12 12:19:45.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) trace_02.log
( 1) trace_02-gdb.txt
Description:I can consistently core dump Asterisk by enabling qualify on a sip peer that's configured to use transport=tcp.  Setting"qualify=no" eliminates the crashes.


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

Running via 'safe_asterisk' result:
/usr/sbin/safe_asterisk: line 138: 22672 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >/dev/${TTY} 2>&1 </dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.

Will attach console log and gdb backtrace.
Comments:By: Paul Belanger (pabelanger) 2008-12-03 11:59:30.000-0600

Any chance to see you sip.conf?  We are using 1.6.0.1 in our lab with transport=tcp and qualifiy=yes with no problems.

By: David McNett (nugget) 2008-12-03 12:05:40.000-0600

Phone has two lines configured, thusly:

[nuggetfa]
type=friend
host=dynamic
username=nuggetfa
secret=secret
mailbox=702
callerid=David McNett <702>    
canreinvite=no
context=staff                  
qualify=no
transport=tcp                  
nat=yes                        
buggymwi=yes                    
setvar=AGENTCHANNEL=SIP/nuggetq
setvar=AGENTDID=7138779007      
                               
[nuggetq]
type=friend
host=dynamic
username=nuggetq
secret=secret
mailbox=700
callerid=David McNett <700>    
canreinvite=no                  
context=staff                  
qualify=no                      
transport=tcp                  
nat=yes                        
buggymwi=yes
setvar=AGENTCHANNEL=SIP/nuggetq
call-limit=10

By: Leif Madsen (lmadsen) 2008-12-03 12:47:43.000-0600

What are the endpoints these peers or qualifying?

By: David McNett (nugget) 2008-12-03 13:22:23.000-0600

Both are lines on the same Cisco 7965.

By: Eliel Sardanons (eliel) 2008-12-04 04:19:00.000-0600

Nugget, which options in menuselect 'Compiler flags' do you have enabled?
DONT_OPTIMIZE?

By: David McNett (nugget) 2008-12-04 13:00:41.000-0600

MENUSELECT_CFLAGS=DONT_OPTIMIZE DEBUG_THREADS LOADABLE_MODULES

By: Terry Wilson (twilson) 2008-12-10 16:43:52.000-0600

I have reproduced this and will take a look at it.

By: Terry Wilson (twilson) 2008-12-11 11:26:22.000-0600

Nugget: Could I get you to try checking out the 1.6.1 branch and testing that to see if it is fixed for you there?  I can recreate the issue in the 1.6.0 branch but not the 1.6.1 and would like to see if the same is true for you.

By: David McNett (nugget) 2008-12-11 11:32:03.000-0600

Sure, I'd be happy to.  I had experienced the same problem with 1.6.1-beta2 but haven't tried beta3 or anything from SVN.  Will do so and post results.

By: Digium Subversion (svnbot) 2008-12-12 12:19:44.000-0600

Repository: asterisk
Revision: 163642

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r163642 | russell | 2008-12-12 12:19:43 -0600 (Fri, 12 Dec 2008) | 7 lines

Resolve crashes when using SIP TCP/TLS with qualify.

The problem was a reference count error on the tcptls_session structure.

(closes issue ASTERISK-13138)
Reported by: Nugget

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

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