[sr-dev] [tracker] Task opened: Kamailio / Crash / Textops (302 Redirect)

sip-router admin at sip-router.org
Thu Nov 24 07:32:41 CET 2011


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Brandon Armstead (CRYY2010) 

Attached to Project - sip-router
Summary - Kamailio / Crash / Textops (302 Redirect)
Task Type - Bug Report
Category - Modules kamailio
Status - Assigned
Assigned To - Daniel-Constantin Mierla
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - I am using the latest GIT source from origin/3.1 branch (3.1.5)

version: kamailio 3.1.5 (x86_64/linux) 2bb8bb-dirty
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, PKG_SIZE 16MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 2bb8bb -dirty
compiled on 18:55:59 Nov 19 2011 with gcc 4.3.2

I am experiencing crash with the following scenario:

(Outgoing Call) -> LRN Lookup (returns 302 redirect with "contact;rn=LRN"

We use the newly obtained LRN information to determine next advance route (LCR).

*** NOTE *** we are NOT using any LCR provided modules (carrier route, etc)


*** BEGIN KAMAILIO CONFIG SNIP ***

# make sure call is domestic NANPA
if($avp(s:request-username) =~ "^1?[2-9][0-9][0-9][2-9][0-9][0-9][0-9][0-9][0-9][0-9]$" && !($avp(s:request-username) =~ "^18(00|55|66|77|88)")){
    if($avp(s:phone-number-lrn) == $null){
        route(8);
    }

    xlog("L_INFO", "[$ci] request-username=$avp(s:request-username) phone-number-lrn=$avp(s:phone-number-lrn)");
}

route[8]{
    # check cache
    avp_db_query("SELECT lrn FROM carrier.lrn_cache WHERE phoneNumber = '$(avp(s:request-username){s.substr,1,0})' LIMIT 1", "$avp(s:phone-number-lrn)");
    xlog("L_INFO", "[$ci] SELECT lrn FROM carrier.lrn_cache WHERE phoneNumber = '$(avp(s:request-username){s.substr,1,0})' LIMIT 1");

    xlog("L_INFO", "[$ci] phone-number-lrn CACHE CHECK = $avp(s:phone-number-lrn)");

    # if no cache found
    if($avp(s:phone-number-lrn) == $null){
        t_on_failure("3");
        t_on_reply("2");
        xlog("L_INFO", "[$ci] entering LRN processing block");

        $ru = "sip:" + $avp(s:request-username) + "@LRN-LOOKUP-PROXY";
        t_relay();
        exit;
    } else {
        return(1);
    }
}

onreply_route[2]
{
    if($rs == "302"){
        xlog("L_INFO", "[$ci][reply] status=$rs contact=$ct");
        $avp(s:phone-number-lrn) = $(ct{param.value,rn}{re.subst,/^\+?1?([2-9][0-9][0-9][2-9][0-9]+)/\1/});

        if($avp(s:phone-number-lrn) == $null){
            xlog("L_INFO", "[$ci] phone number IS LRN");
            $avp(s:phone-number-lrn) = $(avp(s:request-username){s.substr,1,0});
        }

        xlog("L_INFO", "[$ci] phone-number-lrn=$avp(s:phone-number-lrn)");

        # cache lrn
        avp_db_query("INSERT INTO carrier.lrn_cache (phoneNumber, lrn, created, modified) VALUES ('$(avp(s:request-username){s.substr,1,0})', '$avp(s:phone-number-lrn)', NOW(), NOW())");
    }
}


failure_route[3]{
    xlog("L_INFO", "[$ci] status=$rs received LRN response contact=$ct header=$hdr(Contact)");

    route(2);
    km_append_branch();
    exit;
}

*** END KAMAILIO CONFIG SNIP ***

*** BACKTRACE ***
#0  0x00007fe454204ed5 in raise () from /lib/libc.so.6
#1  0x00007fe4542063f3 in abort () from /lib/libc.so.6
#2  0x0000000000528739 in qm_free (qm=0x8b9fc0, p=0x7fe43d6a8ac0, file=0x593373 "<core>: data_lump.c", func=0x593bb2 "free_lump_list", line=517) at mem/q_malloc.c:447
#3  0x000000000042c906 in free_lump_list (l=<value optimized out>) at data_lump.c:517
#4  0x00007fe4515447eb in set_body_f (msg=0x7fe45285f7a0, p1=<value optimized out>, p2=0xb9ad18 "(y®") at textops.c:1201
#5  0x0000000000415ca7 in do_action (h=0x7fff5cb57ce0, a=0xb9a950, msg=0x7fe45285f7a0) at action.c:1107
#6  0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0xb9a950, msg=0x7fe45285f7a0) at action.c:1555
#7  0x0000000000416e60 in do_action (h=0x7fff5cb57ce0, a=0xba40f0, msg=0x7fe45285f7a0) at action.c:1090
#8  0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0xb88360, msg=0x7fe45285f7a0) at action.c:1555
#9  0x0000000000416e60 in do_action (h=0x7fff5cb57ce0, a=0xbae0d8, msg=0x7fe45285f7a0) at action.c:1090
#10 0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0xa65b80, msg=0x7fe45285f7a0) at action.c:1555
#11 0x0000000000416e60 in do_action (h=0x7fff5cb57ce0, a=0xbae358, msg=0x7fe45285f7a0) at action.c:1090
#12 0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0x9fcec0, msg=0x7fe45285f7a0) at action.c:1555
#13 0x0000000000416e60 in do_action (h=0x7fff5cb57ce0, a=0xd73f98, msg=0x7fe45285f7a0) at action.c:1090
#14 0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0x9db708, msg=0x7fe45285f7a0) at action.c:1555
#15 0x00000000004177e5 in do_action (h=0x7fff5cb57ce0, a=0xe15b28, msg=0x7fe45285f7a0) at action.c:711
#16 0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0xe15860, msg=0x7fe45285f7a0) at action.c:1555
#17 0x000000000041cf23 in run_top_route (a=0xe15860, msg=0x7fe45285f7a0, c=<value optimized out>) at action.c:1628
#18 0x00007fe452626048 in run_failure_handlers (t=0x7fe43d6545e0, rpl=0xe04620, code=<value optimized out>, extra_flags=<value optimized out>) at t_reply.c:964
#19 0x00007fe452627421 in t_should_relay_response (Trans=0x7fe43d6545e0, new_code=302, branch=0, should_store=<value optimized out>, should_relay=0x7fff5cb57fac, cancel_data=<value optimized out>, 
    reply=0xe04620) at t_reply.c:1226
#20 0x00007fe45262b818 in relay_reply (t=0x1b2c, p_msg=0xe04620, branch=6, msg_status=302, cancel_data=0x7fff5cb581f0, do_put_on_wait=1) at t_reply.c:1633
#21 0x00007fe45262da57 in reply_received (p_msg=0xe04620) at t_reply.c:2306
#22 0x000000000045296b in forward_reply (msg=0xe04620) at forward.c:782
#23 0x00000000004959a5 in receive_msg (
    buf=0x8a4300 "SIP/2.0 302 Moved Temporarily\r\nVia: SIP/2.0/UDP kamailio-proxy;branch=z9hG4bKa54b.58cda197.0\r\nVia: SIP/2.0/UDP PSTN;rport=5060;branch=z9hG4bKa54b.3f1f1f72.0\r\nVia: SIP/2.0/UDP PSTN;branch"..., len=<value optimized out>, rcv_info=<value optimized out>) at receive.c:266
#24 0x000000000051ca91 in udp_rcv_loop () at udp_server.c:532
#25 0x0000000000464bf5 in main_loop () at main.c:1560
#26 0x0000000000468063 in main (argc=<value optimized out>, argv=0x7fff5cb58768) at main.c:2410
#0  0x00007fe454204ed5 in raise () from /lib/libc.so.6
No symbol table info available.
#1  0x00007fe4542063f3 in abort () from /lib/libc.so.6
No symbol table info available.
#2  0x0000000000528739 in qm_free (qm=0x8b9fc0, p=0x7fe43d6a8ac0, file=0x593373 "<core>: data_lump.c", func=0x593bb2 "free_lump_list", line=517) at mem/q_malloc.c:447
	f = <value optimized out>
	size = <value optimized out>
#3  0x000000000042c906 in free_lump_list (l=<value optimized out>) at data_lump.c:517
	t = (struct lump *) 0x7fe43d6a8ac0
	r = (struct lump *) 0xb9ad18
#4  0x00007fe4515447eb in set_body_f (msg=0x7fe45285f7a0, p1=<value optimized out>, p2=0xb9ad18 "(y®") at textops.c:1201
	anchor = <value optimized out>
	buf = <value optimized out>
	len = <value optimized out>
	value_s = <value optimized out>
	value_len = <value optimized out>
	nb = {
  s = 0x81a760 "v=0\r\no=Sonus_UAC 11488 210 IN IP4 192.168.27.72\r\ns=- SIP\r\nc=IN IP4 media-gw\r\nt=0 0\r\nm=audio 17790 RTP/AVP 0 18 101\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:18 G729/8000\r\na=fmtp:18 annexb=no\r\na=rtpmap:101 t"..., len = 262}
	nc = {s = 0xae7928 "application/sdp", len = 15}
	__FUNCTION__ = "set_body_f"
#5  0x0000000000415ca7 in do_action (h=0x7fff5cb57ce0, a=0xb9a950, msg=0x7fe45285f7a0) at action.c:1107
	ret = -5
	v = <value optimized out>
	dst = {send_sock = 0x3a, to = {s = {sa_family = 51152, sa_data = "â\000\000\000\000\000Øeµ\\ÿ\177\000"}, sin = {sin_family = 51152, sin_port = 226, sin_addr = {s_addr = 0}, sin_zero = "Øeµ\\ÿ\177\000"}, 
    sin6 = {sin6_family = 51152, sin6_port = 226, sin6_flowinfo = 0, sin6_addr = {in6_u = {u6_addr8 = "Øeµ\\ÿ\177\000\000 ÷\205Rä\177\000", u6_addr16 = {26072, 23733, 32767, 0, 63392, 21125, 32740, 0}, 
          u6_addr32 = {1555391960, 32767, 1384511392, 32740}}}, sin6_scope_id = 6}}, id = 0, proto = -52 'Ì', send_flags = {f = 120 'x', blst_imask = 72 'H'}}
	tmp = <value optimized out>
	new_uri = <value optimized out>
	end = <value optimized out>
	crt = <value optimized out>
	cmd = <value optimized out>
	len = <value optimized out>
	user = <value optimized out>
	uri = {user = {s = 0x7fff5cb563e0 "", len = 4936592}, passwd = {s = 0x0, len = 1414666720}, host = {s = 0x3872390 "@\032RTä\177", len = 21}, port = {s = 0x0, len = 1555391680}, params = {
    s = 0x7fe450cdd991 "%s: %s%.*s", len = 1411680854}, sip_params = {s = 0x15 <Address 0x15 out of bounds>, len = 1412033874}, headers = {s = 0x70000002a <Address 0x70000002a out of bounds>, len = 6}, 
  port_no = 10, proto = 0, type = 111, flags = 4, transport = {s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {s = 0x7fe40000000a <Address 0x7fe40000000a out of bounds>, len = 11403264}, maddr = {
    s = 0xb99014 "codec-g729)", len = 10}, method = {s = 0xae9308 "\004", len = 1555391808}, lr = {s = 0x7fe45285f7a0 "[", len = 1030289128}, r2 = {s = 0x38725f0 "pÁt\003", len = 0}, transport_val = {
    s = 0x7fe400000215 <Address 0x7fe400000215 out of bounds>, len = 1555391600}, ttl_val = {s = 0x7fff5cb564a0 " ÷\205Rä\177", len = 127}, user_param_val = {s = 0x0, len = 1}, maddr_val = {
    s = 0x7fe40000000a <Address 0x7fe40000000a out of bounds>, len = 1}, method_val = {s = 0xba40f0 "\214\004", len = 1555397856}, lr_val = {s = 0x7fe45285f7a0 "[", len = 12177856}, r2_val = {
    s = 0x7fff5cb56a18 "\001", len = 4937490}}
	next_hop = {user = {s = 0x7fff5cb57ce0 "\006", len = 1384511392}, passwd = {s = 0xb9c380 "\001", len = 4936124}, host = {s = 0x7fff5cb57ce0 "\006", len = 1555391456}, port = {s = 0x7fe45285f7a0 "[", 
    len = 4932380}, params = {s = 0xf <Address 0xf out of bounds>, len = 1412358106}, sip_params = {s = 0xffffff01 <Address 0xffffff01 out of bounds>, len = 0}, headers = {
    s = 0x32345cb564c0 <Address 0x32345cb564c0 out of bounds>, len = 1355667857}, port_no = 25724, proto = 23733, type = 32767, flags = 59188732, transport = {s = 0x7fff5cb56470 "", len = 1412352994}, ttl = {
    s = 0x1ff4 <Address 0x1ff4 out of bounds>, len = 1412360274}, user_param = {s = 0x8 <Address 0x8 out of bounds>, len = 21}, maddr = {s = 0x3000000010 <Address 0x3000000010 out of bounds>, len = 59196912}, 
  method = {s = 0x2010 <Address 0x2010 out of bounds>, len = 1414666720}, lr = {s = 0x2010 <Address 0x2010 out of bounds>, len = 59188720}, r2 = {s = 0x90 <Address 0x90 out of bounds>, len = 1411687471}, 
  transport_val = {s = 0x7fff5cb56300 "à%\207\003", len = 8187}, ttl_val = {s = 0x38725e0 "pÍt\003", len = 128}, user_param_val = {s = 0x38725f0 "pÁt\003", len = 12172392}, maddr_val = {
    s = 0x1 <Address 0x1 out of bounds>, len = 8208}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x7fff5cb563e0 "", len = 1555397856}, r2_val = {s = 0x7fe45285f7a0 "[", len = 0}}
	u = <value optimized out>
	port = <value optimized out>
	i = <value optimized out>
	flags = <value optimized out>
	sct = <value optimized out>
	sjt = <value optimized out>
	rve = <value optimized out>
	mct = <value optimized out>
	rv = <value optimized out>
	rv1 = <value optimized out>
	c1 = {cache_type = 48, val_type = 48, c = {avp_val = {n = 1555391904, s = {s = 0x7fff5cb565a0 "ð@º", len = 1555391712}, re = 0x7fff5cb565a0}, pval = {rs = {s = 0x7fff5cb565a0 "ð@º", len = 1555391712}, 
      ri = 11440904, flags = 0}}, i2s = "@eµ\\ÿ\177\000\000 ÷\205Rä\177\000\000\225aY\000\000"}
	s = {s = 0xb8fc90 "\a", len = 2}
	srevp = {0x1c00000001, 0x91}
	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 = 1, 
      string = 0x1 <Address 0x1 out of bounds>, str = {s = 0x1 <Address 0x1 out of bounds>, len = 0}, data = 0x1, attr = 0x1, select = 0x1}}, {type = RVE_FREE_FIXUP_ST, u = {number = 0, string = 0x0, str = {
        s = 0x0, len = 6}, 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"
#6  0x000000000041cc5e in run_actions (h=0x7fff5cb57ce0, a=0xb9a950, msg=0x7fe45285f7a0) at action.c:1555
	t = (struct action *) 0xb9a950
	ret = <value optimized out>
	mod = <value optimized out>
#7  0x0000000000416e60 in do_action (h=0x7fff5cb57ce0, a=0xba40f0, msg=0x7fe45285f7a0) at action.c:1090
	ret = 1
	v = 1
	dst = {send_sock = 0x0, to = {s = {sa_family = 0, sa_data = "\000\000\000\000\000\000hjµ\\ÿ\177\000"}, sin = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "hjµ\\ÿ\177\000"}, sin6 = {
      sin6_family = 0, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {in6_u = {u6_addr8 = "hjµ\\ÿ\177\000\000 ÷\205Rä\177\000", u6_addr16 = {27240, 23733, 32767, 0, 63392, 21125, 32740, 0}, u6_addr32 = {
            1555393128, 32767, 1384511392, 32740}}}, sin6_scope_id = 26}}, id = 0, proto = -52 'Ì', send_flags = {f = 120 'x', blst_imask = 72 'H'}}
	tmp = <value optimized out>
	new_uri = <value optimized out>
	end = <value optimized out>
	crt = <value optimized out>
	cmd = <value optimized out>
	len = <value optimized out>
	user = <value optimized out>
	uri = {user = {s = 0xb7f708 "\001", len = 4936124}, passwd = {s = 0xb7dd80 "\001", len = 1555394216}, host = {s = 0xa9527d24ce45fafd <Address 0xa9527d24ce45fafd out of bounds>, len = -1736049923}, 
  port = {s = 0x0, len = 1555392848}, params = {s = 0x7fe450cdd991 "%s: %s%.*s", len = 1411680854}, sip_params = {s = 0x0, len = 1412033874}, headers = {s = 0xab6e38 "À\006", len = 6}, port_no = 27208, 
  proto = 23733, type = 32767, flags = 4, transport = {s = 0x13c400000000 <Address 0x13c400000000 out of bounds>, len = 0}, ttl = {s = 0x59df88 "", len = 0}, user_param = {s = 0x1a <Address 0x1a out of bounds>, 
    len = 1555397856}, maddr = {s = 0xab6e68 "\002", len = 11232016}, method = {s = 0x7fff5cb56ea8 "\001", len = 12053776}, lr = {s = 0x4 <Address 0x4 out of bounds>, len = 4921028}, r2 = {
    s = 0x38725f0 "pÁt\003", len = 0}, transport_val = {s = 0x7fe45285fb08 "", len = 1384512376}, ttl_val = {s = 0x7fff5cb56930 " ÷\205Rä\177", len = 12042280}, user_param_val = {s = 0x38725f0 "pÁt\003", 
    len = 1322114862}, maddr_val = {s = 0x21 <Address 0x21 out of bounds>, len = 0}, method_val = {s = 0xbae0d8 "¢\004", len = 1555397856}, lr_val = {s = 0x7fe45285f7a0 "[", len = 0}, r2_val = {
    s = 0xbae0d8 "¢\004", len = 4936592}}
	next_hop = {user = {s = 0xb7f010 "", len = 1302054244}, passwd = {s = 0x7fe4545219e0 "", len = 1555392192}, host = {s = 0x7fff5cb566f0 "", len = 1555392848}, port = {
    s = 0x1800000111 <Address 0x1800000111 out of bounds>, len = 12054103}, params = {s = 0x14 <Address 0x14 out of bounds>, len = 1030270632}, sip_params = {s = 0xffffff01 <Address 0xffffff01 out of bounds>, 
    len = 0}, headers = {s = 0x323400000000 <Address 0x323400000000 out of bounds>, len = 1355667857}, port_no = 61015, proto = 183, type = ERROR_URI_T, flags = 20, transport = {
    s = 0x8 <Address 0x8 out of bounds>, len = 0}, ttl = {s = 0x1ff4 <Address 0x1ff4 out of bounds>, len = 12054520}, user_param = {s = 0x7fff5cb56790 "", len = 1384511392}, maddr = {s = 0x7fff5cb57ce0 "\006", 
    len = 12054504}, method = {s = 0x7fff5cb56a5c "", len = 4747283}, lr = {s = 0x7fff5cb56790 "", len = 0}, r2 = {s = 0x7fff5cb56a5c "", len = 4920865}, transport_val = {s = 0x7fff5cb56ea8 "\001", 
    len = 4312158}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 12048512}, maddr_val = {s = 0x7fff5cb567d0 "", len = 0}, method_val = {s = 0x7fff5cb57ce0 "\006", len = 4312983}, lr_val = {
    s = 0x0, len = 12247256}, r2_val = {s = 0x7fff5cb57ce0 "\006", len = 1384511392}}
	u = <value optimized out>
	port = <value optimized out>

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=181

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list