root@14cn9:/var/tmp# gdb /usr/sbin/kamailio core.kamailio.10623.14cn9.serverdomain.com.1485825987 GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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: . Find the GDB manual and other documentation resources online at: . 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/8c/978e3f277d6d1ec67cd26a6f8c2b8da806d092.debug...done. done. [New LWP 10623] warning: .dynamic section for "/lib/x86_64-linux-gnu/libpthread.so.0" is not at the expected address (wrong library or version mismatch?) Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error warning: File "/lib/x86_64-linux-gnu/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /lib/x86_64-linux-gnu/libthread_db-1.0.so line to your configuration file "/root/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/root/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error warning: File "/lib/x86_64-linux-gnu/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f /etc/kamailio/sbc.cfg -'. Program terminated with signal SIGSEGV, Segmentation fault. #0 get_send_socket2 (force_send_socket=0xf, to=0x7ffd144aa740, proto=1, mismatch=0x0) at forward.c:222 222 forward.c: No such file or directory. (gdb) bt full #0 get_send_socket2 (force_send_socket=0xf, to=0x7ffd144aa740, proto=1, mismatch=0x0) at forward.c:222 __FUNCTION__ = "get_send_socket2" #1 0x00007f26c8e0baa6 in uri2dst2 (dns_h=0x7f24c6ca7178, dst=0x7f24c6ca70b8, force_send_socket=0x1, sflags=..., uri=0x0, proto=-1005387774) at ut.h:305 parsed_uri = {user = {s = 0x7f26cb5afebc "15185535074@1.2.3.123:5060", len = 11}, passwd = {s = 0x0, len = 0}, host = {s = 0x7f26cb5afec8 "1.2.3.123:5060", len = 12}, port = { s = 0x7f26cb5afed5 "5060", len = 4}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 5060, proto = 0, type = SIP_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 = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, 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}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}, gr_val = {s = 0x0, len = 0}} ip_found = -1005387774 to = {s = {sa_family = 2, sa_data = "\023\304\306\001\066{\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 2067136966}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 50195, sin6_flowinfo = 2067136966, sin6_addr = {__in6_u = {__u6_addr8 = '\000' , __u6_addr16 = { 0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}} err = 0 __FUNCTION__ = "uri2dst2" #2 0x00007f26c8e0d797 in prepare_new_uac (t=0x7f24c6ca6ca0, i_req=0x7f26c906d1c0 , branch=1, uri=0x7ffd144aa9d0, path=0x2, next_hop=0x0, fsocket=0xf, snd_flags=..., fproto=0, flags=2, instance=0x7f26c906d800 , ruid=0x7f26c906d818 , location_ua=0x7f26c906d828 ) at t_fwd.c:431 shbuf = 0x7ffd144aa9d0 "X\016[\313&\177" parsed_uri_bak = {user = {s = 0x7f26cb5b0e5c "15185535074@1.2.3.123:5060", len = 11}, passwd = {s = 0x0, len = 0}, host = {s = 0x7f26cb5b0e68 "1.2.3.123:5060", len = 12}, port = { s = 0x7f26cb5b0e75 "5060", len = 4}, params = {s = 0x0, len = 0}, sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 5060, proto = 0, type = SIP_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 = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, 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}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}, gr_val = {s = 0x0, len = 0}} ret = -478 len = 32548 msg_uri_bak = {s = 0x7f26cb5b0e58 "sip:15185535074@1.2.3.123:5060", len = 33} dst_uri_bak = {s = 0x0, len = 0} dst_uri_backed_up = 1 path_bak = {s = 0x0, len = 0} instance_bak = {s = 0x0, len = 0} ruid_bak = {s = 0x0, len = 0} ua_bak = {s = 0x0, len = 0} force_send_socket_bak = 0x1 dst = 0x7f24c6ca70b8 ctx = {rec_lev = 0, run_flags = 0, last_retcode = 1, jmp_env = {{__jmpbuf = {140724943890992, -8664550427694897703, 139804597062864, 139804558152128, 139795930705056, 139795930706104, 8663656708077872601, -8664549922703186471}, __mask_was_saved = 0, __saved_mask = {__val = {140724943891568, 140724943891472, 139804564709766, 8388608, 7497296, 675816, 891312, 901648, 8, 10, 12007018592332922112, 891312, 6243476, 0, 6978052, 7209399}}}}} __FUNCTION__ = "prepare_new_uac" #3 0x00007f26c8e10355 in add_uac (t=0x7f24c6ca6ca0, request=0x7f26c906d1c0 , uri=0x1, next_hop=0x0, path=0x2, proxy=0x0, fsocket=0xf, snd_flags=..., proto=0, flags=340436804, instance=0x7f26c906d800 , ruid=0x7f26c906d818 , location_ua=0x7f26c906d828 ) at t_fwd.c:788 branch = 1 __FUNCTION__ = "add_uac" #4 0x00007f26c8e18c3a in t_forward_nonack (t=0x7f24c6ca6ca0, p_msg=0x7f26c906d1c0 , proxy=0x1, proto=0) at t_fwd.c:1667 current_uri = {s = 0x0, len = -922299968} q = 0 t_invite = 0x2 success_branch = -922298328 lock_replies = 2 dst_uri = {s = 0x100000000 , len = 340439040} path = {s = 0x7f24c972c3a8 "", len = 1} instance = { s = 0x7f26c6cd4c40 "\027\003\003\001Փ\342M\033\377\300F\030,\026\263}Y!\332lėr\304\nZŞ@T\021\017\070G\026\t\240}\373\265\"\022\030m\363o$\342\307\373\240[\256ݬ\325\343\330\032\213\363\027\022}\347R\244\355:}\254\346vک\303'|\200|hՑ\214L-d\343\375\210cO ·\326\361\261\003\375{u.}z\006\252l\353\020\225f\236\263Q\233*\305u\201Ťƪ\212\302o\313\024\064\216L)U\a\222\063(\023\224+}\347\";\311u1\317`(\261\260\355\272\315\035\n\206B`\224\210:\265`p\313LHe;@&\231\232\340z\"@\222\366k&\375%\273A\373=\262V\243d;\365\241", ..., len = 0} ruid = {s = 0x10000 , len = -961935824} location_ua = {s = 0x0, len = -874823191} si = 0xcb5b0c48 backup_bflags = 0 bflags = 0 __FUNCTION__ = "t_forward_nonack" #5 0x00007f26c8dda197 in _w_t_relay_to (force_proto=, proxy=, p_msg=) at tm.c:1412 t = 0x7ffd144aa744 ---Type to continue, or q to quit--- res = 340436804 #6 w_t_relay (p_msg=0xf, _foo=0x7ffd144aa740 "\002", _bar=0x1 ) at tm.c:1626 No locals. #7 0x0000000000454b60 in do_action (h=0x7ffd144ab4b0, a=0x7f26cb52c270, msg=0x7f26c906d1c0 ) at action.c:1060 ret = -5 v = 0 dst = {send_sock = 0xd67a, to = {s = {sa_family = 5919, sa_data = "\334\313&\177\000\000\000\000\000\000\000\000\000"}, sin = {sin_family = 5919, sin_port = 52188, sin_addr = {s_addr = 32550}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 5919, sin6_port = 52188, sin6_flowinfo = 32550, sin6_addr = {__in6_u = { __u6_addr8 = "\000\000\000\000\000\000\000\000\374\310H\000\000\000\000", __u6_addr16 = {0, 0, 0, 0, 51452, 72, 0, 0}, __u6_addr32 = {0, 0, 4770044, 0}}}, sin6_scope_id = 16}}, id = 690, proto = -106 '\226', send_flags = {f = 176 '\260', blst_imask = 74 'J'}} end = 0x7ffd144ab4b0 "\001" uri = {user = {s = 0x7ffd144ace20 "\004", len = 4337712}, passwd = {s = 0x0, len = 0}, host = {s = 0x1000017ac , len = -883777136}, port = { s = 0x7ffd144ab600 "", len = -922299968}, params = {s = 0x7ffd144ab600 "", len = -922299968}, sip_params = {s = 0x0, len = 931380480}, headers = { s = 0x7f24c6294f00 "BYE sip:2024558888@12.7.192.29:6060 SIP/2.0\r\nVia: SIP/2.0/UDP 1.2.3.4;branch=z9hG4bK22b3.10c96ffa224989a5381b9179586f8729.0\r\nVia: SIP/2.0/UDP 1.2.3.115;received=1.2.3.115;rport=5060;branch=z"..., len = -883773936}, port_no = 65535, proto = 65535, type = ERROR_URI_T, flags = (unknown: 3372667328), transport = {s = 0x7ffd144ace20 "\004", len = 340439652}, ttl = {s = 0x0, len = 4361660}, user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x17544e0 "x\326\a\314&\177", len = 340440848}, lr = {s = 0x7f26cbe3d1c4 "[%d]", len = -874262073}, r2 = { s = 0x0, len = -875421847}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x7ffd144ab2a0 "", len = 0}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = { s = 0x7f26cbd2399a <_IO_vfprintf_internal+22490> "\200\275(\373\377\377", len = 690}, method_val = {s = 0x7f24c972c408 "\220\200O\313&\177", len = 0}, lr_val = {s = 0x0, len = -915226208}, r2_val = {s = 0x0, len = -883222360}, gr_val = {s = 0x0, len = -5}} next_hop = {user = {s = 0x297f , len = 10}, passwd = {s = 0x20 , len = -875240802}, host = { s = 0x17544e0 "x\326\a\314&\177", len = 931380480}, port = {s = 0x7f26c79b412d "%s: %s%.*s", len = -883772040}, params = {s = 0xffffffff , len = -922299968}, sip_params = {s = 0x7ffd144ace20 "\004", len = 340440032}, headers = {s = 0x0, len = 931380480}, port_no = 0, proto = 0, type = ERROR_URI_T, flags = (unknown: 3411197264), transport = {s = 0x7ffd144ace20 "\004", len = -5}, ttl = {s = 0x7ffd144ace20 "\004", len = -922299968}, user_param = {s = 0x0, len = 4535845}, maddr = {s = 0x7ffd144ace20 "\004", len = -874262073}, method = {s = 0x7f26cb52bd50 "%\001", len = -922299968}, lr = {s = 0x600000000 , len = 0}, r2 = {s = 0x7ffd144ab400 "\341\377\377\377", len = 0}, gr = {s = 0x7ffd144ab820 "\001", len = 0}, transport_val = {s = 0x0, len = 0}, ttl_val = {s = 0x7f26cbd2399a <_IO_vfprintf_internal+22490> "\200\275(\373\377\377", len = -875415142}, user_param_val = {s = 0x7f26cbd2399a <_IO_vfprintf_internal+22490> "\200\275(\373\377\377", len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = { s = 0xffffffffffffffff , len = 109}, lr_val = {s = 0xffffffff00000000 , len = -5}, r2_val = {s = 0x297f , len = 10}, gr_val = {s = 0x20 , len = 931380480}} u = 0x7ffd144ab4b0 flags = 0 st = {flags = 10623, id = 0, name = {n = 10, s = {s = 0xa , len = 32}, re = 0xa}, avp = 0x7f26cbd4e29e <__GI__IO_default_xsputn+174>} sct = 0x7ffd144ab4b0 sjt = 0x7ffd144ab4b0 mct = 0x0 rv = 0x4be504 rv1 = 0x7f26c906d1c0 c1 = {cache_type = 340439171, val_type = 32765, c = {avp_val = {n = 340439182, s = {s = 0x7ffd144ab08e "", len = 10136659}, re = 0x7ffd144ab08e}, pval = {rs = {s = 0x7ffd144ab08e "", len = 10136659}, ri = 11, flags = 0}}, i2s = "_\254\232\000\000\000\000\000\000\275\203\067\313\177\241\246\000\000\000\000\000"} s = {s = 0x0, len = -947045976} srevp = {0x0, 0x7f26c8e14085 } mod_f_params = {{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}}, {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}}, {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}}} __FUNCTION__ = "do_action" #8 0x0000000000453625 in run_actions (h=0xf, h@entry=0x7ffd144ab4b0, a=0x7ffd144aa740, msg=0x1) at action.c:1549 ret = 340446752 mod = 0x7f26cb52c270 __FUNCTION__ = "run_actions" #9 0x000000000045fff7 in run_actions_safe (h=0x7ffd144ace20, a=, msg=) at action.c:1614 ctx = {rec_lev = 1, run_flags = 0, last_retcode = 0, jmp_env = {{__jmpbuf = {140724943893680, 8663656706762958297, 139804558152128, 140724943900192, 140724943894452, 0, 8663656707417269721, -8664549922703186471}, __mask_was_saved = 0, __saved_mask = {__val = {139804558152128, 4294967296, 4535845, 140724943894128, 11, 0, 0, 139795947484431, 11, 139804605036954, 4, 0, 0, 0, 0, 0}}}}} ret = ign_on_break = 0 #10 0x0000000000423030 in rval_get_int (h=0x7ffd144ace20, msg=0xf, i=0x7ffd144ab7b4, rv=0x0, cache=0x2) at rvalue.c:912 r_avp = 0x7ffd144aa744 avp_val = {n = 24462560, s = {s = 0x17544e0 "x\326\a\314&\177", len = 0}, re = 0x17544e0} pval = {rs = {s = 0x7ffd144ace20 "\004", len = 340441392}, ri = 0, flags = 0} tmp = {s = 0x7ffd144ace20 "\004", len = -922299968} ---Type to continue, or q to quit--- s = 0x7f26c906d1c0 r = 340436804 ret = 340436804 destroy_pval = 340446752 __FUNCTION__ = "rval_get_int" #11 0x0000000000428dbc in rval_expr_eval_int (h=0x7ffd144ace20, msg=0x7f26c906d1c0 , res=0x7ffd144ab7b4, rve=0x7f26cb52c6b0) at rvalue.c:1910 i1 = 0 i2 = -875300784 ret = -1 c1 = {cache_type = RV_CACHE_EMPTY, val_type = RV_NONE, c = {avp_val = {n = 0, s = {s = 0x0, len = 340441888}, re = 0x0}, pval = {rs = {s = 0x0, len = 340441888}, ri = 0, flags = 32765}}, i2s = '\000' , "\375\177\000\000\000\000\000\000\000"} c2 = {cache_type = 3419552154, val_type = 32550, c = {avp_val = {n = 0, s = {s = 0x0, len = 0}, re = 0x0}, pval = {rs = {s = 0x0, len = 0}, ri = 931380480, flags = -1499365429}}, i2s = "\377\377\377\377\377\377\377\377\060\271J\024\375\177\000\000 \316J\024\375\177"} rv1 = 0x0 rv2 = 0x0 __FUNCTION__ = "rval_expr_eval_int" #12 0x0000000000428eb6 in rval_expr_eval_int (h=0x7ffd144ace20, msg=0x7f26c906d1c0 , res=0x7ffd144ab930, rve=0x7f26cb52cdc0) at rvalue.c:1918 i1 = 32765 i2 = -922299968 ret = -1 c1 = {cache_type = 340446752, val_type = 32765, c = {avp_val = {n = -946126547, s = {s = 0x4c79b412d , len = -883769528}, re = 0x4c79b412d}, pval = { rs = {s = 0x4c79b412d , len = -883769528}, ri = -922299968, flags = 32550}}, i2s = "\000\000\000\000\005\000\000\000\301\321\343\313&\177\000\000LGu\001\000"} c2 = {cache_type = 8, val_type = RV_NONE, c = {avp_val = {n = -874270310, s = {s = 0x7f26cbe3b19a "%H:%M:%S", len = 1}, re = 0x7f26cbe3b19a}, pval = {rs = {s = 0x7f26cbe3b19a "%H:%M:%S", len = 1}, ri = 931380480, flags = -1499365429}}, i2s = "\020 \000\061\060\066\062\063\300\321\006\311&\177\000\000\017\000\000\000\000"} rv1 = 0x7f26c906d1c0 rv2 = 0x0 __FUNCTION__ = "rval_expr_eval_int" #13 0x0000000000455037 in do_action (h=0x7ffd144ace20, a=0x7f26cb52dde8, msg=0x7f26c906d1c0 ) at action.c:1030 ret = -5 v = 1 dst = {send_sock = 0x0, to = {s = {sa_family = 14, sa_data = '\000' }, sin = {sin_family = 14, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 14, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__in6_u = {__u6_addr8 = "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000", __u6_addr16 = {0, 0, 0, 0, 1, 0, 0, 0}, __u6_addr32 = {0, 0, 1, 0}}}, sin6_scope_id = 3325207609}}, id = 32548, proto = 81 'Q', send_flags = {f = 171 '\253', blst_imask = 216 '\330'}} end = 0x7f26cb52cdc0 "\004" uri = {user = {s = 0x16f9930 "PST", len = 340441632}, passwd = {s = 0x0, len = 0}, host = {s = 0x0, len = 0}, port = {s = 0x0, len = 0}, params = { s = 0x373200000000 , len = 0}, sip_params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 931380480}, port_no = 12, proto = 0, type = 32550, flags = (unknown: 3324156664), transport = {s = 0x7ffd144abac0 "-A\233\307&\177", len = 340441824}, ttl = {s = 0x7f26c906d1c0 "7\324)", len = -874262079}, user_param = { s = 0x175474c "17:26:27 sbc[10623]: NOTICE: