<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span>Hi,</span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">Since I am getting errors in from the usrloc module, I am trying another way to parse out the information I need using pv.so.</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; ">I'm encountering similar segfaults issues. Here are snippets of my configs:</div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font size="2">modparam("sipcapture", "db_url", "mysql://xxx:xxx@localhost/test_db")</font></div><div><font size="2">modparam("sipcapture", "capture_on", 1)</font></div><div><font
 size="2">modparam("sipcapture", "table_name", "sip_capture")</font></div><div><font size="2">modparam("sipcapture", "raw_socket_listen", "127.0.0.1:5060-9000")</font></div><div><font size="2">modparam("sipcapture", "raw_interface", "eth2")</font></div><div><font size="2">modparam("sipcapture", "raw_sock_children", 4)</font></div><div><font size="2">modparam("sipcapture", "raw_moni_capture_on", 1)</font></div><div><font size="2">modparam("sipcapture", "promiscious_on", 1)</font></div><div><font size="2"><br></font></div></div><div><div><font size="2">route {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; if (method == "REGISTER") {</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>if (avp_check("$si","eq/10.xxx.xxx.xxx")) {</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>#save("location", "0x04"); # This currently results in segfault and is being
 addressed by Alexandr</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>sip_capture();</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>xlog("The received IP is $Ri\n"); # Just to test if I am able to parse the received IP from the Via headers correctly</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                        </span>drop;</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>}</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>drop;</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div><font size="2">}</font></div></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div><font size="2">Feb 17 13:41:02 ubuntu kernel: [251382.760104] kamailio[9414]: segfault
 at 31 ip 00007fb4ef077611 sp 00007fff0c8a6468 error 4 in pv.so[7fb4ef06a000+39000]</font><br></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font size="2">Core was generated by `kamailio -w /home/core'.</font></div><div><font size="2">Program terminated with signal 11, Segmentation fault.</font></div><div><font size="2">#0 &nbsp;pv_get_rcvip (msg=0x7fb4efdd7598, param=0x7fb4efdcef88, res=0x7fff0c8a64b0) at pv_core.c:647</font></div><div><font size="2">647 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || msg-&gt;rcv.bind_address-&gt;address_str.s==NULL)</font></div><div><font size="2"><br></font></div><div><font size="2">(gdb) bt</font></div><div><font size="2">#0 &nbsp;pv_get_rcvip (msg=0x7fb4efdd7598, param=0x7fb4efdcef88, res=0x7fff0c8a64b0) at pv_core.c:647</font></div><div><font size="2">#1 &nbsp;0x000000000049b5ad in pv_get_spec_value
 (msg=0x7fb4efdd7598, sp=0x7fb4efdcef70, value=0x7fff0c8a64b0) at pvapi.c:1180</font></div><div><font size="2">#2 &nbsp;0x000000000049b71d in pv_printf (msg=0x7fb4efdd7598, list=&lt;optimized out&gt;, buf=&lt;optimized out&gt;, len=0x7fff0c8a6558) at pvapi.c:1239</font></div><div><font size="2">#3 &nbsp;0x00007fb4ed0d442e in xlog_helper (msg=&lt;optimized out&gt;, xm=0x7fb4efdceef0, level=-1, line=0) at xlog.c:168</font></div><div><font size="2">#4 &nbsp;0x000000000041babb in do_action (h=0x7fff0c8a73b0, a=0x7fb4efdd02a0, msg=0x7fb4efdd7598) at action.c:1122</font></div><div><font size="2">#5 &nbsp;0x000000000041abe2 in run_actions (h=0x7fff0c8a73b0, a=0x7fb4efdd0080, msg=0x7fb4efdd7598) at action.c:1610</font></div><div><font size="2">#6 &nbsp;0x000000000041c05b in do_action (h=0x7fff0c8a73b0, a=0x7fb4efdd10d0, msg=0x7fb4efdd7598) at action.c:1107</font></div><div><font size="2">#7 &nbsp;0x000000000041abe2 in run_actions (h=0x7fff0c8a73b0,
 a=0x7fb4efdd10d0, msg=0x7fb4efdd7598) at action.c:1610</font></div><div><font size="2">#8 &nbsp;0x000000000041c05b in do_action (h=0x7fff0c8a73b0, a=0x7fb4efdd1350, msg=0x7fb4efdd7598) at action.c:1107</font></div><div><font size="2">#9 &nbsp;0x000000000041abe2 in run_actions (h=0x7fff0c8a73b0, a=0x7fb4efdd1350, msg=0x7fb4efdd7598) at action.c:1610</font></div><div><font size="2">#10 0x0000000000422fa2 in run_top_route (a=0x7fb4efdd1350, msg=0x7fb4efdd7598, c=&lt;optimized out&gt;) at action.c:1683</font></div><div><font size="2">#11 0x00000000004b061e in receive_msg (buf=&lt;optimized out&gt;, len=&lt;optimized out&gt;, rcv_info=&lt;optimized out&gt;) at receive.c:207</font></div><div><font size="2">#12 0x00007fb4edb538b0 in raw_capture_rcv_loop (rsock=5, port1=5060, port2=8933, ipip=0) at sipcapture.c:1518</font></div><div><font size="2">#13 0x00007fb4edb53e1f in init_rawsock_children () at sipcapture.c:572</font></div><div><font size="2">#14
 0x00007fb4edb54033 in child_init (rank=&lt;optimized out&gt;) at sipcapture.c:542</font></div><div><font size="2">#15 0x0000000000507a0f in init_mod_child (m=0x7fb4efdcb2b0, rank=0) at sr_module.c:886</font></div><div><font size="2">#16 0x0000000000507974 in init_mod_child (m=0x7fb4efdcb668, rank=0) at sr_module.c:883</font></div><div><font size="2">#17 0x0000000000507974 in init_mod_child (m=0x7fb4efdcc178, rank=0) at sr_module.c:883</font></div><div><font size="2">#18 0x0000000000507974 in init_mod_child (m=0x7fb4efdcc4b0, rank=0) at sr_module.c:883</font></div><div><font size="2">#19 0x0000000000507974 in init_mod_child (m=0x7fb4efdccaf0, rank=0) at sr_module.c:883</font></div><div><font size="2">#20 0x0000000000507974 in init_mod_child (m=0x7fb4efdcd030, rank=0) at sr_module.c:883</font></div><div><font size="2">#21 0x0000000000476149 in main_loop () at main.c:1661</font></div><div><font size="2">#22 0x000000000041a940 in main (argc=&lt;optimized
 out&gt;, argv=0x7fff0c8a7be8) at main.c:2475</font></div><div><font size="2"><br></font></div><div><font size="2">(gdb) p *msg</font></div><div><font size="2">$1 = {id = 82, pid = 9418, fwd_send_flags = {f = 0 '\000', blst_imask = 0 '\000'}, rpl_send_flags = {f = 0 '\000', blst_imask = 0 '\000'}, first_line = {</font></div><div><font size="2">&nbsp; &nbsp; type = 1, len = 43, u = {request = {method = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d2a "REGISTER sip:abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCal"..., len = 8}, uri = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d33 "sip:abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo:
 &lt;sip:9995551234@abc.def.com&gt;\r\nCall-ID: 225"..., len = 24}, version = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d4c "SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCall-ID: 2257e150-b49dfd8d-c8d924b2@1"..., len = 7}, method_value = 32}, reply = {version = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d2a "REGISTER sip:abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCal"..., len = 8}, status = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d33 "sip:abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo:
 &lt;sip:9995551234@abc.def.com&gt;\r\nCall-ID: 225"..., len = 24}, reason = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d4c "SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCall-ID: 2257e150-b49dfd8d-c8d924b2@1"..., len = 7}, statuscode = 32}}}, via1 = 0x7fb4efdd7ef0,&nbsp;</font></div><div><font size="2">&nbsp; via2 = 0x7fb4efdd8218, headers = 0x7fb4efdd7e50, last_header = 0x7fb4efdd87c0, parsed_flag = 18446744073709551615, h_via1 = 0x7fb4efdd80d8,&nbsp;</font></div><div><font size="2">&nbsp; h_via2 = 0x7fb4efdd8178, callid = 0x7fb4efdd19b0, to = 0x7fb4efdd1910, cseq = 0x7fb4efdd7c80, from = 0x7fb4efdd7e50, contact = 0x7fb4efdd84a0,&nbsp;</font></div><div><font size="2">&nbsp; maxforwards = 0x7fb4efdd8680, route = 0x0, record_route = 0x0, content_type = 0x0, content_length = 0x7fb4efdd87c0,
 authorization = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; expires = 0x7fb4efdd8720, proxy_auth = 0x0, supported = 0x0, require = 0x0, proxy_require = 0x0, unsupported = 0x0, allow = 0x0, event = 0x0, accept = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; accept_language = 0x7fb4efdd85e0, organization = 0x0, priority = 0x0, subject = 0x0, user_agent = 0x7fb4efdd8540, server = 0x0, content_disposition = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; accept_disposition = 0x0, diversion = 0x0, rpid = 0x0, refer_to = 0x0, session_expires = 0x0, min_se = 0x0, sipifmatch = 0x0, subscription_state = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; date = 0x0, identity = 0x0, identity_info = 0x0, pai = 0x0, ppi = 0x0, path = 0x0, privacy = 0x0, body = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; eoh = 0x7fb4edd58036 "12963462\", realm=\"proxyApp\", nonce=\"proxyAppXgyrmj82aTujp3sdBW\", uri=\"sip:abc.def.com\",
 response=\"039891b3f5999b90a645d3e808c2147c\", algorithm=MD5, cnonce=\"l7/u88HtGJCOAmM\", qop=auth, nc="...,&nbsp;</font></div><div><font size="2">&nbsp; unparsed = 0x7fb4edd58036 "12963462\", realm=\"proxyApp\", nonce=\"proxyAppXgyrmj82aTujp3sdBW\", uri=\"sip:abc.def.com\", response=\"039891b3f5999b90a645d3e808c2147c\", algorithm=MD5, cnonce=\"l7/u88HtGJCOAmM\", qop=auth, nc="..., rcv = {src_ip = {af = 2, len = 4, u = {addrl = {140411255757578,&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4294967291}, addr32 = {184916746, 32692, 4294967291, 0}, addr16 = {39690, 2821, 32692, 0, 65531, 65535, 0, 0},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; addr = "\n\233\005\v\264\177\000\000\373\377\377\377\000\000\000"}}, dst_ip = {af = 2, len = 4, u = {addrl = {140414021193994, 5273972}, addr32 = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2950353162, 32692, 5273972, 0}, addr16 = {53514,
 45018, 32692, 0, 31092, 80, 0, 0}, addr = "\n\321گ\264\177\000\000tyP\000\000\000\000"}},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; src_port = 5060, dst_port = 5060, proto_reserved1 = 32692, proto_reserved2 = -266587208, src_su = {s = {sa_family = 2,&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; sa_data = "\023\304\n\233\005\v\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 184916746},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 50195, sin6_flowinfo = 184916746, sin6_addr = {__in6_u = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __u6_addr8 = '\000' &lt;repeats 15 times&gt;, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; bind_address = 0x1, proto = 1
 '\001'},&nbsp;</font></div><div><font size="2">&nbsp; buf = 0x7fb4edd57d2a "REGISTER sip:abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCal"..., len = 782, new_uri = {s = 0x0, len = 0}, dst_uri = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; parsed_uri_ok = 1, parsed_uri = {user = {s = 0x0, len = 0}, passwd = {s = 0x0, len = 0}, host = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; s = 0x7fb4edd57d37 "abc.def.com SIP/2.0\r\nFrom: \"9995551234\" &lt;sip:9995551234@abc.def.com;rp=SandboxTestingRegistrations&gt;;tag=F9EEDA6C-E203EB89\r\nTo: &lt;sip:9995551234@abc.def.com&gt;\r\nCall-ID: 2257e15"..., len = 20}, port = {s = 0x0, len = 0}, params = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0,
 type = SIP_URI_T, flags = 0, transport = {s = 0x0, len = 0}, ttl = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; s = 0x0, len = 0}, user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; len = 0}, transport_val = {s = 0x0, len = 0}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}}, parsed_orig_ruri_ok = 0, parsed_orig_ruri = {user = {s = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; len = 0}, passwd = {s = 0x0, len = 0}, host = {s = 0x0, len = 0}, port = {s = 0x0, len = 0}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; len = 0}, headers = {s
 = 0x0, len = 0}, port_no = 0, proto = 0, type = ERROR_URI_T, flags = 0, transport = {s = 0x0, len = 0}, ttl = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; &nbsp; transport_val = {s = 0x0, len = 0}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {</font></div><div><font size="2">&nbsp; &nbsp; &nbsp; s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}}, add_rm = 0x0, body_lumps = 0x0, reply_lump = 0x0,&nbsp;</font></div><div><font size="2">&nbsp; add_to_branch_s = '\000' &lt;repeats 57 times&gt;, add_to_branch_len = 0, hash_index = 0, msg_flags = 0, flags = 0, set_global_address = {s = 0x0, len = 0},&nbsp;</font></div><div><font size="2">&nbsp; set_global_port
 = {s = 0x0, len = 0}, force_send_socket = 0x0, path_vec = {s = 0x0, len = 0}}</font></div><div><font size="2">&nbsp;&nbsp;</font></div><div><font size="2">(gdb) p *msg-&gt;rcv.bind_address</font></div><div><font size="2">Cannot access memory at address 0x1</font></div><div><font size="2"><br></font></div><div><font size="2">(gdb)&nbsp;</font></div><div><font size="2"><br></font></div><div><font size="2">Thanks,</font></div><div><font size="2">Simpson</font></div></div><div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt; "><br></div>  <div style="font-size: 10pt; font-family: verdana, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> "sr-users-request@lists.sip-router.org" &lt;sr-users-request@lists.sip-router.org&gt;<br> <b><span style="font-weight:
 bold;">To:</span></b> sr-users@lists.sip-router.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, February 17, 2012 7:34 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> sr-users Digest, Vol 81, Issue 52<br> </font> </div> <br>Send sr-users mailing list submissions to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>or, via email, send a message with subject or body 'help' to<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:sr-users-request@lists.sip-router.org" href="mailto:sr-users-request@lists.sip-router.org">sr-users-request@lists.sip-router.org</a><br><br>You can reach the person
 managing the list at<br>&nbsp;&nbsp;&nbsp; <a ymailto="mailto:sr-users-owner@lists.sip-router.org" href="mailto:sr-users-owner@lists.sip-router.org">sr-users-owner@lists.sip-router.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of sr-users digest..."<br><br><br>Today's Topics:<br><br>&nbsp;  1. Re: ndb_redis module fails after a while<br>&nbsp; &nbsp; &nbsp; (Daniel-Constantin Mierla)<br>&nbsp;  2. Re: Kamailio Exits With: Segmentation Fault Error 4 in<br>&nbsp; &nbsp; &nbsp; usrloc.so (Alexandr Dubovikov)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 17 Feb 2012 14:30:44 +0100<br>From: Daniel-Constantin Mierla &lt;<a ymailto="mailto:miconda@gmail.com" href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;<br>Subject: Re: [SR-Users] ndb_redis module fails after a while<br>To: "SIP Router - Kamailio (OpenSER) and SIP Express
 Router (SER) -<br>&nbsp;&nbsp;&nbsp; Users&nbsp;&nbsp;&nbsp; Mailing List" &lt;<a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>Cc: Javier Gallart &lt;<a ymailto="mailto:jgallartm@gmail.com" href="mailto:jgallartm@gmail.com">jgallartm@gmail.com</a>&gt;<br>Message-ID: &lt;<a ymailto="mailto:4F3E5684.3090203@gmail.com" href="mailto:4F3E5684.3090203@gmail.com">4F3E5684.3090203@gmail.com</a>&gt;<br>Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br><br>Hello,<br><br>right, very dummy paste position for resetting the redis context, use <br>the attached patch or exchange lines 228 and 229. in redis_client.c<br><br>Thanks,<br>Daniel<br><br><br>On 2/17/12 1:13 PM, Javier Gallart wrote:<br>&gt; Hi Daniel, Andrew<br>&gt;<br>&gt; I've just tested the patch and kamailio crashes when the redis server <br>&gt; is stopped. This is what I could get:<br>&gt; -From the
 logs:<br>&gt; Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: &lt;core&gt; <br>&gt; [main.c:751]: child process 23819 exited by a signal 11<br>&gt; Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: &lt;core&gt; <br>&gt; [main.c:754]: core was generated<br>&gt; Feb 17 06:33:32 r-gate-test ./kamailio[23812]: INFO: &lt;core&gt; <br>&gt; [main.c:766]: INFO: terminating due to SIGCHLD<br>&gt;<br>&gt; -An the backtrace:<br>&gt; (...)<br>&gt; Core was generated by `./kamailio -f ../etc/kamailio/kamailio.cfg'.<br>&gt; Program terminated with signal 11, Segmentation fault.<br>&gt; #0&nbsp; redisFree (c=0x0) at hiredis.c:817<br>&gt; 817&nbsp;  if (c-&gt;fd &gt; 0)<br>&gt; (gdb) bt<br>&gt; #0&nbsp; redisFree (c=0x0) at hiredis.c:817<br>&gt; #1&nbsp; 0x00007f726f035461 in redisc_reconnect_server <br>&gt; (rsrv=0x7f7271c93ac0) at redis_client.c:229<br>&gt; #2&nbsp; 0x00007f726f037240 in redisc_exec (srv=&lt;value optimized out&gt;, <br>&gt;
 cmd=0x7fffe98c6090, argv1=&lt;value optimized out&gt;, argv2=&lt;value <br>&gt; optimized out&gt;, argv3=&lt;value optimized out&gt;,<br>&gt;&nbsp; &nbsp;  res=&lt;value optimized out&gt;) at redis_client.c:298<br>&gt; #3&nbsp; 0x00007f726f034f7d in w_redis_cmd3 (msg=0x7f7271d7b018, <br>&gt; ssrv=&lt;value optimized out&gt;, scmd=&lt;value optimized out&gt;, <br>&gt; sres=0x7f7271d74b58 "h\341\313qr\177") at ndb_redis_mod.c:156<br>&gt; #4&nbsp; 0x0000000000417025 in do_action (h=0x7fffe98c6570, <br>&gt; a=0x7f7271cc5248, msg=&lt;value optimized out&gt;) at action.c:1134<br>&gt; #5&nbsp; 0x000000000041e58b in run_actions (h=&lt;value optimized out&gt;, <br>&gt; a=&lt;value optimized out&gt;, msg=&lt;value optimized out&gt;) at action.c:1610<br>&gt; #6&nbsp; 0x000000000041e8d4 in run_actions_safe (h=0x7fffe98c7610, <br>&gt; a=0x7f7271c93781, msg=0x7f7271c93780) at action.c:1662<br>&gt; #7&nbsp; 0x00000000004b731d in rval_get_int (h=0x7fffe98c7610,
 msg=0x0, <br>&gt; i=0x7fffe98c6bd8, rv=0x3, cache=0x4) at rvalue.c:920<br>&gt; #8&nbsp; 0x00000000004bb87c in rval_expr_eval_int (h=0x7fffe98c7610, <br>&gt; msg=0x7f7271d7b018, res=0x7fffe98c6bd8, rve=0x7f7271cc6768) at <br>&gt; rvalue.c:1914<br>&gt; #9&nbsp; 0x0000000000417c7c in do_action (h=0x7fffe98c7610, <br>&gt; a=0x7f7271ccb9d0, msg=&lt;value optimized out&gt;) at action.c:1092<br>&gt; #10 0x000000000041e58b in run_actions (h=&lt;value optimized out&gt;, <br>&gt; a=&lt;value optimized out&gt;, msg=&lt;value optimized out&gt;) at action.c:1610<br>&gt; #11 0x0000000000417cd7 in do_action (h=0x7fffe98c7610, <br>&gt; a=0x7f7271ccbb10, msg=&lt;value optimized out&gt;) at action.c:1111<br>&gt; #12 0x000000000041e58b in run_actions (h=&lt;value optimized out&gt;, <br>&gt; a=&lt;value optimized out&gt;, msg=&lt;value optimized out&gt;) at action.c:1610<br>&gt; #13 0x000000000041795e in do_action (h=0x7fffe98c7610, a=&lt;value <br>&gt; optimized out&gt;,
 msg=&lt;value optimized out&gt;) at action.c:732<br>&gt; #14 0x000000000041e58b in run_actions (h=&lt;value optimized out&gt;, <br>&gt; a=&lt;value optimized out&gt;, msg=&lt;value optimized out&gt;) at action.c:1610<br>&gt; #15 0x000000000041e862 in run_top_route (a=0x7f7271c94888, <br>&gt; msg=0x7f7271d7b018, c=&lt;value optimized out&gt;) at action.c:1683<br>&gt; #16 0x0000000000498f36 in receive_msg (<br>&gt;&nbsp; &nbsp;  buf=0x8bb100 "INVITE sip:34661574758@79.170.68.215:5060 <br>&gt; &lt;<a href="http://sip:34661574758@79.170.68.215:5060" target="_blank" >http://sip:34661574758@79.170.68.215:5060</a>&gt; SIP/2.0\r\nVia: <br>&gt; SIP/2.0/UDP 79.170.68.214:5060;branch=z9hG4bK-9451-1-0\r\nFrom: <br>&gt; 34661574758 &lt;sip:34661574758@79.170.68.214:5060 <br>&gt; &lt;<a href="http://sip:34661574758@79.170.68.214:5060" target="_blank" >http://sip:34661574758@79.170.68.214:5060</a>&gt;&gt;;tag=9451SIPpTag001\r\nTo: <br>&gt; sut &lt;sip:"...,
 len=&lt;value optimized out&gt;, rcv_info=0x7fffe98c7910) at <br>&gt; receive.c:207<br>&gt; #17 0x0000000000525987 in udp_rcv_loop () at udp_server.c:544<br>&gt; #18 0x00000000004635f4 in main_loop () at main.c:1585<br>&gt; #19 0x0000000000465e62 in main (argc=3, argv=0x7fffe98c7c08) at <br>&gt; main.c:2475<br>&gt;<br>&gt;<br>&gt; Regards<br>&gt;<br>&gt; Javi<br>&gt;<br>&gt; On Fri, Feb 17, 2012 at 11:39 AM, Daniel-Constantin Mierla <br>&gt; &lt;<a ymailto="mailto:miconda@gmail.com" href="mailto:miconda@gmail.com">miconda@gmail.com</a> &lt;mailto:<a ymailto="mailto:miconda@gmail.com" href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp; &nbsp;  Hello,<br>&gt;<br>&gt;&nbsp; &nbsp;  thanks for testing, indeed it was an extra declaration left over.<br>&gt;&nbsp; &nbsp;  Can you try with the new patch attached?<br>&gt;<br>&gt;&nbsp; &nbsp;  Cheers,<br>&gt;&nbsp; &nbsp;  Daniel<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp;  On
 2/17/12 11:10 AM, Andrew Pogrebennyk wrote:<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  Hi Daniel,<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote:<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  I made a patch for server reconnect -- I had no access to<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  a computer<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  with redis lib installed for the moment, hopefully it<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  compiles. If you<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  can try and tell the result, it would be great, I can<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  commit then.<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  I may be able to test this patch as well. Currently<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  compilations bails<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  out on attempt to redeclare redisc_reconnect_server
 function<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  parameter:<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  CC (gcc) [M ndb_redis.so]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ndb_redis_mod.o<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  CC (gcc) [M ndb_redis.so]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  redis_client.o<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  redis_client.c: In function 'redisc_reconnect_server':<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  redis_client.c:206:19: error: 'rsrv' redeclared as different<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  kind of symbol<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  redis_client.c:202:46: note: previous definition of 'rsrv' was<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  here<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  make[1]: *** [redis_client.o] Error 1<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  make: *** [modules] Error 1<br>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  _______________________________________________<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  SIP
 Express Router (SER) and Kamailio (OpenSER) - sr-users<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  mailing list<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  &lt;mailto:<a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp;  -- <br>&gt;&nbsp; &nbsp;  Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>&gt;&nbsp; &nbsp;  <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda"
 target="_blank">http://twitter.com/miconda</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt; <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br>-- <br>Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br><a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: &lt;<a
 href="http://lists.sip-router.org/pipermail/sr-users/attachments/20120217/1d77887f/attachment-0001.htm" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20120217/1d77887f/attachment-0001.htm</a>&gt;<br>-------------- next part --------------<br>diff --git a/modules/ndb_redis/redis_client.c b/modules/ndb_redis/redis_client.c<br>index 9f4ffc4..234bb3a 100644<br>--- a/modules/ndb_redis/redis_client.c<br>+++ b/modules/ndb_redis/redis_client.c<br>@@ -199,6 +199,61 @@ redisc_server_t *redisc_get_server(str *name)<br> /**<br>&nbsp; *<br>&nbsp; */<br>+int redisc_reconnect_server(redisc_server_t *rsrv)<br>+{<br>+&nbsp;&nbsp;&nbsp; char *addr;<br>+&nbsp;&nbsp;&nbsp; unsigned int port, db;<br>+&nbsp;&nbsp;&nbsp; param_t *pit = NULL;<br>+&nbsp;&nbsp;&nbsp; struct timeval tv;<br>+<br>+&nbsp;&nbsp;&nbsp; tv.tv_sec = 1;<br>+&nbsp;&nbsp;&nbsp; tv.tv_usec = 0;<br>+&nbsp;&nbsp;&nbsp; addr = "127.0.0.1";<br>+&nbsp;&nbsp;&nbsp; port =
 6379;<br>+&nbsp;&nbsp;&nbsp; db = 0;<br>+&nbsp;&nbsp;&nbsp; for (pit = rsrv-&gt;attrs; pit; pit=pit-&gt;next)<br>+&nbsp;&nbsp;&nbsp; {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(pit-&gt;name.len==4 &amp;&amp; strncmp(pit-&gt;name.s, "addr", 4)==0) {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; addr = pit-&gt;body.s;<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; addr[pit-&gt;body.len] = '\0';<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if(pit-&gt;name.len==4 &amp;&amp; strncmp(pit-&gt;name.s, "port", 4)==0) {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(str2int(&amp;pit-&gt;body, &amp;port) &lt; 0)<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; port = 6379;<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if(pit-&gt;name.len==2 &amp;&amp; strncmp(pit-&gt;name.s, "db", 2)==0) {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(str2int(&amp;pit-&gt;body,
 &amp;db) &lt; 0)<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; db = 0;<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>+&nbsp;&nbsp;&nbsp; }<br>+&nbsp;&nbsp;&nbsp; if(rsrv-&gt;ctxRedis!=NULL) {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; redisFree(rsrv-&gt;ctxRedis);<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rsrv-&gt;ctxRedis = NULL;<br>+&nbsp;&nbsp;&nbsp; }<br>+<br>+&nbsp;&nbsp;&nbsp; rsrv-&gt;ctxRedis = redisConnectWithTimeout(addr, port, tv);<br>+&nbsp;&nbsp;&nbsp; if(!rsrv-&gt;ctxRedis)<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto err;<br>+&nbsp;&nbsp;&nbsp; if (rsrv-&gt;ctxRedis-&gt;err)<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto err2;<br>+&nbsp;&nbsp;&nbsp; if (redisCommandNR(rsrv-&gt;ctxRedis, "PING"))<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto err2;<br>+&nbsp;&nbsp;&nbsp; if (redisCommandNR(rsrv-&gt;ctxRedis, "SELECT %i", db))<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goto
 err2;<br>+<br>+&nbsp;&nbsp;&nbsp; return 0;<br>+<br>+err2:<br>+&nbsp;&nbsp;&nbsp; LM_ERR("error communicating with redis server [%.*s] (%s:%d/%d): %s\n",<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rsrv-&gt;sname-&gt;len, rsrv-&gt;sname-&gt;s, addr, port, db, rsrv-&gt;ctxRedis-&gt;errstr);<br>+&nbsp;&nbsp;&nbsp; return -1;<br>+err:<br>+&nbsp;&nbsp;&nbsp; LM_ERR("failed to connect to redis server [%.*s] (%s:%d/%d)\n",<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rsrv-&gt;sname-&gt;len, rsrv-&gt;sname-&gt;s, addr, port, db);<br>+&nbsp;&nbsp;&nbsp; return -1;<br>+}<br>+<br>+/**<br>+ *<br>+ */<br> int redisc_exec(str *srv, str *cmd, str *argv1, str *argv2, str *argv3,<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; str *res)<br> {<br>@@ -237,6 +292,14 @@ int redisc_exec(str *srv, str *cmd, str *argv1, str *argv2, str *argv3,<br> &nbsp;&nbsp;&nbsp; c = cmd-&gt;s[cmd-&gt;len];<br> &nbsp;&nbsp;&nbsp; cmd-&gt;s[cmd-&gt;len] = '\0';<br> &nbsp;&nbsp;&nbsp; rpl-&gt;rplRedis
 = redisCommand(rsrv-&gt;ctxRedis, cmd-&gt;s);<br>+&nbsp;&nbsp;&nbsp; if(rpl-&gt;rplRedis == NULL)<br>+&nbsp;&nbsp;&nbsp; {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* null reply, reconnect and try again */<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(redisc_reconnect_server(rsrv)==0)<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; rpl-&gt;rplRedis = redisCommand(rsrv-&gt;ctxRedis, cmd-&gt;s);<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>+&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; cmd-&gt;s[cmd-&gt;len] = c;<br> &nbsp;&nbsp;&nbsp; return 0;<br> }<br><br>------------------------------<br><br>Message: 2<br>Date: Fri, 17 Feb 2012 14:34:18 +0100<br>From: Alexandr Dubovikov &lt;<a ymailto="mailto:voip@start4.info" href="mailto:voip@start4.info">voip@start4.info</a>&gt;<br>Subject: Re: [SR-Users] Kamailio Exits With: Segmentation Fault Error<br>&nbsp;&nbsp;&nbsp; 4 in usrloc.so<br>To: <a
 ymailto="mailto:miconda@gmail.com" href="mailto:miconda@gmail.com">miconda@gmail.com</a><br>Cc: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\)<br>&nbsp;&nbsp;&nbsp; - Users&nbsp;&nbsp;&nbsp; Mailing List" &lt;<a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>&gt;<br>Message-ID: &lt;<a ymailto="mailto:4F3E575A.8070909@start4.info" href="mailto:4F3E575A.8070909@start4.info">4F3E575A.8070909@start4.info</a>&gt;<br>Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br><br>Hi Daniel,<br><br>ok, I will fix it in the sipcapture on this WE.<br><br>Wbr,<br>Alexandr<br><br>17.02.2012 14:26, Daniel-Constantin Mierla wrote:<br>&gt; Hello,<br>&gt;<br>&gt; On 2/17/12 2:09 PM, Alexandr Dubovikov wrote:<br>&gt;&gt;<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; If i got it also correct:<br>&gt;&gt;<br>&gt;&gt; Simpson is getting SIP messages from a raw socket in the
 sipcapture <br>&gt;&gt; module and try to save all REGISTER messages to the location table <br>&gt;&gt; through the userloc module. (user registration audit)<br>&gt;<br>&gt; so sipcapture is executing the request route block from the config <br>&gt; even for packages received on the raw sockets. In this case it does <br>&gt; not set the socket and its string representation...<br>&gt;<br>&gt; Not sure yet the best place where it should be fixed: in usrloc (to <br>&gt; test for sock and sock_str) or in sipcapture, to set this fields as <br>&gt; most of the other config function. The second will be safer overall, <br>&gt; but might not be an usable socket for sending (if someone will attempt <br>&gt; to do lookup location and relay).<br>&gt;<br>&gt; Cheers,<br>&gt; Daniel<br>&gt;<br>&gt;<br>&gt;&gt;<br>&gt;&gt; Wbr,<br>&gt;&gt; Alexandr<br>&gt;&gt;<br>&gt;&gt; 17.02.2012 13:49, Daniel-Constantin Mierla wrote:<br>&gt;&gt;&gt;
 Hello,<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On 2/17/12 1:11 PM, Alexandr Dubovikov wrote:<br>&gt;&gt;&gt;&gt; Hi Daniel,<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; he use raw_socket in the sipcapture module and save all REGISTER <br>&gt;&gt;&gt;&gt; messages to location. (something like fraud controling for <br>&gt;&gt;&gt;&gt; registration). I think in this case he have to ignore socket listener.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; not sure I understood -- it is on the server that saves to homer's <br>&gt;&gt;&gt; database? It gets the traffic over a raw socket and then executes <br>&gt;&gt;&gt; the config file as usual with functions from other modules?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Cheers,<br>&gt;&gt;&gt; Daniel<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; Wbr,<br>&gt;&gt;&gt;&gt; Alexandr<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; 17.02.2012 09:19, Daniel-Constantin Mierla
 wrote:<br>&gt;&gt;&gt;&gt;&gt; Hello,<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; looks like an invalid listen socket structure, quite strange... <br>&gt;&gt;&gt;&gt;&gt; what version of kamailio do you have?<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Also, in gdb, frame 0, can you send the output of:<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; p *_c<br>&gt;&gt;&gt;&gt;&gt; p *_c-&gt;sock<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; You can replace sensitive data (like IP), if you wish.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Cheers,<br>&gt;&gt;&gt;&gt;&gt; Daniel<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; On 2/16/12 10:52 PM, Simpson Chua wrote:<br>&gt;&gt;&gt;&gt;&gt;&gt; Hi,<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Kamailio is exiting with a segmentation fault when trying to do a <br>&gt;&gt;&gt;&gt;&gt;&gt; save("location"). Here is some information I
 gathered.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: DEBUG: <br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;core&gt; [parser/msg_parser.c:103]: found end of header<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: <br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;core&gt; [db.c:435]: invalid parameter value<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25721]: ERROR: <br>&gt;&gt;&gt;&gt;&gt;&gt; usrloc [udomain.c:564]: failed to use table location<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu kernel: [171540.056663] kamailio[25721]: <br>&gt;&gt;&gt;&gt;&gt;&gt; segfault at 89 ip 00007fa1f9a41452 sp 00007fff971a3af0 error 4 in <br>&gt;&gt;&gt;&gt;&gt;&gt; usrloc.so[7fa1f9a37000+1f000]<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: <br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;core&gt; [main.c:751]: child process
 25720 exited by a signal 11<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: ALERT: <br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;core&gt; [main.c:754]: core was generated<br>&gt;&gt;&gt;&gt;&gt;&gt; Feb 16 15:30:19 ubuntu /usr/local/sbin/kamailio[25708]: INFO: <br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;core&gt; [main.c:766]: INFO: terminating due to SIGCHLD<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Core was generated by `kamailio -w /home/core'.<br>&gt;&gt;&gt;&gt;&gt;&gt; Program terminated with signal 11, Segmentation fault.<br>&gt;&gt;&gt;&gt;&gt;&gt; #0&nbsp; db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474<br>&gt;&gt;&gt;&gt;&gt;&gt; 474&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  vals[11].val.str_val = _c-&gt;sock-&gt;sock_str;<br>&gt;&gt;&gt;&gt;&gt;&gt; (gdb) bt<br>&gt;&gt;&gt;&gt;&gt;&gt; #0&nbsp; db_insert_ucontact (_c=0x7f5f8f737eb0) at ucontact.c:474<br>&gt;&gt;&gt;&gt;&gt;&gt;
 #1&nbsp; 0x00007f5f916d9649 in insert_ucontact (_r=&lt;optimized out&gt;, <br>&gt;&gt;&gt;&gt;&gt;&gt; _contact=&lt;optimized out&gt;, _ci=&lt;optimized out&gt;, _c=0x7fff52bbeb88) <br>&gt;&gt;&gt;&gt;&gt;&gt; at urecord.c:473<br>&gt;&gt;&gt;&gt;&gt;&gt; #2&nbsp; 0x00007f5f914b785f in insert_contacts (_m=0x7f5f93d7f458, <br>&gt;&gt;&gt;&gt;&gt;&gt; _d=0x7f5f8f72f680, _a=0x7fff52bbec00) at save.c:428<br>&gt;&gt;&gt;&gt;&gt;&gt; #3&nbsp; 0x00007f5f914b8d10 in add_contacts (_mode=1, <br>&gt;&gt;&gt;&gt;&gt;&gt; _a=0x7fff52bbec00, _d=0x7f5f8f72f680, _m=0x7f5f93d7f458) at <br>&gt;&gt;&gt;&gt;&gt;&gt; save.c:737<br>&gt;&gt;&gt;&gt;&gt;&gt; #4&nbsp; save (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680, _cflags=4) at <br>&gt;&gt;&gt;&gt;&gt;&gt; save.c:790<br>&gt;&gt;&gt;&gt;&gt;&gt; #5&nbsp; 0x000000000041ba87 in do_action (h=0x7fff52bbf5d0, <br>&gt;&gt;&gt;&gt;&gt;&gt; a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1128<br>&gt;&gt;&gt;&gt;&gt;&gt; #6&nbsp;
 0x000000000041abe2 in run_actions (h=0x7fff52bbf5d0, <br>&gt;&gt;&gt;&gt;&gt;&gt; a=0x7f5f93d7f238, msg=0x7f5f93d7f458) at action.c:1610<br>&gt;&gt;&gt;&gt;&gt;&gt; #7&nbsp; 0x000000000041c05b in do_action (h=0x7fff52bbf5d0, <br>&gt;&gt;&gt;&gt;&gt;&gt; a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1107<br>&gt;&gt;&gt;&gt;&gt;&gt; #8&nbsp; 0x000000000041abe2 in run_actions (h=0x7fff52bbf5d0, <br>&gt;&gt;&gt;&gt;&gt;&gt; a=0x7f5f93d7fe08, msg=0x7f5f93d7f458) at action.c:1610<br>&gt;&gt;&gt;&gt;&gt;&gt; #9&nbsp; 0x0000000000422fa2 in run_top_route (a=0x7f5f93d7fe08, <br>&gt;&gt;&gt;&gt;&gt;&gt; msg=0x7f5f93d7f458, c=&lt;optimized out&gt;) at action.c:1683<br>&gt;&gt;&gt;&gt;&gt;&gt; #10 0x00000000004b061e in receive_msg (buf=&lt;optimized out&gt;, <br>&gt;&gt;&gt;&gt;&gt;&gt; len=&lt;optimized out&gt;, rcv_info=&lt;optimized out&gt;) at receive.c:207<br>&gt;&gt;&gt;&gt;&gt;&gt; #11 0x00007f5f91b038b0 in raw_capture_rcv_loop (rsock=5,
 <br>&gt;&gt;&gt;&gt;&gt;&gt; port1=5060, port2=8933, ipip=0) at sipcapture.c:1518<br>&gt;&gt;&gt;&gt;&gt;&gt; #12 0x00007f5f91b03e1f in init_rawsock_children () at <br>&gt;&gt;&gt;&gt;&gt;&gt; sipcapture.c:572<br>&gt;&gt;&gt;&gt;&gt;&gt; #13 0x00007f5f91b04033 in child_init (rank=&lt;optimized out&gt;) at <br>&gt;&gt;&gt;&gt;&gt;&gt; sipcapture.c:542<br>&gt;&gt;&gt;&gt;&gt;&gt; #14 0x0000000000507a0f in init_mod_child (m=0x7f5f93d7b2b0, <br>&gt;&gt;&gt;&gt;&gt;&gt; rank=0) at sr_module.c:886<br>&gt;&gt;&gt;&gt;&gt;&gt; #15 0x0000000000507974 in init_mod_child (m=0x7f5f93d7b668, <br>&gt;&gt;&gt;&gt;&gt;&gt; rank=0) at sr_module.c:883<br>&gt;&gt;&gt;&gt;&gt;&gt; #16 0x0000000000507974 in init_mod_child (m=0x7f5f93d7c178, <br>&gt;&gt;&gt;&gt;&gt;&gt; rank=0) at sr_module.c:883<br>&gt;&gt;&gt;&gt;&gt;&gt; #17 0x0000000000507974 in init_mod_child (m=0x7f5f93d7c4b0, <br>&gt;&gt;&gt;&gt;&gt;&gt; rank=0) at sr_module.c:883<br>&gt;&gt;&gt;&gt;&gt;&gt; #18
 0x0000000000476149 in main_loop () at main.c:1661<br>&gt;&gt;&gt;&gt;&gt;&gt; #19 0x000000000041a940 in main (argc=&lt;optimized out&gt;, <br>&gt;&gt;&gt;&gt;&gt;&gt; argv=0x7fff52bbfd68) at main.c:2475<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Any idea why this is happening? Is there something in the <br>&gt;&gt;&gt;&gt;&gt;&gt; REGISTER message that is causing this?<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Thanks,<br>&gt;&gt;&gt;&gt;&gt;&gt; Simpson<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt;&gt;&gt;&gt;&gt;&gt; <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>&gt;&gt;&gt;&gt;&gt;&gt; <a
 href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; -- <br>&gt;&gt;&gt;&gt;&gt; Daniel-Constantin Mierla --<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>&gt;&gt;&gt;&gt;&gt; <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a>&nbsp; -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt;&gt;&gt;&gt;&gt; <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>&gt;&gt;&gt;&gt;&gt; <a
 href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; -- <br>&gt;&gt;&gt; Daniel-Constantin Mierla --<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>&gt;&gt;&gt; <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a>&nbsp; -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>&gt;&gt; <a ymailto="mailto:sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
 target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>&gt;&gt;<br>&gt;&gt; -- <br>&gt;&gt; Daniel-Constantin Mierla --<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>&gt;&gt; <a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a>&nbsp; -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: &lt;<a href="http://lists.sip-router.org/pipermail/sr-users/attachments/20120217/931efb00/attachment.htm" target="_blank">http://lists.sip-router.org/pipermail/sr-users/attachments/20120217/931efb00/attachment.htm</a>&gt;<br><br>------------------------------<br><br>_______________________________________________<br>sr-users mailing list<br><a ymailto="mailto:sr-users@lists.sip-router.org"
 href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br><br>End of sr-users Digest, Vol 81, Issue 52<br>****************************************<br><br><br> </div> </div>  </div></body></html>