Hi all,

I'm using OpenSIPS 1.7.1 and based from the attached back trace, it crashed
when it is trying to parse the method of a REGISTER message received by the
server, triggered by pike route.

Here is a snippet of my opensips.cfg:
...
loadmodule "pike.so"
modparam("pike", "sampling_time_unit", 30)
modparam("pike", "reqs_density_per_unit", 75)
modparam("pike", "check_route", "pike")
...
route[pike] {
        if (($si == $Ri) || ($si == "192.168.1.60") || ($si == "
192.168.1.61") || ($si == " 192.168.1.65")) {
                        drop;
        }
        if (!is_method("REGISTER")) {
                drop;
        }
}
...

Basically, I just want to check REGISTER messages only on the pike route.
Does anyone have a workaround on this?

FWIW, should I also post this on the dev list?

Thanks!

Regards,
Ronald
(gdb) bt full
#0  get_hdr_field (buf=0x0, end=0xaf6c95df "", hdr=0x81d9280) at 
parser/msg_parser.c:83
        tmp = <value optimized out>
        match = <value optimized out>
        vb = <value optimized out>
        cseq_b = <value optimized out>
        to_b = <value optimized out>
        integer = <value optimized out>
        __FUNCTION__ = "get_hdr_field"
        _c = 89 'Y'
#1  0x080f7342 in parse_headers (msg=0x81cac00, flags=32, next=0) at 
parser/msg_parser.c:322
        hf = (struct hdr_field *) 0x81d9280
        itr = <value optimized out>
        tmp = 0x0
        rest = 0xaf683c40 "Content-Length:  0\r\n\r\nCK, BYE, CANCEL, UPDATE, 
SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS\r\nAccept: application/sdp, 
application/pidf+xml, application/xpidf+xml, 
application/simple-message-summary, mes"...
        end = 0xaf6c95df ""
        orig_flag = 0
        __FUNCTION__ = "parse_headers"
#2  0xb752734a in is_method_f (msg=0x81cac00, meth=0x81caabc "", str2=0x0) at 
textops.c:1220
        __FUNCTION__ = "is_method_f"
#3  0x08057e64 in do_action (a=0x81c98c0, msg=0x81cac00) at action.c:1280
        val_s = {s = 0xbfffee48 "Øïÿ¿Ê\r\v\b", len = 134811270}
        aux = {s = 0x81c9550 "\"", len = 136096768}
        ret = <value optimized out>
        v = <value optimized out>
        sec = <value optimized out>
        usec = <value optimized out>
        to = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        p = <value optimized out>
        tmp = <value optimized out>
        new_uri = <value optimized out>
        end = <value optimized out>
        crt = <value optimized out>
        len = <value optimized out>
        i = <value optimized out>
        user = <value optimized out>
        vals = {{s = 0x0, len = 0}, {s = 0x0, len = 136090492}, {s = 0x81c9370 
"\"", len = 136096768}, {s = 0xbfffee18 "\214ïÿ¿Ê\r\v\b", len = 134811270}, {s 
= 0x81cac00 ")", len = 11}}
        result = {s = 0xbfffef8c "Àû\033\b\016", len = 134942154}
        uri = {user = {s = 0xb75f2cd3 "\201Ã!£\016", len = 138188100}, passwd = 
{s = 0x1110 <Address 0x1110 out of bounds>, len = 0}, host = {s = 0x83cb81f 
"sg: parse_msg failed\n", len = 0}, port = {
    s = 0x83c9544 "àÈm·", len = -1218689948}, params = {s = 0xb76dcff4 
"\234m\025", len = 11}, headers = {s = 0xa <Address 0xa out of bounds>, len = 
-1073745128}, port_no = 23703, proto = 46940,
  type = 3077427188, transport = {s = 0x8167d09 ": message=<%.*s>\n", len = 
11}, ttl = {s = 0xbffff32c "8¸<\bHóÿ¿8¸<\bÈg\001", len = -1218683753}, 
user_param = {s = 0x83c94b0 "\220ám·\220ám·",
    len = -1218499373}, maddr = {s = 0xb <Address 0xb out of bounds>, len = 
4368}, method = {s = 0xb7612d09 "\205Àu\033\213U´\213E¸3\203\200\030", len = 
138197000}, lr = {s = 0xb75f2cd3 "\201Ã!£\016",
    len = 138188100}, r2 = {s = 0x1110 <Address 0x1110 out of bounds>, len = 
-1217649655}, transport_val = {s = 0x83cb821 ": parse_msg failed\n", len = 0}, 
ttl_val = {s = 0x83c9544 "àÈm·",
    len = -1218689948}, user_param_val = {s = 0xb76dcff4 "\234m\025", len = 
19}, maddr_val = {s = 0x12 <Address 0x12 out of bounds>, len = -1073745032}, 
method_val = {
    s = 0xb75c5c97 "9Ç\017\205\201ýÿÿ\213µxûÿÿ\001½túÿÿ\200>", len = 
-1217540108}, lr_val = {s = 0x815c49d ": parse_msg failed\n", len = 19}, r2_val 
= {s = 0xbffff38c "\001", len = -1218683753},
  u_name = {{s = 0x83c94b0 "\220ám·\220ám·", len = 135644317}, {s = 0x13 
<Address 0x13 out of bounds>, len = 4368}, {s = 0x0, len = 0}, {s = 0xb 
<Address 0xb out of bounds>, len = 50331604}, {
      s = 0x1110 <Address 0x1110 out of bounds>, len = -1217649655}}, u_val = 
{{s = 0xb76c2408 "%d]", len = -1218681976}, {s = 0x81c919c "", len = 
136090000}, {s = 0x81cac00 ")", len = -1073746456}, {
      s = 0x8090e86 
"\205À\017\205Ûþÿÿ\213V0\205Ò\017\204Ðþÿÿ\213u\020\211t$\b\211T$\004\211<$è)\233\004",
 len = 136096768}, {s = 0xb <Address 0xb out of bounds>, len = 50327340}}, 
u_params_no = 0}
        next_hop = {user = {s = 0xb76c167f "<unknown>", len = -1217540108}, 
passwd = {s = 0x0, len = 138205152}, host = {s = 0xbfffec14 "", len = 
-1218477610}, port = {s = 0xb76de160 "", len = 0},
  params = {s = 0x0, len = 0}, headers = {s = 0x0, len = -1352123843}, port_no 
= 23, proto = 0, type = ERROR_URI_T, transport = {s = 0x0, len = -1352123819}, 
ttl = {s = 0xd <Address 0xd out of bounds>,
    len = 0}, user_param = {s = 0x0, len = 131072}, maddr = {s = 0x1 <Address 
0x1 out of bounds>, len = -1352123819}, method = {s = 0xd <Address 0xd out of 
bounds>, len = 0}, lr = {s = 0x0, len = 0},
  r2 = {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 = 0xb75f2cd3 
"\201Ã!£\016", len = -1352123809},
  method_val = {s = 0x3 <Address 0x3 out of bounds>, len = 0}, lr_val = {s = 
0x83cb808 "]: ERROR:core:receive_msg: parse_msg failed\n", len = -1218499373}, 
r2_val = {s = 0x83c9544 "àÈm·",
    len = 135698488}, u_name = {{s = 0x1c <Address 0x1c out of bounds>, len = 
138197029}, {s = 0x0, len = 138188100}, {s = 0xb75c4464 "\201Ã\220\213\021", 
len = -1217540108}, {
      s = 0xe <Address 0xe out of bounds>, len = 13}, {s = 0xbffff2b8 
"\177\026l·ôÏm·", len = -1218683753}}, u_val = {{s = 0xb76dcff4 "\234m\025", 
len = 135698916}, {s = 0xe <Address 0xe out of bounds>,
      len = -1073745204}, {s = 0xb75c5c97 
"9Ç\017\205\201ýÿÿ\213µxûÿÿ\001½túÿÿ\200>", len = 138187952}, {s = 0xb75f2cd3 
"\201Ã!£\016", len = 14}, {s = 0x1110 <Address 0x1110 out of bounds>, len = 0}},
---Type <return> to continue, or q <return> to quit---
  u_params_no = 47112}
        u = <value optimized out>
        port = <value optimized out>
        cmatch = <value optimized out>
        aitem = <value optimized out>
        adefault = <value optimized out>
        spec = <value optimized out>
        model = <value optimized out>
        val = {rs = {s = 0x2ffef5c <Address 0x2ffef5c out of bounds>, len = 
134942154}, ri = 136096768, flags = 136090000}
        pve = <value optimized out>
        name_s = {s = 0x81cac00 ")", len = 136090972}
        __FUNCTION__ = "do_action"
#4  0x0805665e in run_action_list (a=0x81c98c0, msg=0x81cac00) at action.c:141
        ret = 136091948
        t = (struct action *) 0x81c98c0
        __FUNCTION__ = "run_action_list"
#5  0x080b0277 in eval_elem (e=0x81c992c, msg=0x81d9274, val=0x0) at 
route.c:1398
        uri = {user = {s = 0x0, len = -1073744880}, passwd = {s = 0xbffff048 
"", len = -1217651954}, host = {s = 0xb76c0614 "%I:%M:%S %p", len = 
-1217657309}, port = {
    s = 0x83c925b "max_sock_buff: using rcv buffer of 255 kb\n", len = 
138197040}, params = {s = 0xb76de160 "", len = -44}, headers = {s = 0x83cd7e0 
"", len = 136078636}, port_no = 55264, proto = 2108,
  type = 135645054, transport = {s = 0xbffff078 "", len = 8188}, ttl = {s = 
0xb76c240b "", len = -1073745168}, user_param = {s = 0x1 <Address 0x1 out of 
bounds>, len = 0}, maddr = {
    s = 0xbffff39c "^f\005\b\034\232\034\b", len = 135644336}, method = {s = 
0xbffff304 "8¸<\b\206\214_· \226<\b", len = -1}, lr = {s = 0x0, len = 
-1073744792}, r2 = {
    s = 0xbfffef54 "(¸<\b\206\214_·Àû\033\b\016", len = 136094068}, 
transport_val = {s = 0xd <Address 0xd out of bounds>, len = 0}, ttl_val = {s = 
0x4 <Address 0x4 out of bounds>, len = 136051648},
  user_param_val = {s = 0xe <Address 0xe out of bounds>, len = 0}, maddr_val = 
{s = 0x4 <Address 0x4 out of bounds>, len = 138196952}, method_val = {s = 
0x2008 <Address 0x2008 out of bounds>,
    len = 8200}, lr_val = {s = 0x83c94b0 "\220ám·\220ám·", len = -1217535648}, 
r2_val = {s = 0xb75f5fb4 "\201Ã@p\016", len = 138197032}, u_name = {{s = 
0xb75f8c86 "\211Eìe\203=\f", len = 136051648}, {
      s = 0xe <Address 0xe out of bounds>, len = 0}, {s = 0x4 <Address 0x4 out 
of bounds>, len = 136090208}, {s = 0x2 <Address 0x2 out of bounds>, len = 1}, 
{s = 0xbfffefa8 "Øïÿ¿Ê\030\v\b`\222\034\b",
      len = 134944970}}, u_val = {{s = 0xbfffef98 "\004", len = 138197032}, {s 
= 0x167d8 <Address 0x167d8 out of bounds>, len = 136051648}, {s = 0xe <Address 
0xe out of bounds>, len = 0}, {
      s = 0x4 <Address 0x4 out of bounds>, len = 136090688}, {s = 0x2 <Address 
0x2 out of bounds>, len = 1}}, u_params_no = 61400}
        ret = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        ival = <value optimized out>
        lval = {rs = {
    s = 0x80b18ca "\203-tè\030\b\001\203Ä 
[^]á$\035\030\b\2038þ}I¸ÿÿÿÿ\203-tè\030\b\001\203Ä 
[^]ÃèëMûÿ\211ÃèÈCÿÿ\211t$\020ÇD$\fýé\025\b\211\\$\b\211D$\004Ç\004$\024Ó\025\bè\223Mûÿ¸ÿÿÿÿé.ÿÿÿ\213\025(\035\030\b\205Ò\017\204\205",
 len = 136090688}, ri = 136096768, flags = 0}
        rval = {rs = {s = 0x81c9620 "\002", len = 2}, ri = 1, flags = 
-1073745912}
        p = <value optimized out>
        i = <value optimized out>
        __FUNCTION__ = "eval_elem"
#6  0x080b18ca in eval_expr (e=0x81c992c, msg=0x81cac00, val=0x0) at 
route.c:1743
        ret = <value optimized out>
        rec_lev = 3
        __FUNCTION__ = "eval_expr"
#7  0x080b184e in eval_expr (e=0x81c9958, msg=0x81cac00, val=0x0) at 
route.c:1759
        ret = <value optimized out>
        rec_lev = 3
        __FUNCTION__ = "eval_expr"
#8  0x080b1880 in eval_expr (e=0x81c9984, msg=0x81cac00, val=0x0) at 
route.c:1764
        ret = <value optimized out>
        rec_lev = 3
        __FUNCTION__ = "eval_expr"
#9  0x08058002 in do_action (a=0x81c9a1c, msg=0x81cac00) at action.c:830
        val_s = {s = 0x83cb7e0 "<27>Jan 13 09:58:57 /sbin/opensips[12358]: 
ERROR:core:receive_msg: parse_msg failed\n", len = -1073745012}
        aux = {s = 0xb76dcff4 "\234m\025", len = -1217535648}
        ret = <value optimized out>
        v = <value optimized out>
        sec = <value optimized out>
        usec = <value optimized out>
        to = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        p = <value optimized out>
        tmp = <value optimized out>
        new_uri = <value optimized out>
        end = <value optimized out>
        crt = <value optimized out>
        len = <value optimized out>
        i = <value optimized out>
        user = <value optimized out>
        vals = {{s = 0x83cb7e0 "<27>Jan 13 09:58:57 /sbin/opensips[12358]: 
ERROR:core:receive_msg: parse_msg failed\n", len = -1217535648}, {s = 
0xb76dcff4 "\234m\025", len = 138197048}, {
    s = 0xbffff348 "fi_·`ám·°\224<\b¨\224<\bôÏm·\024", len = 138197048}, {s = 
0x167c8 <Address 0x167c8 out of bounds>, len = -1217535648}, {s = 0x83c94b0 
"\220ám·\220ám·", len = -1073745052}}
        result = {s = 0x83cb7e0 "<27>Jan 13 09:58:57 /sbin/opensips[12358]: 
ERROR:core:receive_msg: parse_msg failed\n", len = 138196952}
        uri = {user = {s = 0x0, len = -1217535604}, passwd = {s = 0xb76de18c 
"", len = -1217540108}, host = {
    s = 0xb76de190 "Ø·<\b 
\226<\b¨\224<\b¨\224<\b\230ám·\230ám· ám· ám·¨ám·¨ám·°ám·°ám·¸ám·¸ám·à²<\bà²<\bÈám·Èám·Ðám·Ðám·Øám·Øám·àám·àám·@³<\b@³<\bðám·ðám·øám·øám·",
 len = 926229501}, port = {
    s = 0xb76dcff4 "\234m\025", len = 138196971}, params = {s = 0xb76c060b 
"%H:%M:%S", len = -1218490629}, headers = {s = 0xb76dcff4 "\234m\025", len = 
138197048}, port_no = 26568, proto = 1,
  type = 3221222088, transport = {s = 0xb75f64ef "éûûÿÿ\215\223Dxþÿ\215¶", len 
= 0}, ttl = {s = 0x83cb7ea " 09:58:57 /sbin/opensips[12358]: 
ERROR:core:receive_msg: parse_msg failed\n",
    len = -1073745244}, user_param = {s = 0xb76c1b0e "%Y-%m-%d", len = 
-1217657324}, maddr = {s = 0xb76c0623 "", len = -1218486348}, method = {s = 
0x83cb840 "", len = -1217535648}, lr = {
    s = 0xb76c2406 "", len = 138205152}, r2 = {s = 0x83cb7d8 "/3", len = 
138205152}, transport_val = {s = 0x14820 <Address 0x14820 out of bounds>, len = 
138187952}, ttl_val = {
    s = 0x1ffc <Address 0x1ffc out of bounds>, len = -1218486348}, 
user_param_val = {s = 0x83cbdb8 "", len = 3}, maddr_val = {s = 0xb76c2db4 
"%s\n", len = 8}, method_val = {
    s = 0xb76c1751 "malloc(): memory corruption", len = -1217653121}, lr_val = 
{s = 0xb76dcff4 "\234m\025", len = 0}, r2_val = {s = 0x83cd7e0 "", len = 
-1073745148}, u_name = {{
      s = 0xb75f81d6 
"\213MèéÉþÿÿf\220\213Eä\203À\0049Eì\017\203Hþÿÿ\213Eä\203è\a\211D$\004\213E\b\211\004$è\\éÿÿ\205À\211Æ\017\204J\001",
 len = -1217535648}, {s = 0x83cb840 "", len = -1218486348}, {
      s = 0x83cb290 "CET", len = -1218504511}, {s = 0xb76c2406 "", len = 96}, 
{s = 0x83cb7d8 "/3", len = 8200}}, u_val = {{s = 0x2008 <Address 0x2008 out of 
bounds>, len = 138187952}, {
      s = 0xb76de160 "", len = -1218486348}, {s = 0x83cb838 "", len = 
-1218474874}, {s = 0x83c9620 "", len = 7168}, {s = 0x83c94b0 "\220ám·\220ám·", 
len = -1073745104}}, u_params_no = 11291}
        next_hop = {user = {s = 0xb76c1b0e "%Y-%m-%d", len = -1217657324}, 
passwd = {s = 0xb76c0623 "", len = 9}, host = {s = 0x83cb290 "CET", len = 8}, 
port = {s = 0xb76c0613 "", len = 0}, params = {
    s = 0x0, len = 2}, headers = {s = 0x0, len = 0}, port_no = 8181, proto = 0, 
type = 4294967295, transport = {s = 0x18 <Address 0x18 out of bounds>, len = 
0}, ttl = {
    s = 0xce083 <Address 0xce083 out of bounds>, len = 0}, user_param = {s = 
0x6803 <Address 0x6803 out of bounds>, len = 0}, maddr = {s = 0x2 <Address 0x2 
out of bounds>, len = 843907}, method = {
    s = 0x81a4 <Address 0x81a4 out of bounds>, len = 1}, lr = {s = 0x0, len = 
0}, r2 = {s = 0xb76dbfe0 "J\032l·", len = 9}, transport_val = {s = 0x83cb290 
"CET", len = 8}, ttl_val = {s = 0xb76c0613 "",
    len = 0}, user_param_val = {s = 0x0, len = 2}, maddr_val = {s = 0x0, len = 
0}, method_val = {s = 0xbffff23a "57ôÏm·ë·<\b\v\006l·ûN_·ôÏm·8¸<\bÈg\001", len 
= -1}, lr_val = {
    s = 0x4c58f12c <Address 0x4c58f12c out of bounds>, len = 0}, r2_val = {s = 
0xce083 <Address 0xce083 out of bounds>, len = 0}, u_name = {{
---Type <return> to continue, or q <return> to quit---
      s = 0xbffff1f4 
"\024òÿ¿<òÿ¿(²<\bu\032l·´-l·ÈGl·Ä\026l·\177\026l·<òÿ¿`ám·u\032l·", len = 
-1218476139}, {s = 0xb76de160 "", len = 15}, {s = 0xb76de160 "", len = 
-1217657333}, {
      s = 0xb76dcff4 "\234m\025", len = 15}, {s = 0x83cb7f3 " 
/sbin/opensips[12358]: ERROR:core:receive_msg: parse_msg failed\n", len = 
-1073745388}}, u_val = {{
      s = 0xbffff23c "ôÏm·ë·<\b\v\006l·ûN_·ôÏm·8¸<\bÈg\001", len = 138195496}, 
{s = 0xb76c1a75 "/etc/localtime", len = -1217647180}, {s = 0xb76c47c8 "*** 
glibc detected *** %s: %s: 0x%s ***\n",
      len = -1217653052}, {s = 0xb76c167f "<unknown>", len = -1073745348}, {s = 
0xb76de160 "", len = -1217652107}}, u_params_no = 0}
        u = <value optimized out>
        port = <value optimized out>
        cmatch = <value optimized out>
        aitem = <value optimized out>
        adefault = <value optimized out>
        spec = <value optimized out>
        model = <value optimized out>
        val = {rs = {s = 0xb75f6966 "e\203=\f", len = -1217535648}, ri = 
138187952, flags = 138187944}
        pve = <value optimized out>
        name_s = {s = 0xb75f6966 "e\203=\f", len = -1217535648}
        __FUNCTION__ = "do_action"
#10 0x0805665e in run_action_list (a=0x81c973c, msg=0x81cac00) at action.c:141
        ret = 1
        t = (struct action *) 0x81c9a1c
        __FUNCTION__ = "run_action_list"
#11 0x0805b84d in run_top_route (a=0x81c973c, msg=0x81cac00) at action.c:121
        bk_action_flags = 0
        bk_rec_lev = 0
        ret = <value optimized out>
#12 0xb7504c79 in run_pike_route (msg=0x81cac00, rt=0x2) at pike_funcs.c:203
No locals.
#13 0x080b5a7b in exec_parse_err_cb (msg=0x81cac00) at script_cb.c:165
No locals.
#14 0x0809ec1b in receive_msg (
---Type <return> to continue, or q <return> to quit---
    buf=0xaf6c9050 "-15\r\nSIP/2.0 200 OK\r\nVia: SIP/2.0/TCP 
193.67.129.63;received=193.67.129.63;branch=z9hG4bKb685.244034a7.0\r\nVia: 
SIP/2.0/UDP 
193.67.129.63:6060;rport=6060;received=193.67.129.63;branch=z9hG4bK2bcfb194\r\n"...,
 len=1423, rcv_info=0xaf6c8fec) at receive.c:220
        msg = (struct sip_msg *) 0x81cac00
        start = {tv_sec = 134765502, tv_usec = 39}
        __FUNCTION__ = "receive_msg"
#15 0x080d1e68 in tcp_read_req (con=0xaf6c8fdc, bytes_read=0xbffff598) at 
tcp_read.c:546
        bytes = <value optimized out>
        total_bytes = 1418
        resp = <value optimized out>
        size = <value optimized out>
        c = 0 '\0'
        __FUNCTION__ = "tcp_read_req"
#16 0x080d261a in handle_io (fm=0x24, idx=-1) at tcp_read.c:817
        ret = <value optimized out>
        n = <value optimized out>
        con = (struct tcp_connection *) 0x81d9274
        s = <value optimized out>
        resp = <value optimized out>
        __FUNCTION__ = "handle_io"
#17 0x080d50d7 in tcp_receive_loop (unix_sock=39) at io_wait.h:727
        __FUNCTION__ = "tcp_receive_loop"
#18 0x080c5532 in tcp_init_children (chd_rank=0x8189fe4) at tcp_main.c:1763
        r = <value optimized out>
        reader_fd = {37, 39}
        pid = <value optimized out>
        si = <value optimized out>
        load_p = (stat_var *) 0xaf63e6b0
        __FUNCTION__ = "tcp_init_children"
---Type <return> to continue, or q <return> to quit---
#19 0x08072124 in main (argc=9, argv=0xbffff8a4) at main.c:937
        cfg_log_stderr = 0
        cfg_stream = (FILE *) 0x83c1008
        c = <value optimized out>
        r = <value optimized out>
        tmp = 0xbffffec0 ""
        tmp_len = <value optimized out>
        port = <value optimized out>
        proto = <value optimized out>
        ret = <value optimized out>
        seed = 3714997116
        rfd = <value optimized out>
        __FUNCTION__ = "main"
(gdb)
(gdb)
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to