|Summary:||ASTERISK-19202: CSipSimple (trunk) crushes Asterisk 126.96.36.199 (openSuse)|
|Reporter:||Catalin Sanda (firstname.lastname@example.org)||Labels:|
|Date Opened:||2012-01-15 15:42:21.000-0600||Date Closed:||2012-01-19 15:15:01.000-0600|
|Environment:||openSUSE 11.4 (x86_64) http://download.opensuse.org/repositories/network:/telephony:/asterisk-1_8/openSUSE_11.4/||Attachments:||( 0) backtrace.txt|
( 1) backtrace2.txt
( 2) debug
( 3) gdb.txt
( 4) issueA19202_crypto_if_uninited_text_or_video.patch
|Description:||When I try to make a call with CSipSimple over sips/srtp Aterisk crushes.|
The crush happens every time.
The same setup works with Blink.
|Comments:||By: Catalin Sanda (email@example.com) 2012-01-15 15:53:15.079-0600|
The stacktrace has some values optimized out. I'll try to recompile with the DONT_OPTIMIZE flag on and add a new backtrace.
By: Walter Doekes (wdoekes) 2012-01-16 02:20:07.959-0600
p->rtp shouldn't be null there. Looks like either (a) memory was overwritten or (b) a different thread has been writing to p or (c) some function is in this short bit of code is setting rtp to null there.
If possible please supply the full bt for the other threads and (thread apply all bt) and the incoming SDP message ('sip set debug on') and chan_sip debugging ('core set debug 5 chan_sip').
By: Paul Belanger (pabelanger) 2012-01-17 16:24:03.680-0600
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. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:
After enabling, reproduce the crash, and then execute the backtrace instructions. When complete, attach that file to this issue report.
By: Catalin Sanda (firstname.lastname@example.org) 2012-01-18 15:07:13.649-0600
I'm attaching a new backtrace. Let me know if you need additional info.
By: Matt Jordan (mjordan) 2012-01-18 15:29:31.628-0600
Catalin - the backtrace gives us a good place to work from - but can you also add the SIP trace? Either with a pcap from wireshark or from Asterisk with sip set debug on?
By: Catalin Sanda (email@example.com) 2012-01-18 15:59:04.135-0600
Please find attached the debug info.
By: Walter Doekes (wdoekes) 2012-01-19 03:09:58.764-0600
Patch issueA19202_crypto_if_uninited_text_or_video.patch should fix crash caused by this simple SDP:
m=(video|text) 12345 RTP/(S)?AVP 97 96
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:abcdefghijklmnopqrstuvwxyz0123456789ABCD
loaded modules (besides res_rtp and chan_sip):
> allowguest=yes (default) OR an authenticated sip user!
> textsupport=no (default) [for the "m=text" crash]
> videosupport=no (default) [for the "m=video" crash]
a couple of possible fixes/workarounds:
> apply patch
> unload res_srtp
> enable both 'videosupport' and 'textsupport' in sip.conf
By: Walter Doekes (wdoekes) 2012-01-19 03:21:24.272-0600
(P.S. 1.6.2.x and lower look unaffected. They don't do crypto and they're not touching p->trtp and p->vrtp in process_sdp without checking them against NULL.)
By: Catalin Sanda (firstname.lastname@example.org) 2012-01-19 13:56:14.901-0600
I applied the patch and now it works.
Thanks a lot!