[asterisk-bugs] [Asterisk 0014211]: Asterisk Crashes with signal 11 (segmentation fault) at random intervals (but at least 2 times a day)

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 12 17:08:20 CST 2009


The following issue is now READY FOR TESTING. 
====================================================================== 
http://bugs.digium.com/view.php?id=14211 
====================================================================== 
Reported By:                aborghi
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14211
Category:                   Channels/chan_sip/Registration
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.22 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2009-01-11 16:34 CST
Last Modified:              2009-01-12 17:08 CST
====================================================================== 
Summary:                    Asterisk Crashes with signal 11 (segmentation fault)
at random intervals (but at least 2 times a day)
Description: 
Asterisk Crashes with signal 11 (segmentation fault) at random intervals
(but at least 2 times a day)

Asterisk began crashing after a configuration change to the sip channel to
handle two additional Corda numbers (before we had only one number and the
server keep running months).
Beside the obvious error in sip configuration i was going to solve,
asterisk began crashing more or less regularly after adding the
registrations for the new corda numbers, totalling 3 SIP registrations to
the cordia servers.

while debugging, I noted that che cordia servers does not seem to reply in
a timely manner to the sip requests, delaying registrations for long time
before accepting it.

from various backtraces i done while preparing the files for the report,
form various different crashes, i see that the signal 11 occours every time
in handle_response_register

A thing i noted is that while i have registerattempts=10 when the
registrations to cordia are timing out in the messages in the console i see
ALWAYS the attempt count a 0. It seems that asterisk is not counting
attempts to register to the cordia servers so it is not reaching the limit
i imposed of 10 attempts.


====================================================================== 

---------------------------------------------------------------------- 
 (0097546) putnopvut (administrator) - 2009-01-12 17:08
 http://bugs.digium.com/view.php?id=14211#c97546 
---------------------------------------------------------------------- 
I believe I have found the problem here. I was mistakenly looking at the
code in handle_response_register for a 200 OK response, but the line number
indicated in your backtrace actually pointed to the section responsible for
handling a 408 response. A 408 is a request timeout, which most likely
meant that our registration attempt had timed out locally as well. As a
result, the object we were attempting to dereference was NULLed out when
the registration timed out.

I have uploaded a patch, 14211.diff, which adds a check for the pointer as
well as a warning message to appear when a 408 is received and the
sip_registry object we wish to modify has been destroyed already. Please
test and let me know if this works for you. Thank you very much! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-12 17:08 putnopvut      Note Added: 0097546                          
2009-01-12 17:08 putnopvut      Status                   assigned => ready for
testing
======================================================================




More information about the asterisk-bugs mailing list