<div dir="ltr"><div>Hi!</div><div> </div><div>Looking for some help as to why the SCA module is crashing randomly on 4.0.4. It has crashed several times with a backtrace that shows these stack calls:</div><div> </div><div>
(gdb) backtrace<br> #0 0x00000000 in ?? ()<br> #1 0x4dceca11 in sca_hash_table_slot_kv_delete_unsafe () from /usr/lib/kamailio/modules/sca.so<br> #2 0x4dcecaaa in sca_hash_table_slot_kv_delete () from /usr/lib/kamailio/modules/sca.so<br>
#3 0x4dcecb1e in sca_hash_table_index_kv_delete () from /usr/lib/kamailio/modules/sca.so<br> #4 0x4dcecb99 in sca_hash_table_kv_delete () from /usr/lib/kamailio/modules/sca.so<br> #5 0x4dcf30bc in sca_appearance_unregister () from /usr/lib/kamailio/modules/sca.so<br>
#6 0x4dd0d9b9 in sca_call_info_update () from /usr/lib/kamailio/modules/sca.so<br> #7 0x126a6a9a in do_action ()<br> #8 0x126af88e in run_actions ()<br> #9 0x126a4731 in do_action ()<br> #10 0x126af88e in run_actions ()<br>
#11 0x126b007f in run_top_route ()<br> #12 0x1269dd7e in receive_msg ()<br> #13 0x12734f01 in udp_rcv_loop ()<br> #14 0x126d3f56 in main_loop ()<br> #15 0x126d76de in main ()<br></div><div>The message that seemed to trigger the crash in this particular case was the following INVITE:</div>
<div> </div><div>INVITE <a href="mailto:sip%3A35705@10.250.16.71">sip:35705@10.250.16.71</a>;user=phone SIP/2.0</div><div><span><strong>Record-Route:</strong></span>
<sip:10.250.16.70;lr=on;ftag=D8B14B68-93D21A25;did=513b.a3741> <br><span><strong>Via:</strong></span> SIP/2.0/UDP 10.250.16.70;branch=z9hG4bKc43b.14d180e6.0
<br><span><strong>Via:</strong></span> SIP/2.0/UDP
10.250.88.116;branch=z9hG4bK8d3ec33e632D8AB3 <br><span><strong>From:</strong></span>
PIN-1 WKL USA <sip:15862@<strong><font color="#ff0000">obscured</font></strong>>;tag=D8B14B68-93D21A25 <br><span><strong>To:</strong></span> <sip:0@<strong><font color="#ff0000">obscured</font></strong>;user=phone> <br>
<span><strong>CSeq:</strong></span> 1 INVITE <br><span><strong>Call-ID:</strong></span>
<a href="mailto:c69594c-ff17a5d9-d6ed4f6a@10.250.88.116">c69594c-ff17a5d9-d6ed4f6a@10.250.88.116</a> <br><span><strong>Contact:</strong></span>
<<a href="mailto:sip%3A15862@10.250.88.116">sip:15862@10.250.88.116</a>> <br><span><strong>Allow:</strong></span> INVITE,
ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE,
REFER <br><span><strong>User-Agent:</strong></span>
PolycomSoundPointIP-SPIP_335-UA/4.0.3.7562 <br><span><strong>Accept-Language:</strong></span> en <br><span><strong>Supported:</strong></span>
100rel,replaces <br><span><strong>Allow-Events:</strong></span> conference,talk,hold
<br><span><strong>Max-Forwards:</strong></span> 32 <br><span><strong>Content-Type:</strong></span> application/sdp <br><span><strong>Content-Length:</strong></span> 296 </div><div> </div><div>v=0<br>o=- 1383792680 1383792680 IN IP4 10.250.88.116<br>
s=Polycom IP
Phone<br>c=IN IP4 10.250.88.116<br>t=0 0<br>a=sendrecv<br>m=audio 2230 RTP/AVP 9
18 0 8 101<br>a=rtpmap:9 G722/8000<br>a=rtpmap:18 G729/8000<br>a=fmtp:18
annexb=no<br>a=rtpmap:0 PCMU/8000<br>a=rtpmap:8 PCMA/8000<br>a=rtpmap:101
telephone-event/8000<div> </div><div>I have a pcap trace that shows all the calls from 3 hours prior and this is the first time this device appeared.</div><div> </div></div><div>I followed the code down to the <font face="courier new,monospace">sca_hash_table_slot_kv_delete_unsafe ()</font> routine and it appears to have crashed when it tried to use <font face="courier new,monospace">e->free_entry</font> which seems to have been NULL at that point. I'm not sure how it could be NULL since it should have been initialized in <font face="courier new,monospace">sca_hash_table_slot_kv_insert_unsafe ()</font>. I'm guessing that either <font face="courier new,monospace">e->free_entry</font> was never initialized or somehow it was overwritten. Since several backtraces end in the same way the bug seems to have be specific to some sequence of events I have not been able to identify.</div>
<div> </div><div>Any help tracking this down would be appreciated.</div><div> </div><div>Thanks,</div><div>Bob</div></div>