[Home]

Summary:ASTERISK-16761: Segmentation fault caused by "core restart when convenient" while SRTP call is active
Reporter:Stefan Tichy (st)Labels:
Date Opened:2010-10-03 09:50:15Date Closed:2010-10-18 10:15:52
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Resources/res_srtp
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) core-restart-when-convenient
( 1) full.txt
Description:Phone call (SIP TCP / SRTP) from some phone (here Snom 360, 7.3.7) to Asterisk 1.8.0-rc2. Asterisk answers and plays some sound file.

CLI command "core restart when convenient" will cause segmentation fault if issued during call and SRTP is used.

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

gdb backtrace

[default]
exten => _X.,1,Verbose(2,${CALLERID(all)})
exten => _X.,n,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(tt-weasels)
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(tt-weasels)
exten => _X.,n,Hangup
Comments:By: Stefan Schmidt (schmidts) 2010-10-04 00:29:31

it looks like it crash on shutdown itself when asterisk tries to remove the sip dialog. does this happen directly after your command restart or when the call is finished?

By: Stefan Tichy (st) 2010-10-04 04:16:10

It happens when the call is finished.

Waiting for inactivity to perform restart
Waiting for inactivity to perform restart

dialplan execution continues

............

 == Unregistered RTP glue 'SIP'
 == Manager unregistered action SIPpeers
 == Manager unregistered action SIPshowpeer
 == Manager unregistered action SIPqualifypeer
 == Manager unregistered action SIPshowregistry
 == Manager unregistered action SIPnotify
Segmentation fault

By: Stefan Schmidt (schmidts) 2010-10-04 04:31:34

looks like it happens in ast_tcptls_server_stop. i will have a look at this

could you pleas try this with debug turned on (level 10 or higher) and see if you get a "Stopped server :: TCP" or TLS message.



By: Stefan Tichy (st) 2010-10-04 07:22:06

Asterisk writes Stopped server :: TCP / TLS messages (attachment full.txt)

By: Stefan Schmidt (schmidts) 2010-10-16 02:26:42

should not revision 292016 close this issue?

i just notice cause its a blocker.

best regards

stefan

By: Digium Subversion (svnbot) 2010-10-18 10:15:51

Repository: asterisk
Revision: 292016

U   branches/1.8/res/res_srtp.c

------------------------------------------------------------------------
r292016 | twilson | 2010-10-15 16:40:56 -0500 (Fri, 15 Oct 2010) | 8 lines

Ref/unref res_srtp when we create/destroy a session

This avoids unhappy crashing when we try to 'core stop gracefully' and res_srtp
tries to unload before chan_sip does. Thanks, Russell!

(closes issue ASTERISK-16761)
Reported by: st

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

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