[Home]

Summary:ASTERISK-16397: [regression][patch] Core dump when loading sip peers
Reporter:outcast (outcast)Labels:
Date Opened:2010-07-20 14:20:14Date Closed:2010-07-24 13:20:18
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt.txt
( 1) btfull.txt
( 2) issue0017677.patch
Description:When I load the following peer asterisk core dumps

[sip.broadvoice.com]
type=peer
user=phone
host=sip.broadvoice.com
fromdomain=sip.broadvoice.com
fromuser=4137711403
secret=xxxxxx
username=4137711403
insecure=port,invite
context=from-broadvoice
authname=4137711403
fromsipuri=sip:4137711403@sip.broadvoice.com
dtmfmode=inband
dtmf=inband
;Disable canreinvite if you are behind a NAT
canreinvite=no
nat=no
Comments:By: Paul Belanger (pabelanger) 2010-07-20 14:34:39

Your backtrace is optimized (see below).  On a side note, I take it this configuration previously worked?

---
Thank you for your bug report. In order to move your issue forward, we require a backtrace from the core file produced after the crash. Please see the doc/backtrace.txt file in your Asterisk source directory.

Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

make install

after enabling, reproduce the crash, and then execute the instructions in doc/backtrace.txt.

When complete, attach that file to this issue report. Thanks!

By: Paul Belanger (pabelanger) 2010-07-20 14:43:46

Additionally, your settings need to be update if you are using trunk.  IE canreinvite, username have been deprecated.

Edit: For what it is worth, I could not reproduce the crash.  More information about how you 'load sip peers' would be required.



By: Michael L. Young (elguero) 2010-07-23 16:36:42

I've been seeing this too with trunk on my dev VM - Fedora 13 2.6.33.6-147.fc13.x86_64.

Please see the attached backtrace.

By: Paul Belanger (pabelanger) 2010-07-23 17:33:50

Ok, I _think_ I see the problem.  If interested give this patch ago.  Cannot guarantee it will fix the issue.

Edit: For what it's worth, this looks to be a regression after the introduction of IPv6.



By: Michael L. Young (elguero) 2010-07-23 18:09:03

Yes, you are correct that it does appear to be a regression after IPv6 was merged in.

I can confirm that the patch has resolved the crash.

Thanks

By: Paul Belanger (pabelanger) 2010-07-23 20:42:41

Thanks for the feedback, we should be able to continue the triage.

Edit: Do you mind posting your sip peer?  I'd like to see if I can reproduce it, and write a testsuite.



By: Michael L. Young (elguero) 2010-07-24 08:04:50

Sure, no problem:

[peer1]
context=peer1context
type=peer
host=192.168.1.2
callbackextension=9991
directmedia=no
insecure=port,invite
dtmfmode=rfc2833
qualify=yes
disallow=all
allow=ulaw
nat=no

[peer2]
context=peer2context
type=peer
host=192.168.1.2
callbackextension=9992
directmedia=no
insecure=port,invite
dtmfmode=rfc2833
qualify=yes
disallow=all
allow=ulaw
nat=no

By: Digium Subversion (svnbot) 2010-07-24 13:18:43

Repository: asterisk
Revision: 279280

U   branches/1.8/include/asterisk/netsock2.h

------------------------------------------------------------------------
r279280 | pabelanger | 2010-07-24 13:18:42 -0500 (Sat, 24 Jul 2010) | 8 lines

Check if ast_sockaddr is NULL then return.

(closes issue ASTERISK-16397)
Reported by: outcast
Patches:
     issue0017677.patch uploaded by pabelanger (license 224)
Tested by: elguero

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

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

By: Digium Subversion (svnbot) 2010-07-24 13:20:17

Repository: asterisk
Revision: 279285

_U  trunk/
U   trunk/include/asterisk/netsock2.h

------------------------------------------------------------------------
r279285 | pabelanger | 2010-07-24 13:20:17 -0500 (Sat, 24 Jul 2010) | 15 lines

Merged revisions 279280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r279280 | pabelanger | 2010-07-24 14:18:43 -0400 (Sat, 24 Jul 2010) | 8 lines
 
 Check if ast_sockaddr is NULL then return.
 
 (closes issue ASTERISK-16397)
 Reported by: outcast
 Patches:
       issue0017677.patch uploaded by pabelanger (license 224)
 Tested by: elguero
........

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

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