[sr-dev] [kamailio/kamailio] cfgt: crash trying to get T_rpl() value using pv_get_spec_value() (#2479)

Victor Seva notifications at github.com
Wed Sep 16 10:44:43 CEST 2020


<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.

If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:

  * http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:

  * http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.

If there is no content to be filled in a section, the entire section can be removed.

You can delete the comments from the template sections when filling.

You can delete next line and everything above before submitting (it is a comment).
-->

### Description

I'm having crashes from time to time running our tests.

### Troubleshooting

#### Reproduction

I still can't reproduce the environment to get the crash but seems related to shared memory an tm module.

#### Debugging Data

```
root at spce:/ngcp-data/coredumps# gdb -c core.kamailio.115.9f88ca9ce6f74bf5b961ed20754cadea.31076.1600217515000000 $(which kamailio)
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/kamailio...Reading symbols from /usr/lib/debug/.build-id/c7/bed53edf0c4038a0c25fab4363253373489b6f.debug...done.
done.
[New LWP 31076]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.proxy.pid -f /etc/kamailio/proxy/k'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f59b59b80d5 in memcpy (__len=30787712, __src=<optimized out>, __dest=<optimized out>) at t_var.c:200
200	t_var.c: No such file or directory.
(gdb) bt full
#0  0x00007f59b59b80d5 in memcpy (__len=30787712, __src=<optimized out>, __dest=<optimized out>) at t_var.c:200
No locals.
#1  pv_t_update_rpl (msg=<optimized out>) at t_var.c:206
        t = 0x7f59ab5c4f28
        branch = 0
        cancel = 0
        t = <optimized out>
        branch = <optimized out>
        cancel = <optimized out>
        __func__ = "pv_t_update_rpl"
        __llevel = <optimized out>
        __kld = <optimized out>
#2  pv_t_update_rpl (msg=<optimized out>) at t_var.c:151
        t = <optimized out>
        branch = <optimized out>
        cancel = <optimized out>
        __func__ = "pv_t_update_rpl"
        __llevel = <optimized out>
        __kld = <optimized out>
#3  0x00007f59b59b8942 in pv_get_t_var_rpl (msg=0x7f59b80c93f0, param=0x7f59b7c94370, res=0x7ffc48cee9a0) at t_var.c:323
        pv = 0x0
#4  0x0000559701b30347 in pv_get_spec_value (msg=msg at entry=0x7f59b80c93f0, sp=sp at entry=0x7f59b7c94358, value=value at entry=0x7ffc48cee9a0) at core/pvapi.c:1411
        ret = 0
        __func__ = "pv_get_spec_value"
        __llevel = <optimized out>
        __kld = <optimized out>
#5  0x00007f59aabe43bb in cfgt_get_json (msg=msg at entry=0x7f59b80c93f0, mask=mask at entry=30, jdoc=jdoc at entry=0x7f59b726f200, head=head at entry=0x5597076af870)
    at cfgt_json.c:317
        i = <optimized out>
        value = {rs = {s = 0x0, len = 0}, ri = 0, flags = 0}
        _pv_cache = 0x559701e58700 <_pv_cache>
        el = 0x7f59b7c94340
        jobj = 0x0
        item_name = {s = 0x0, len = 0}
        iname = "\000var(realm_domain)\000e_uri)\000ce_file_id) call-id=$var(announce_ci)_pbx-1 from-tag=$sht(aa_announcement=>$var(announce_ci)) )\000ile_i"
        __func__ = "cfgt_get_json"
#6  0x00007f59aabd7d40 in _cfgt_set_dump (msg=msg at entry=0x7f59b80c93f0, node=0x7f59b726f200, flow=flow at entry=0x7ffc48ceeb60) at cfgt_int.c:485
        f = <optimized out>
        vars = 0x5597076af870
        __func__ = "_cfgt_set_dump"
#7  0x00007f59aabde648 in cfgt_process_route (msg=0x7f59b80c93f0, a=<optimized out>) at cfgt_int.c:692
        routename = {s = 0x559701d6eb44 "DEFAULT_ROUTE", len = 13}
        ret = -1
        indx = 0
        flowname = {s = 0x7f59b8470a00 "start|DEFAULT_ROUTEcked", len = 19}
        __func__ = "cfgt_process_route"
#8  0x00007f59aabb0adc in dbg_cfg_trace (evp=<optimized out>) at debugger_api.c:373
        a = 0x7f59b896bff8
        msg = 0x7f59b80c93f0
        loop = <optimized out>
        olen = <optimized out>
        pvn = {s = 0x559701eb2560 <_pkg_root> "u\350\320\001\227U", len = 1713979648}
        pvs = {type = 372, getf = 0x559701c9fd26 <srjson_strndupz+22>, setf = 0x174, pvp = {pvn = {type = 123597856, nfree = 0x7f59b726f200, u = {isname = {
                  type = 30032138, name = {n = -1430326632, s = {s = 0x7f59aabef298 <_cfgt_node> "", len = 1221523056}, re = 0x7f59aabef298 <_cfgt_node>}}, 
                dname = 0x559701ca410a <srjson_CreateStr+58>}}, pvi = {type = -1430326632, u = {ival = 31529720, 
                dval = 0x559701e11af8 <_sr_events_list+56>}}}, trans = 0x174}
        val = {rs = {s = 0x174 <error: Cannot access memory at address 0x174>, len = -1430450713}, ri = 372, flags = 0}
        srevp = <optimized out>
        an = 0x7f59aabc84b0 <_dbg_action_list+80>
        __func__ = "dbg_cfg_trace"
        __llevel = <optimized out>
        __kld = <optimized out>
#9  0x0000559701ae18eb in do_action (h=h at entry=0x7ffc48cef4e0, a=a at entry=0x7f59b896bff8, msg=msg at entry=0x7f59b80c93f0) at core/action.c:343
        ret = <optimized out>
        v = <optimized out>
        dst = {send_sock = 0x1af9240, to = {s = {sa_family = 53328, sa_data = "N\253Y\177\000\000D\353\326\001\227U\000"}, sin = {sin_family = 53328, 
              sin_port = 43854, sin_addr = {s_addr = 32601}, sin_zero = "D\353\326\001\227U\000"}, sin6 = {sin6_family = 53328, sin6_port = 43854, 
              sin6_flowinfo = 32601, sin6_addr = {__in6_u = {__u6_addr8 = "D\353\326\001\227U\000\000\r\000\000\000\000\000\000", __u6_addr16 = {60228, 470, 
                    21911, 0, 13, 0, 0, 0}, __u6_addr32 = {30862148, 21911, 13, 0}}}, sin6_scope_id = 0}, sas = {ss_family = 53328, 
              __ss_padding = "N\253Y\177\000\000D\353\326\001\227U\000\000\r", '\000' <repeats 11 times>, "\004\000\000\000l\245\253\265Y\177\000\000(\000\000\000\000\000\000\000\326ݳ\001\227U\000\000\000\200\020\253\001\000\000\000\000A)f\231\257\214\267(\000\000\000\000\000\000\000\333\373\275\001\227U\000\000P&\254\265Y\177\000\000\326ݳ\001\227U\000\000\205!\254\265Y\177\000\000\000A)f\231\257\214\267", __ss_align = 1}}, id = -1207135248, send_flags = {f = 32601, 
            blst_imask = 0}, proto = -56 '\310', proto_pad0 = 85 'U', proto_pad1 = -18282}
        tmp = <optimized out>
        new_uri = <optimized out>
        end = <optimized out>
        crt = <optimized out>
        cmd = <optimized out>
        len = <optimized out>
        user = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
        uri = {user = {s = 0x0, 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, len = 0}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0, type = ERROR_URI_T, flags = (unknown: 0), transport = {
            s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = -1430584221}, 
          lr = {s = 0x7ffc48cef174 "", len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = 31436634}, ttl_val = {
            s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, 
            len = -1430584221}, r2_val = {s = 0x7ffc48cef204 "\004", len = -1430584221}, gr_val = {s = 0x7ffc48cef214 "", len = -1430584221}}
        next_hop = {user = {s = 0x7ffc48cef224 "\001", len = -1430584221}, passwd = {s = 0x7ffc48cef234 "", len = -1430584221}, host = {
            s = 0x7ffc48cef244 "Y\177", len = -1430584221}, port = {s = 0x7ffc48cef254 "Y\177", len = 0}, params = {s = 0x0, len = 0}, sip_params = {
            s = 0x0, len = 0}, headers = {
            s = 0x559701dfaee0 <buf> "ACK sip:testuser1003 at spce.test SIP/2.0\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK9d58.401f873e423e77bbe3cd324425ceb5aa.0\r\nFrom: <sip:testuser1002 at spce.test>;tag=11791SIPpTag001\r\nTo: <sip:testuser1003@"..., len = 372}, port_no = 0, proto = 0, type = ERROR_URI_T, 
          flags = (URI_USER_NORMALIZE | URI_SIP_USER_PHONE | unknown: 2864383072), transport = {s = 0x7ffc48cef2a4 "\374\177", len = 0}, ttl = {s = 0x0, 
            len = 0}, user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = -1430584221}, lr = {s = 0x7ffc48cef2f4 "Y\177", 
            len = -1430584221}, r2 = {s = 0x7ffc48cef304 "", len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = -1293997788}, ttl_val = {
            s = 0x7f59b8965668 "\026", len = 1221521904}, user_param_val = {s = 0x7f59b80c93f0 "\257", len = 28508999}, maddr_val = {
            s = 0x7ffc48cef354 "Y\177", len = 31571168}, method_val = {s = 0x1af8e48 <error: Cannot access memory at address 0x1af8e48>, len = 35537696}, 
          lr_val = {s = 0x21ea8c0 <error: Cannot access memory at address 0x21ea8c0>, len = 8}, r2_val = {
            s = 0x19 <error: Cannot access memory at address 0x19>, len = 1713979648}, gr_val = {s = 0x7f59b8077b20 "@", len = 29228306}}
        u = <optimized out>
        port = <optimized out>
        dst_host = <optimized out>
        i = <optimized out>
        flags = 0
        avp = <optimized out>
        st = {flags = 1221521956, id = 32764, name = {n = -1430584221, s = {
              s = 0x7f59aabb0463 <dbg_get_mod_debug_level+3459> "\205\300u\331D\213K\024L\213\034$I\215w\bA\211\300E\211\vE\207G\bA\203\370\002\017\204b\003", len = 1221521972}, re = 0x7f59aabb0463 <dbg_get_mod_debug_level+3459>}, avp = 0x7f59aabb0463 <dbg_get_mod_debug_level+3459>}
        sct = <optimized out>
        sjt = <optimized out>
        rve = <optimized out>
        mct = <optimized out>
        rv = 0x4
        rv1 = <optimized out>
        c1 = {cache_type = 3096860104, val_type = 32601, c = {avp_val = {n = -1207135248, s = {s = 0x7f59b80c93f0 "\257", len = 1221521904}, 
              re = 0x7f59b80c93f0}, pval = {rs = {s = 0x7f59b80c93f0 "\257", len = 1221521904}, ri = 31828200, flags = 21911}}, 
          i2s = "\000\251\345\001\227U\000\000\224\026\263\001\227U\000\000\001\000\000\000\000"}
        s = {s = 0x7f59b8074858 "\001", len = 0}
        srevp = {0x7f59b896bff8, 0x7f59b80c93f0}
        evp = {data = 0x7ffc48cef190, obuf = {s = 0x0, len = 0}, rcv = 0x0, dst = 0x0, req = 0x0, rpl = 0x0, rplcode = 0, mode = 0}
        mod_f_params = {{type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}, {
            type = NUMBER_ST, u = {number = 2, string = 0x2 <error: Cannot access memory at address 0x2>, str = {
                s = 0x2 <error: Cannot access memory at address 0x2>, len = 0}, data = 0x2, attr = 0x2, select = 0x2}}, {type = STRING_RVE_ST, u = {
              number = 0, string = 0x0, str = {s = 0x0, len = 11}, data = 0x0, attr = 0x0, select = 0x0}}, {type = STRING_RVE_ST, u = {number = 0, 
              string = 0x0, str = {s = 0x0, len = 1}, data = 0x0, attr = 0x0, select = 0x0}}, {type = STRING_RVE_ST, u = {number = 0, string = 0x0, str = {
                s = 0x0, len = 21}, data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, 
              data = 0x0, attr = 0x0, select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, 
              select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0, select = 0x0}}}
        __func__ = "do_action"
#10 0x0000559701ae0d7a in run_actions (h=h at entry=0x7ffc48cef4e0, a=a at entry=0x7f59b896bff8, msg=msg at entry=0x7f59b80c93f0) at core/action.c:1581
        t = 0x7f59b896bff8
        ret = <optimized out>
        tvb = {tv_sec = 1600217515, tv_usec = 378617}
        tve = {tv_sec = 0, tv_usec = 0}
        tz = {tz_minuteswest = 0, tz_dsttime = 0}
        tdiff = <optimized out>
        __func__ = "run_actions"
#11 0x0000559701af015f in run_top_route (a=0x7f59b896bff8, msg=msg at entry=0x7f59b80c93f0, c=c at entry=0x0) at core/action.c:1666
        ctx = {rec_lev = 1, run_flags = 0, last_retcode = 0, jmp_env = {{__jmpbuf = {140721530008800, -4205375744396539310, 140023325704184, 
                140023316648944, 0, 140023316648944, 4204972918975973970, 7966166623967857234}, __mask_was_saved = 0, __saved_mask = {__val = {
                  140023276261925, 140023316648944, 94107056177590, 0, 0, 0, 0, 0, 13226139279059140864, 0, 13226139279059140864, 94107059952320, 
                  140721530009984, 0, 13226139279059140864, 3}}}}}
        p = 0x0
        ret = <optimized out>
        sfbk = 0
#12 0x0000559701af2fbb in receive_msg (
    buf=buf at entry=0x559701dfaee0 <buf> "ACK sip:testuser1003 at spce.test SIP/2.0\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK9d58.401f873e423e77bbe3cd324425ceb5aa.0\r\nFrom: <sip:testuser1002 at spce.test>;tag=11791SIPpTag001\r\nTo: <sip:testuser1003@"..., len=<optimized out>, rcv_info=rcv_info at entry=0x7ffc48cef980)
    at core/receive.c:423
        msg = 0x7f59b80c93f0
        ctx = {rec_lev = 0, run_flags = 0, last_retcode = 1, jmp_env = {{__jmpbuf = {140721530009440, -4205375744396539310, 140023326370584, 
                140023316648944, 0, 140023316648944, 4204972918975973970, 7966166623967857234}, __mask_was_saved = 0, __saved_mask = {__val = {
                  140023093512603, 94107058668325, 848, 1, 94107064857520, 4294967295, 0, 140023102772012, 0, 4294967295, 0, 140023102772012, 1, 12, 0, 
                  16}}}}}
        bctx = 0x0
        ret = <optimized out>
        tvb = {tv_sec = 0, tv_usec = 0}
        tve = {tv_sec = 0, tv_usec = 0}
        diff = 0
        inb = {
          s = 0x559701dfaee0 <buf> "ACK sip:testuser1003 at spce.test SIP/2.0\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK9d58.401f873e423e77bbe3cd324425ceb5aa.0--Type <RET> for more, q to quit, c to continue without paging--
\r\nFrom: <sip:testuser1002 at spce.test>;tag=11791SIPpTag001\r\nTo: <sip:testuser1003@"..., len = 372}
        netinfo = {data = {s = 0x0, len = 0}, rcv = 0x0, dst = 0x0}
        keng = 0x0
        evp = {data = 0x7ffc48cef670, obuf = {s = 0x0, len = 0}, rcv = 0x7ffc48cef980, dst = 0x0, req = 0x0, rpl = 0x0, rplcode = 0, mode = 0}
        cidlockidx = 0
        cidlockset = 0
        errsipmsg = 0
        exectime = 0
        __func__ = "receive_msg"
#13 0x00005597019fb3c1 in udp_rcv_loop () at core/udp_server.c:543
        len = 372
        buf = "ACK sip:testuser1003 at spce.test SIP/2.0\r\nVia: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK9d58.401f873e423e77bbe3cd324425ceb5aa.0\r\nFrom: <sip:testuser1002 at spce.test>;tag=11791SIPpTag001\r\nTo: <sip:testuser1003@"...
        tmp = <optimized out>
        fromaddr = <optimized out>
        fromaddrlen = 16
        rcvi = {src_ip = {af = 2, len = 4, u = {addrl = {16777343, 0}, addr32 = {16777343, 0, 0, 0}, addr16 = {127, 256, 0, 0, 0, 0, 0, 0}, 
              addr = "\177\000\000\001", '\000' <repeats 11 times>}}, dst_ip = {af = 2, len = 4, u = {addrl = {16777343, 0}, addr32 = {16777343, 0, 0, 0}, 
              addr16 = {127, 256, 0, 0, 0, 0, 0, 0}, addr = "\177\000\000\001", '\000' <repeats 11 times>}}, src_port = 5060, dst_port = 5062, 
          proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_family = 2, sa_data = "\023\304\177\000\000\001\000\000\000\000\000\000\000"}, sin = {
              sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 16777343}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, 
              sin6_port = 50195, sin6_flowinfo = 16777343, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 
                    0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}, sas = {ss_family = 2, 
              __ss_padding = "\023\304\177\000\000\001", '\000' <repeats 111 times>, __ss_align = 0}}, bind_address = 0x7f59b68e9290, proto = 1 '\001', 
          proto_pad0 = 0 '\000', proto_pad1 = 0}
        evp = {data = 0x0, obuf = {s = 0x0, len = 0}, rcv = 0x0, dst = 0x0, req = 0x0, rpl = 0x0, rplcode = 0, mode = 0}
        printbuf = ",\023M\253Y\177\000\000\001\000\000\000\000\000\000\000\f\000\000\000\000\000\000\000٘\251\001\227U\000\000\004\000\000\000\000\000\000\000\204\373\316H\374\177\000\000\001\000\000\000\000\000\000\000\002!\307\001\227U\000\000\000\000\000\000\000\000\000\000\220\331\353\001\227U\000\000\016\300\260e\232V\331s5\264&\376\252\340\302\343\243\034\037/\215\366/퐒\216\266Y\177\000\000\000\375\316H\374\177\000\000\000A)f\231\257\214\267\005\000\000\000\000\000\000\000\220\222\216\266Y\177\000\000\000\375\316H\374\177\000\000\001\000\000\000\000\000\000\000\005", '\000' <repeats 23 times>, "\324\002\257\001\227U\000\000,\023M\253Y\177\000\000\001\000\000\000\000\000\000\000"...
        i = <optimized out>
        j = <optimized out>
        l = <optimized out>
        __func__ = "udp_rcv_loop"
        __llevel = <optimized out>
        __kld = <optimized out>
#14 0x000055970197585c in main_loop () at main.c:1683
        i = 0
        pid = <optimized out>
        si = 0x7f59b68e9290
        si_desc = "udp receiver child=0 sock=127.0.0.1:5062\000\002\317H\374\177\000\000\001\000\000\000\000\000\000\000Q\265\251\001\227U\000\000(p\345\001\227U\000\000\000A)f\231\257\214\267\001\000\000\000\000\000\000\000\000A)f\231\257\214\267\200\214\336\001\227U\000\000\000A)f\231\257\214\267\210\330\353\001\227U\000\000\a\000\000\000\000\000\000"
        nrprocs = <optimized out>
        woneinit = <optimized out>
        __func__ = "main_loop"
#15 0x000055970196b91b in main (argc=<optimized out>, argv=<optimized out>) at main.c:2856
        cfg_stream = 0x55970201d260
        c = <optimized out>
        r = <optimized out>
        tmp = 0x7ffc48cf0e8a ""
        tmp_len = 1221526052
        port = 32764
        proto = 6
        ahost = 0x0
        aport = 0
        options = 0x559701cc84c0 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
        ret = -1
        seed = 2699801792
        rfd = <optimized out>
        debug_save = <optimized out>
        debug_flag = <optimized out>
        dont_fork_cnt = <optimized out>
        n_lst = <optimized out>
        p = <optimized out>
        st = {st_dev = 21, st_ino = 39740, st_nlink = 2, st_mode = 16872, st_uid = 115, st_gid = 121, __pad0 = 0, st_rdev = 0, st_size = 120, 
          st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1600216622, tv_nsec = 120000000}, st_mtim = {tv_sec = 1600217226, tv_nsec = 265544049}, 
          st_ctim = {tv_sec = 1600217226, tv_nsec = 265544049}, __glibc_reserved = {0, 0, 0}}
        tbuf = "\000\000\000\000\000\000\000\000\b\000\000\000\000\000\000\000\060\207\301\272Y\177\000\000\000\000\000\000\000\000\000\000\240A\333H\374\177\000\000􊿺Y\177\000\000\b\000\000\000\000\000\000\000\230B\333H\374\177\000\000\060\207\301\272Y\177\000\000X\000\317H\374\177\000\000T\000\317H\374\177", '\000' <repeats 18 times>, "\230B\333H\374\177\000\000\250A\333H\374\177\000\000'Ν\272Y\177\000\000&\260be\000\000\000\000\300\001\317H\374\177\000\000\300\212\225\001\000\000\000\000 \001\317H\374\177\000\000\020\001\317H\374\177\000\000X\000\317H\374\177\000\000X\207\301\272Y\177\000\000\001", '\000' <repeats 31 times>...
        option_index = 0
        long_options = {{name = 0x559701cc6f8b "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x559701d0d9d8 "version", has_arg = 0, flag = 0x0, 
            val = 118}, {name = 0x559701cdb810 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x559701cc6f90 "subst", has_arg = 1, flag = 0x0, 
            val = 1025}, {name = 0x559701cc6f96 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x559701cc6f9f "substdefs", has_arg = 1, 
            flag = 0x0, val = 1027}, {name = 0x559701cc6fa9 "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x559701cc6fb3 "loadmodule", 
            has_arg = 1, flag = 0x0, val = 1029}, {name = 0x559701cc6fbe "modparam", has_arg = 1, flag = 0x0, val = 1030}, {
--Type <RET> for more, q to quit, c to continue without paging--
            name = 0x559701cc6fc7 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x559701d0dae8 "debug", has_arg = 1, flag = 0x0, val = 1032}, {
            name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
        __func__ = "main"
(gdb) 
(gdb) info thread
  Id   Target Id                         Frame 
* 1    Thread 0x7f59ba85b100 (LWP 31076) 0x00007f59b59b80d5 in memcpy (__len=30787712, __src=<optimized out>, __dest=<optimized out>) at t_var.c:200
(gdb) 
(gdb) f 5
#5  0x00007f59aabe43bb in cfgt_get_json (msg=msg at entry=0x7f59b80c93f0, mask=mask at entry=30, jdoc=jdoc at entry=0x7f59b726f200, head=head at entry=0x5597076af870) at cfgt_json.c:317
317     cfgt_json.c: No such file or directory.
(gdb) p el
$1 = (pv_cache_t *) 0x7f59b7c94340
(gdb) p *el
$2 = {pvname = {s = 0x7f59b7c943b8 "$T_rpl($si)", len = 11}, pvid = 2681633955, spec = {type = PVT_OTHER, getf = 0x7f59b59b8930 <pv_get_t_var_rpl>, setf = 0x0, pvp = {pvn = {type = 1, nfree = 0x0, u = {isname = {type = -1211546576, name = {n = 0, s = {
                s = 0x0, len = 0}, re = 0x0}}, dname = 0x7f59b7c94430}}, pvi = {type = 4, u = {ival = 0, dval = 0x0}}}, trans = 0x0}, next = 0x7f59b6faf148}

```

#### Log Messages

<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

```
Sep 16 02:51:55 spce proxy[31076]: NOTICE: DEFAULT_ONREPLY <script>: New reply on proxy - M=INVITE ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>'
Sep 16 02:51:55 spce proxy[31076]: DEBUG: DEFAULT_ONREPLY <script>: $avp(lua_dlg_profile):<null> - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: NOTICE: DEFAULT_ONREPLY <script>: New reply on proxy - M=INVITE ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: DEBUG: DEFAULT_ONREPLY <script>: $avp(lua_dlg_profile):<null> - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31078]: NOTICE: DEFAULT_ROUTE <script>: New request on proxy - M=ACK R=«sip:testuser1003 at 127.1.0.1:50604» F=«sip:4311002 at spce.test» T=«sip:testuser1003 at spce.test» IP=«127.0.0.1»:«5080» («127.0.0.1»:«5080») ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>' DESTIP=«127.0.0.1»:«5062»
Sep 16 02:51:55 spce proxy[31078]: DEBUG: DEFAULT_ROUTE <script>: pua_dialoginfo: Disable PUBLISH messages to caller setting FLB_PRESENCE_CALLER flag - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>'
Sep 16 02:51:55 spce proxy[31078]: DEBUG: DEFAULT_ROUTE <script>: pua_dialoginfo: Disable PUBLISH messages to callee setting FLB_PRESENCE_CALLEE flag - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: NOTICE: REPLY_ROUTE_NAT <script>: NAT-Reply - S=302 - Moved Temporarily M=INVITE IP=«127.126.0.1»:«51602» («127.0.0.1»:«5080») ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>' DESTIP=«127.0.0.1»:«5062»
Sep 16 02:51:55 spce proxy[31079]: DEBUG: REPLY_ROUTE_NAT <script>: pua_dialoginfo: Set flag REFRESH presence to activate the publish messages - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31078]: INFO: ROUTE_OUTBOUND <script>: Relaying request, du='«<null>»' - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1» UA='<null>'
Sep 16 02:51:55 spce proxy[31078]: WARNING: ROUTE_OUTBOUND tm [t_funcs.c:271]: t_relay_to(): negative or local ACK caught, please report
Sep 16 02:51:55 spce proxy[31078]: INFO: ROUTE_EXIT <script>: Runtime for request M=ACK was 22960 usec - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1_b2b-1»
Sep 16 02:51:55 spce proxy[31079]: NOTICE: REPLY_ROUTE_NAT_CONTINUE <script>: HDR: Skip apply because redirect 301 or 302 - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: NOTICE: REPLY_ROUTE_NAT_CONTINUE <script>: Sending reply S=302 M=INVITE fs='«127.0.0.1»:«5062»' du='«127.0.0.1»:«<null>»' - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: INFO: ROUTE_EXIT <script>: Runtime for response M=INVITE 302 was 37637 usec - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1»
Sep 16 02:51:55 spce proxy[31079]: NOTICE: FAILURE_ROUTE_LOCAL <script>: Failure route for local call, code='302' - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: DEBUG: FAILURE_ROUTE_LOCAL <script>: pua_dialoginfo: Set puburis_callee to a fake value and disable PUBLISH messages to callee setting FLB_PRESENCE_CALLEE flag - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: INFO: ROUTE_STOP_RTPPROXY_BRANCH <script>: Stop rtpengine for current branch using first Via, caller did is '«50»' and callee did is '«50»' - R=«sip:testuser1003 at 127.1.0.1:50604» ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: INFO: ROUTE_ADD_CALLINFO_REPLY <script>: Adding reply P-NGCP-Caller-Info '<sip:«testuser1002»@«spce.test»>;ip=«127.126.0.1»;port=«51602»«;primary=4311002»«»' - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: INFO: ROUTE_ADD_CALLINFO_REPLY <script>: Adding reply P-NGCP-Callee-Info '<sip:«testuser1003»@«spce.test»>;ip=«127.1.0.1»;port=«50604»«;primary=4311003»«»' - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: NOTICE: ROUTE_LOCAL_REPLY <script>: Sending reply S=302 Moved Temporarily fs='«127.0.0.1»:«5062»' du='«127.0.0.1»:«5060»' - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: NOTICE: dialog:failed <script>: [dialog:failed] decreased redis counters lua_dlg_callid:[«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1»] - R=«sip:you at kamailio.org» ID=«123» UA='<null>'
Sep 16 02:51:55 spce proxy[31079]: WARNING: ROUTE_LOCAL_REPLY cfgt [cfgt_json.c:318]: cfgt_get_json(): can't get value[$T_branch_idx]
Sep 16 02:51:55 spce proxy[31079]: INFO: ROUTE_EXIT <script>: Runtime for request M=INVITE was 180344 usec - ID=«NGCP%invite_redirect_blocked%///1-11791 at 127.126.0.1»
```

#### SIP Traffic

<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->

This example was using this test scenario: https://github.com/sipwise/kamailio-config-tests/tree/master/scenarios/invite_redirect_blocked

### Additional Information

This is the Sipwise flavor based on 5..4.1

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.4.1 (x86_64/linux) 
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, NO_SIG_DEBUG, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled with gcc 8.3.0
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2479
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200916/2150e516/attachment-0001.htm>


More information about the sr-dev mailing list