<div dir="ltr"><div><div><div>The problem is solved.<br></div>The fix for the bug is  <a href="https://github.com/OpenSIPS/opensips/commit/3c6b6930d615adb978dd2779b6cd4054c3bc49df" target="_blank"><tt>3c6b693</tt></a> ( <a href="https://github.com/OpenSIPS/opensips/commit/dbdc46c994c69b43bb124a397056268ddaf2f543" target="_blank"><tt>dbdc46c</tt></a> for 2.2 branch).<br></div><br></div>Many thanks to Ionut !<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 6:29 PM, Yuri Ritvin <span dir="ltr">&lt;<a href="mailto:yuri.ritvin@gmail.com" target="_blank">yuri.ritvin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>It looks like some information is missing in the SIPTRACE module documentation for OpenSIPS 2.2, or apparently it bears a bug. With the given example of the configuration the log file displays these messages:<br>    ERROR:siptrace:save_siptrace: invalid trace info<br>    ERROR:siptrace:trace_msg_out: failed to save siptrace<br><br></div>And this is the config snippet:<br><br>#### SIPTRACE module<br>loadmodule &quot;siptrace.so&quot;<br>modparam(&quot;siptrace&quot;, &quot;trace_id&quot;, &quot;[tid]uri=mysql://opensips:opensipsrw@dbserver/opensips;table=sip_trace;&quot;)<br>modparam(&quot;siptrace&quot;, &quot;trace_on&quot;, 1)<br><br>....<br><br>        if (method==INVITE &amp;&amp; !has_totag()) {<br>                $var(user)=&quot;<a href="mailto:osips@thisnetwork.com" target="_blank">osips@thisnetwork.com</a>&quot;;<br>                $var(trace_id) = &quot;tid&quot;;<br>                sip_trace(&quot;$var(trace_id)&quot;, &quot;d&quot;, &quot;$var(user)&quot;);<br>        }<br><br><br></div>Then at some particular scenario SIPTRACE module crashes the OpenSIPS 2.2 application:<br>#0  save_siptrace (info=0x7f6878bf6b58, msg=&lt;value optimized out&gt;, vals=0x7f68722bcf80, keys=0x7f68722bd180) at siptrace.c:878<br>        hash = &lt;value optimized out&gt;<br>        it = &lt;value optimized out&gt;<br>#1  0x00007f68720b5415 in trace_onreply_out (t=&lt;value optimized out&gt;, type=&lt;value optimized out&gt;, ps=0x7fff0548a820) at siptrace.c:1982<br>        faked = &lt;value optimized out&gt;<br>        fromip_buff = &quot;udp1XX.2X.XXX.185&quot;, &#39;\000&#39; &lt;repeats 34 times&gt;<br>        toip_buff = &quot;udp1XX.2X.XXX.78&quot;, &#39;\000&#39; &lt;repeats 35 times&gt;<br>        msg = 0x7f6878c00740<br>        to_ip = {af = 2, len = 4, u = {addrl = {1310254956, 0}, addr32 = {1310254956, 0, 0, 0}, addr16 = {59244, 19992, 0, 0, 0, 0, 0, 0}, addr = &quot;l\347\030N&quot;, &#39;\000&#39; &lt;repeats 11 times&gt;}}<br>        len = 3<br>        statusbuf = &quot;408\000\001\000\000&quot;<br>        sbuf = &lt;value optimized out&gt;<br>        dst = &lt;value optimized out&gt;<br>        __FUNCTION__ = &quot;trace_onreply_out&quot;<br>#2  0x00007f68748789a1 in run_trans_callbacks (type=128, trans=0x7f6878bfecc8, req=&lt;value optimized out&gt;, rpl=&lt;value optimized out&gt;, code=&lt;value optimized out&gt;) at t_hooks.c:209<br>        params = {req = 0x7f6878c00740, rpl = 0xffffffffffffffff, code = 408, param = 0x7f6878bfeb28, extra1 = 0x7fff0548a9a0, extra2 = 0x7f6878bfede0}<br>        cbp = 0x7f6878bfeb18<br>        backup = 0x7816c0<br>        trans_backup = 0x7f6878bfecc8<br>        __FUNCTION__ = &quot;run_trans_callbacks&quot;<br>#3  0x00007f6874878b00 in run_trans_callbacks_locked (type=&lt;value optimized out&gt;, trans=0x7f6878bfecc8, req=&lt;value optimized out&gt;, rpl=&lt;value optimized out&gt;, code=&lt;value optimized out&gt;)<br>    at t_hooks.c:262<br>No locals.<br>#4  0x00007f68748851b1 in relay_reply (t=0x7f6878bfecc8, p_msg=&lt;value optimized out&gt;, branch=&lt;value optimized out&gt;, msg_status=&lt;value optimized out&gt;, cancel_bitmap=0x7fff0548aa7c)<br>    at t_reply.c:1255<br>        relay = 0<br>        save_clone = 0<br>        buf = 0x7f6888aa78a8 &quot;SIP/2.0 408 Request Timeout\r\nVia: SIP/2.0/UDP 1XX.2X.XXX.78:8408;received=1XX.2X.XXX.78;branch=z9hG4bK-524287-1---af6608797b55630d;rport=8408\r\nTo: &lt;<a href="mailto:sip%3ATestingSubscriber1002@sip.thisnetwork.com" target="_blank">sip:TestingSubscriber1002@sip.thisnetwork.com</a>&gt;;tag=3b8d&quot;...<br>        res_len = 412<br>        relayed_code = 408<br>        relayed_msg = 0xffffffffffffffff<br>        bm = {to_tag_val = {<br>            s = 0x7f6888aa796c &quot;3b8d6d10a54b0752c937c18d274bef37-402e\r\nFrom: \&quot;TestingSubscriber1001\&quot;&lt;<a href="mailto:sip%3ATestingSubscriber1001@sip.thisnetwork.com" target="_blank">sip:TestingSubscriber1001@sip.thisnetwork.com</a>&gt;;tag=735c442d\r\nCall-ID: PKSLf7Smdwyk-hULVsGkKg..\r\nCSeq: 2 INVITE\r\nServer: SBC-185\r\nConte&quot;..., len = 37}}<br>        totag_retr = 0<br>        reply_status = RPS_COMPLETED<br>        uas_rb = 0x7f6878bfedc8<br>        cb_s = {<br>          s = 0x7f6888aa78a8 &quot;SIP/2.0 408 Request Timeout\r\nVia: SIP/2.0/UDP 1XX.2X.XXX.78:8408;received=1XX.2X.XXX.78;branch=z9hG4bK-524287-1---af6608797b55630d;rport=8408\r\nTo: &lt;<a href="mailto:sip%3ATestingSubscriber1002@sip.thisnetwork.com" target="_blank">sip:TestingSubscriber1002@sip.thisnetwork.com</a>&gt;;tag=3b8d&quot;..., len = 412}<br>        text = {s = 0x50daf3 &quot;Request Timeout&quot;, len = 15}<br>        __FUNCTION__ = &quot;relay_reply&quot;<br>#5  0x00007f687488886e in fake_reply (ticks=70, set=&lt;value optimized out&gt;) at timer.c:260<br>        cancel_bitmap = 0<br>        do_cancel_branch = &lt;value optimized out&gt;<br>        reply_status = &lt;value optimized out&gt;<br>#6  final_response_handler (ticks=70, set=&lt;value optimized out&gt;) at timer.c:391<br>        old_ctx = 0x0<br>        my_ctx = 0x7f6888aa7f08<br>        r_buf = 0x7f6878bfeea0<br>---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---<br>        t = 0x7f6878bfecc8<br>#7  timer_routine (ticks=70, set=&lt;value optimized out&gt;) at timer.c:1066<br>        tl = 0x7f6878bfef18<br>        tmp_tl = 0x0<br>        id = &lt;value optimized out&gt;<br>        __FUNCTION__ = &quot;timer_routine&quot;<br>#8  0x000000000047e28b in handle_timer_job () at timer.c:632<br>        t = 0x7f687890d760<br>        l = &lt;value optimized out&gt;<br>        __FUNCTION__ = &quot;handle_timer_job&quot;<br>#9  0x00000000004ed64d in handle_io (fm=0x7f6888a9c388, idx=1, event_type=&lt;value optimized out&gt;) at net/net_tcp_proc.c:117<br>        ret = 0<br>        n = &lt;value optimized out&gt;<br>        con = &lt;value optimized out&gt;<br>        s = &lt;value optimized out&gt;<br>        rw = &lt;value optimized out&gt;<br>        resp = &lt;value optimized out&gt;<br>        response = {140733282036968, 140086962256117}<br>        __FUNCTION__ = &quot;handle_io&quot;<br>#10 0x00000000004ee140 in io_wait_loop_epoll (repeat=0, t=2, h=&lt;value optimized out&gt;) at ./io_wait_loop.h:221<br>        n = 1<br>        r = 1<br>        e = 0x7f6888a9c388<br>        ret = 1<br>#11 0x00000000004ef407 in tcp_worker_proc (unix_sock=&lt;value optimized out&gt;) at net/net_tcp_proc.c:312<br>        __FUNCTION__ = &quot;tcp_worker_proc&quot;<br>#12 0x00000000004eb31d in tcp_start_processes (chd_rank=0x7653c8, startup_done=0x0) at net/net_tcp.c:1758<br>        r = &lt;value optimized out&gt;<br>        reader_fd = {92, 94}<br>        pid = 0<br>        si = &lt;value optimized out&gt;<br>        load_p = 0x7f6878bc58c8<br>        __FUNCTION__ = &quot;tcp_start_processes&quot;<br>#13 0x000000000042f4af in main_loop (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:677<br>        startup_done = 0x0<br>        chd_rank = 44<br>#14 main (argc=&lt;value optimized out&gt;, argv=&lt;value optimized out&gt;) at main.c:1252<br>        cfg_stream = &lt;value optimized out&gt;<br>        c = &lt;value optimized out&gt;<br>        r = &lt;value optimized out&gt;<br>        tmp = 0x7fff0548bf70 &quot;&quot;<br>        tmp_len = &lt;value optimized out&gt;<br>        port = 0<br>        proto = 5282149<br>        options = 0x510b48 &quot;f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:&quot;<br>        ret = -1<br>        seed = 221183166<br>        rfd = &lt;value optimized out&gt;<br>        __FUNCTION__ = &quot;main&quot;<br><br><br>This is the version print (installed via RPMs):<br>opensips -V<br>version: opensips 2.2.0-beta (x86_64/linux)<br>flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT<br>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535<br>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>main.c compiled on 14:59:48 Mar 31 2016 with gcc 4.4.7<br><br></div>Thank you.<br></div>
</blockquote></div><br></div>