[SR-Users] xcap server crash

Daniel-Constantin Mierla miconda at gmail.com
Sat Apr 13 11:38:22 CEST 2013


Hello,

I got the time to look deeper at it, I pushed a fix. Let me know if now 
goes on fine.

Cheers,
Daniel

On 4/9/13 6:11 PM, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> can you provide 'bt full' and print the variables start_pos, end_pos and
>> cur_etag_len in the frame 1?
> daniel,
>
> thanks for looking into this.  the info you asked is below.
>
> -- juha
>
> (gdb) bt full
> #0  0x00007fa35ab47764 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> No symbol table info available.
> #1  0x00007fa3547ff9e2 in check_match_header (body=..., etag=0x7fff50162170)
>      at xcap_server.c:1625
>          start_pos = 0x7fa35a10e4f9 "\"urn:ietf:params:xml:ns:resource-lists\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_blockedcontacts\"/><rl:list name=\"oma_allcontacts\"><rl:external anchor=\"ht"...
>          end_pos = 0x7fa35a10e51f "\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_blockedcontacts\"/><rl:list name=\"oma_allcontacts\"><rl:external anchor=\"http%3A//192.98.102.10%3A8080/xcap-root/"...
>          old_body_pos = 0x4 <Address 0x4 out of bounds>
>          cur_etag_len = 39
> #2  0x00007fa3547ff88a in check_preconditions (msg=0x7fff501631c0,
>      etag_hdr=...) at xcap_server.c:1583
>          etag = {s = 0x3e00417356 <Address 0x3e00417356 out of bounds>,
>            len = 1511057576}
>          hdr = 0x7fa35a10e070
>          ifmatch_found = 0
>          matched_matched = 0
>          matched_nonematched = 0
> #3  0x00007fa3547f85ec in w_xcaps_put (msg=0x7fff501631c0,
>      puri=0x7fa35a091470 "\300-\tZ\243\177",
>      ppath=0x7fa35a091510 "\360:\tZ\243\177",
>      pbody=0x7fa35a0915b0 " ;\tZ\243\177") at xcap_server.c:594
>          turi = {user = {s = 0x7fa35a0cc534 "jh at test.fi", len = 2}, passwd = {
>              s = 0x0, len = 0}, host = {s = 0x7fa35a0cc537 "test.fi", len = 7},
>            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 = SIP_URI_T, flags = 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}}
> ---Type <return> to continue, or q <return> to quit---
>          uri = {s = 0x7fa35a0cc530 "sip:jh at test.fi", len = 14}
>          path = {
>            s = 0x7fa35a0cd550 "/xcap-root/resource-lists/users/sip:jh at test.fi/generallist.xml", len = 62}
>          body = {
>            s = 0x7fa35a10ecc0 "<?xml version='1.0' encoding='UTF-8'?>\n<rl:resource-lists xmlns:rl=\"urn:ietf:params:xml:ns:resource-lists\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_blocke"..., len = 996}
>          etag = {s = 0x3e00417350 <Address 0x3e00417350 out of bounds>,
>            len = 1511057584}
>          etag_hdr = {s = 0x3b0 <Address 0x3b0 out of bounds>, len = 1510109200}
>          tbuf = {s = 0x7fff50162400 "\300\354\020Z\243\177", len = 5461343}
>          nbuf = {s = 0x0, len = 0}
>          allow = {s = 0x0, len = 0}
>          xm = 0x7fa35a0915b0
>          xuri = {
>            buf = "/xcap-root/resource-lists/users/sip:jh at test.fi/generallist.xml", '\000' <repeats 193 times>, uri = {
>              s = 0x7fff501621f0 "/xcap-root/resource-lists/users/sip:jh at test.fi/generallist.xml", len = 62}, root = {
>              s = 0x7fff501621f0 "/xcap-root/resource-lists/users/sip:jh at test.fi/generallist.xml", len = 11}, auid = {
>              s = 0x7fff501621fb "resource-lists/users/sip:jh at test.fi/generallist.xml", len = 14}, type = 4, tree = {
>              s = 0x7fff5016220a "users/sip:jh at test.fi/generallist.xml",
>              len = 5}, xuid = {
>              s = 0x7fff50162210 "sip:jh at test.fi/generallist.xml", len = 14},
>            file = {s = 0x7fff5016221f "generallist.xml", len = 15}, adoc = {
>              s = 0x7fff501621f0 "/xcap-root/resource-lists/users/sip:jh at test.fi/generallist.xml", len = 62}, rdoc = {
>              s = 0x7fff501621fb "resource-lists/users/sip:jh at test.fi/generallist.xml", len = 51}, nss = 0x0, node = {s = 0x0, len = 0}, target = {s = 0x0,
>              len = 0}, domain = {s = 0x0, len = 0}}
> #4  0x000000000041bbe0 in do_action (h=0x7fff501630e0, a=0x7fa35a092f50,
>      msg=0x7fff501631c0) at action.c:1092
>          ret = -5
>          v = 1510544240
>          dst = {send_sock = 0x7fff501629f0, to = {s = {sa_family = 1920,
> ---Type <return> to continue, or q <return> to quit---
>                sa_data = ">T\243\177\000\000X*\026P\377\177\000"}, sin = {
>                sin_family = 1920, sin_port = 21566, sin_addr = {
>                  s_addr = 32675}, sin_zero = "X*\026P\377\177\000"}},
>            id = 1510955600, proto = -93 '\243', send_flags = {f = 127 '\177',
>              blst_imask = 0 '\000'}}
>          tmp = 0x7fff00000037 <Address 0x7fff00000037 out of bounds>
>          new_uri = 0x2 <Address 0x2 out of bounds>
>          end = 0x0
>          crt = 0x7fa35a0f5a50 "XCAP service PUT <resource-lists> for <sip:jh at test.fi>\n"
>          cmd = 0x7fa35a0458c0
>          len = 32767
>          user = 1343631808
>          uri = {user = {s = 0x7100000003 <Address 0x7100000003 out of bounds>,
>              len = 1}, passwd = {s = 0x1 <Address 0x1 out of bounds>,
>              len = 10800}, host = {s = 0x1cc75e0 "EEST", len = 4947804},
>            port = {s = 0x7fff50162980 "\020\334\020Z\243\177",
>              len = 1510518056}, params = {
>              s = 0x1900000000 <Address 0x1900000000 out of bounds>,
>              len = 4780517}, sip_params = {
>              s = 0x7fa35a07d6a8 "\223\325\aZ\243\177", len = 1343629696},
>            headers = {s = 0x7fa35a0f7e20 "\002", len = 1343631808},
>            port_no = 19008, proto = 467, type = ERROR_URI_T, flags = 0,
>            transport = {s = 0x7fff501631e8 "\220\343\020Z\243\177",
>              len = 1343630264}, ttl = {s = 0x7fa35a093438 "",
>              len = 1343631808}, user_param = {
>              s = 0x7fff50162920 "p)\026P\377\177", len = 1430989483}, maddr = {
>              s = 0x7fff50162a90 "@+\026P\377\177", len = 1343630264}, method = {
>              s = 0x7fa35a093438 "", len = 1343631808}, lr = {s = 0x0, len = 2},
>            r2 = {s = 0x7fff50162970 " *\026P\377\177", len = 4776630}, gr = {
>              s = 0x7fff50162940 " 4\tZ\243\177", len = 1343630264},
>            transport_val = {s = 0x7fa35a093420 "\022", len = 1343631808},
>            ttl_val = {s = 0x5b55e3 "INFO", len = 1510253456}, user_param_val = {
>              s = 0x37 <Address 0x37 out of bounds>, len = 2}, maddr_val = {
>              s = 0x7fff50162a20 "@+\026P\377\177", len = 4934039},
>            method_val = {s = 0x7fa35a10dc10 "sip:jh at test.fi", len = 14},
>            lr_val = {s = 0x7fff50162bb0 "", len = 1510552600}, r2_val = {
>              s = 0x7fff501631c0 "\002", len = 1343631584}, gr_val = {
>              s = 0x2 <Address 0x2 out of bounds>, len = 4289360}}
> ---Type <return> to continue, or q <return> to quit---
>          next_hop = {user = {s = 0x3b0 <Address 0x3b0 out of bounds>,
>              len = 1510109200}, passwd = {
>              s = 0x3e00000000 <Address 0x3e00000000 out of bounds>,
>              len = 1511057584}, host = {s = 0x7fff50162710 "@'\026P\377\177",
>              len = 4932860}, port = {s = 0x7fa35a093418 "\a",
>              len = 1343630032}, params = {s = 0x7fa35a10e8c0 "\002",
>              len = 1343631584}, sip_params = {
>              s = 0x7fff50162740 "@+\026P\377\177", len = 4933076}, headers = {
>              s = 0x50ffffffa8 <Address 0x50ffffffa8 out of bounds>,
>              len = 1343630032}, port_no = 29520, proto = 65,
>            type = ERROR_URI_T, flags = 1343630048, transport = {
>              s = 0x7fff50162b40 "\360/\026P\377\177", len = 4942633}, ttl = {
>              s = 0x2010 <Address 0x2010 out of bounds>, len = 1521108595},
>            user_param = {s = 0x7fff501627f0 "", len = 1343630256}, maddr = {
>              s = 0x7fa35a093418 "\a", len = 111}, method = {
>              s = 0x7fff501631c0 "\002", len = 1343631584}, lr = {
>              s = 0x2010 <Address 0x2010 out of bounds>, len = 1521110112},
>            r2 = {s = 0x0, len = 30623712}, gr = {
>              s = 0x7fff501628d0 "84\tZ\243\177", len = 1524293216},
>            transport_val = {s = 0x0, len = -1}, ttl_val = {s = 0x0,
>              len = 1524293216}, user_param_val = {
>              s = 0x15 <Address 0x15 out of bounds>, len = -1}, maddr_val = {
>              s = 0x0, len = -88}, method_val = {
>              s = 0x7fff50162920 "p)\026P\377\177", len = 1521105580}, lr_val = {
>              s = 0x1d347e0 "H\345\332Z\243\177", len = 1521479133}, r2_val = {
>              s = 0x7fa35a0919f8 "\004", len = 1413366596}, gr_val = {
>              s = 0x1100000021 <Address 0x1100000021 out of bounds>, len = 11}}
>          u = 0x7fa35a093b50
>          port = 0
>          dst_host = 0x417350
>          i = 0
>          flags = 0
>          avp = 0x5a0909f8
>          st = {flags = 947968, id = 0, name = {n = 1510109200, s = {
>                s = 0x65a027010 <Address 0x65a027010 out of bounds>,
>                len = 1510111728}, re = 0x65a027010}, avp = 0x30}
>          sct = 0x7fa3543e157d
>          sjt = 0x7fff50162a90
>          rve = 0x7fff50162b40
> ---Type <return> to continue, or q <return> to quit---
>          mct = 0x7fff501631c0
>          rv = 0x7fa35a027010
>          rv1 = 0x4b9f1f
>          c1 = {cache_type = 1510518088, val_type = 32675, c = {avp_val = {
>                n = 1343631808, s = {s = 0x7fff501631c0 "\002",
>                  len = 1343628960}, re = 0x7fff501631c0}, pval = {rs = {
>                  s = 0x7fff501631c0 "\002", len = 1343628960}, ri = 1430989483,
>                flags = 32675}},
>            i2s = "\000\000\000\000\000\000\000\000\260\003\000\000\000\000\000\000\260\350\020Z\243\177"}
>          s = {s = 0x7fff501631e8 "\220\343\020Z\243\177", len = 1343629704}
>          srevp = {0x7fff50162760, 0x4240a7}
>          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}}}
> #5  0x00000000004240a7 in run_actions (h=0x7fff501630e0, a=0x7fa35a092f50,
>      msg=0x7fff501631c0) at action.c:1573
>          t = 0x7fa35a092f50
>          ret = -1
>          mod = 0x2
>          ms = 0
> #6  0x0000000000422852 in do_action (h=0x7fff501630e0, a=0x7fa35a0aad20,
>      msg=0x7fff501631c0) at action.c:1321
>          ret = 1
>          v = 0
> ---Type <return> to continue, or q <return> to quit---
>          dst = {send_sock = 0xa000004c9, to = {s = {sa_family = 64,
>                sa_data = "\000\000\000\000\000\000\000\336\020Z\243\177\000"},
>              sin = {sin_family = 64, sin_port = 0, sin_addr = {s_addr = 0},
>                sin_zero = "\000\336\020Z\243\177\000"}}, id = 1510109200,
>            proto = -93 '\243', send_flags = {f = 127 '\177',
>              blst_imask = 0 '\000'}}
>          tmp = 0x5a10e3d3 <Address 0x5a10e3d3 out of bounds>
>          new_uri = 0x417350 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\340\235Z"
>          end = 0x2 <Address 0x2 out of bounds>
>          crt = 0xf0 <Address 0xf0 out of bounds>
>          cmd = 0x7fa35a045f08
>          len = 32675
>          user = 1511056272
>          uri = {user = {s = 0x7fa35b5d34d0 "", len = 4256318}, passwd = {
>              s = 0x7fa35aa38800 "", len = 4218240}, host = {
>              s = 0x500000000 <Address 0x500000000 out of bounds>, len = 962},
>            port = {
>              s = 0x28785b98c6306b6b <Address 0x28785b98c6306b6b out of bounds>,
>              len = 1532949792}, params = {
>              s = 0x7fff50162f50 "\240\332\020Z\243\177", len = 1343630944},
>            sip_params = {s = 0x550162f78 <Address 0x550162f78 out of bounds>,
>              len = 1511056370}, headers = {
>              s = 0xa8428197 <Address 0xa8428197 out of bounds>,
>              len = 1511056375}, port_no = 58359, proto = 23056, type = 32675,
>            flags = 5, transport = {s = 0x7fff50162eb0 "\220/\026P\377\177",
>              len = 5677717}, ttl = {
>              s = 0x7fa300000001 <Address 0x7fa300000001 out of bounds>,
>              len = 1532948936}, user_param = {s = 0x5353e5 "\270",
>              len = 1511053984}, maddr = {s = 0x7fa35a10e89a "",
>              len = 1511056344}, method = {
>              s = 0x505000000000000 <Address 0x505000000000000 out of bounds>,
>              len = 1510109200}, lr = {s = 0x7fa35a10daa0 "\001", len = 0},
>            r2 = {s = 0x0, len = 1511056377}, gr = {
>              s = 0xf0 <Address 0xf0 out of bounds>, len = 2}, transport_val = {
>              s = 0x417350 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\340\235Z", len = 1343635632}, ttl_val = {
>              s = 0x7fff50162f90 "\020\060\026P\377\177", len = 5480607},
>            user_param_val = {
> ---Type <return> to continue, or q <return> to quit---
>              s = 0xc72e937782d8db8 <Address 0xc72e937782d8db8 out of bounds>,
>              len = 1997969236}, maddr_val = {
>              s = 0x1ee083d3090f13b1 <Address 0x1ee083d3090f13b1 out of bounds>,
>              len = 102534402}, method_val = {
>              s = 0xbb34518bef8f240a <Address 0xbb34518bef8f240a out of bounds>,
>              len = 1755061752}, lr_val = {
>              s = 0xc463ad169d3b65d5 <Address 0xc463ad169d3b65d5 out of bounds>,
>              len = -2078599864}, r2_val = {s = 0x7fa35aa31690 "\377G",
>              len = 1511054864}, gr_val = {s = 0x7fa35a10e89a "",
>              len = 1511056339}}
>          next_hop = {user = {
>              s = 0x40000000000fa20d <Address 0x40000000000fa20d out of bounds>,
>              len = 8}, passwd = {s = 0x0, len = 0}, host = {
>              s = 0x140067786e65706f <Address 0x140067786e65706f out of bounds>,
>              len = -137654705}, port = {
>              s = 0xf04f2fe79b7d5580 <Address 0xf04f2fe79b7d5580 out of bounds>,
>              len = 403291866}, params = {
>              s = 0x616e5f6c7173796d <Address 0x616e5f6c7173796d out of bounds>,
>              len = 1702259060}, sip_params = {
>              s = 0x64726f7773 <Address 0x64726f7773 out of bounds>, len = 0},
>            headers = {s = 0x7fa35a027f90 "", len = 0}, port_no = 0, proto = 0,
>            type = ERROR_URI_T, flags = 1497694638, transport = {
>              s = 0x7fa35a0f9a40 "\360 \317\001", len = 1498051608}, ttl = {
>              s = 0x10 <Address 0x10 out of bounds>, len = 1497698564},
>            user_param = {s = 0x250162cf0 <Address 0x250162cf0 out of bounds>,
>              len = 4932860}, maddr = {
>              s = 0xa5a07bf50 <Address 0xa5a07bf50 out of bounds>,
>              len = 1497694756}, method = {
>              s = 0x34000000000d1b40 <Address 0x34000000000d1b40 out of bounds>,
>              len = 32}, lr = {s = 0x1ceb180 "latin1", len = 1530753290}, r2 = {
>              s = 0x7fa35a0f9a40 "\360 \317\001", len = 1343630736}, gr = {
>              s = 0x10 <Address 0x10 out of bounds>, len = 1343630736},
>            transport_val = {s = 0x7fa35b5d3a90 "\320\064][\243\177", len = 6},
>            ttl_val = {s = 0xa8428197 <Address 0xa8428197 out of bounds>,
>              len = 1530755091}, user_param_val = {s = 0x0, len = 0},
>            maddr_val = {
>              s = 0xde7efd2900000017 <Address 0xde7efd2900000017 out of bounds>,
>              len = 44108294}, method_val = {
>              s = 0x7fa35aa2a978 "\227\201B\250|`\234|\374Qcq\\zy\360\003\346`\033---Type <return> to continue, or q <return> to quit---
> |\231/\310Km\301\243\353\372\266=/\222\210\353\352", len = 1343631104},
>            lr_val = {s = 0x7fa35aa2bc60 "", len = -756936967}, r2_val = {
>              s = 0x7fa35aa31690 "\377G", len = -1069626236}, gr_val = {s = 0x0,
>              len = 1532836560}}
>          u = 0x50a501640b0
>          port = 0
>          dst_host = 0x7fff501640b0
>          i = 0
>          flags = 32675
>          avp = 0x7fff50163010
>          st = {flags = 1343630408, id = 32767, name = {n = 1343630368, s = {
>                s = 0x7fff50162c20 "\r\242\017", len = 1510971968},
>              re = 0x7fff50162c20}, avp = 0x7fa3594414eb}
>          sct = 0x7fa35a10e3f9
>          sjt = 0x7fa35a10daa0
>          rve = 0x7fa35a0920d0
>          mct = 0x7fa35a0a8dc0
>          rv = 0x7fa35a093418
>          rv1 = 0x7fa35a10e8c0
>          c1 = {cache_type = RV_CACHE_EMPTY, val_type = RV_NONE, c = {avp_val = {
>                n = 0, s = {s = 0x0, len = 0}, re = 0x0}, pval = {rs = {s = 0x0,
>                  len = 0}, ri = 0, flags = 0}},
>            i2s = " ,\026P\377\177\000\000@\232\017Z\243\177\000\000\220\060\026P\377\177"}
>          s = {s = 0x7fa35a10ec0e "PUT", len = 3}
>          srevp = {0x0, 0x7fa35944101d}
>          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,
> ---Type <return> to continue, or q <return> to quit---
>                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}}}
> #7  0x00000000004240a7 in run_actions (h=0x7fff501630e0, a=0x7fa35a0726c0,
>      msg=0x7fff501631c0) at action.c:1573
>          t = 0x7fa35a0aad20
>          ret = 1
>          mod = 0x7fff501631c0
>          ms = 0
> #8  0x00007fa3545e9355 in xhttp_process_request (orig_msg=0x7fa35a10d0d0,
>      new_buf=0x7fa35a10e390 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple"..., new_len=1290) at xhttp_mod.c:271
>          ret = 0
>          tmp_msg = {id = 2, pid = 0, tval = {tv_sec = 0, tv_usec = 0},
>            fwd_send_flags = {f = 0 '\000', blst_imask = 0 '\000'},
>            rpl_send_flags = {f = 3 '\003', blst_imask = 0 '\000'},
>            first_line = {type = 1, len = 67, u = {request = {method = {
>                    s = 0x7fa35a10e390 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple"..., len = 3}, uri = {
>                    s = 0x7fa35a10e394 "/xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.3"..., len = 52}, version = {
>                    s = 0x7fa35a10e3c9 "HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.34.0\r\nConnection: close\r\nIf-None-Match: *\r\nContent-Typ"..., len = 8}, method_value = 16384}, reply = {version = {
>                    s = 0x7fa35a10e390 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple"..., len = 3}, status = {
>                    s = 0x7fa35a10e394 "/xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsi---Type <return> to continue, or q <return> to quit---
> mple 0.3"..., len = 52}, reason = {
>                    s = 0x7fa35a10e3c9 "HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.34.0\r\nConnection: close\r\nIf-None-Match: *\r\nContent-Typ"..., len = 8}, statuscode = 16384}}}, via1 = 0x7fa35a10daa0,
>            via2 = 0x0, headers = 0x7fa35a10de10, last_header = 0x7fa35a10d980,
>            parsed_flag = 18446744073709551615, h_via1 = 0x7fa35a10de10,
>            h_via2 = 0x0, callid = 0x0, to = 0x0, cseq = 0x0, from = 0x0,
>            contact = 0x0, maxforwards = 0x0, route = 0x0, record_route = 0x0,
>            content_type = 0x7fa35a10d980, content_length = 0x7fa35a10ddb0,
>            authorization = 0x0, expires = 0x0, proxy_auth = 0x0,
>            supported = 0x0, require = 0x0, proxy_require = 0x0,
>            unsupported = 0x0, allow = 0x0, event = 0x0, accept = 0x0,
>            accept_language = 0x0, organization = 0x0, priority = 0x0,
>            subject = 0x0, user_agent = 0x7fa35a10df30, server = 0x0,
>            content_disposition = 0x0, diversion = 0x0, rpid = 0x0,
>            refer_to = 0x0, session_expires = 0x0, min_se = 0x0,
>            sipifmatch = 0x0, subscription_state = 0x0, date = 0x0,
>            identity = 0x0, identity_info = 0x0, pai = 0x0, ppi = 0x0,
>            path = 0x0, privacy = 0x0, body = 0x0,
>            eoh = 0x7fa35a10e4b4 "\r\n<?xml version='1.0' encoding='UTF-8'?>\n<rl:resource-lists xmlns:rl=\"urn:ietf:params:xml:ns:resource-lists\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_bloc"...,
>            unparsed = 0x7fa35a10e4b4 "\r\n<?xml version='1.0' encoding='UTF-8'?>\n<rl:resource-lists xmlns:rl=\"urn:ietf:params:xml:ns:resource-lists\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_bloc"..., rcv = {src_ip = {af = 2, len = 4, u = {addrl = {174482112, 0},
>                  addr32 = {174482112, 0, 0, 0}, addr16 = {25280, 2662, 0, 0, 0,
>                    0, 0, 0}, addr = "\300bf\n", '\000' <repeats 11 times>}},
>              dst_ip = {af = 2, len = 4, u = {addrl = {174482112, 0}, addr32 = {
>                    174482112, 0, 0, 0}, addr16 = {25280, 2662, 0, 0, 0, 0, 0,
>                    0}, addr = "\300bf\n", '\000' <repeats 11 times>}},
>              src_port = 45208, dst_port = 8080, proto_reserved1 = 7,
>              proto_reserved2 = 0, src_su = {s = {sa_family = 2,
>                  sa_data = "\260\230\300bf\n\000\000\000\000\000\000\000"},
>                sin = {sin_family = 2, sin_port = 39088, sin_addr = {
>                    s_addr = 174482112},
>                  sin_zero = "\000\000\000\000\000\000\000"}},
> ---Type <return> to continue, or q <return> to quit---
>              bind_address = 0x7fa35a0381a0, proto = 2 '\002'},
>            buf = 0x7fa35a10e390 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple"..., len = 1290, new_uri = {s = 0x0, len = 0}, dst_uri = {s = 0x0,
>              len = 0}, parsed_uri_ok = 0, parsed_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 = 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}}, parsed_orig_ruri_ok = 0, parsed_orig_ruri = {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 = 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}}, add_rm = 0x0, body_lumps = 0x0, reply_lump = 0x0,
>            add_to_branch_s = '\000' <repeats 57 times>, add_to_branch_len = 0,
>            hash_index = 0, msg_flags = 0, flags = 0, set_global_address = {
>              s = 0x0, len = 0}, set_global_port = {s = 0x0, len = 0},
>            force_send_socket = 0x0, path_vec = {s = 0x0, len = 0}, instance = {
>              s = 0x0, len = 0}, reg_id = 0}
>          msg = 0x7fff501631c0
>          ra_ctx = {rec_lev = 2, run_flags = 0, last_retcode = 1, jmp_env = {{
> ---Type <return> to continue, or q <return> to quit---
>                __jmpbuf = {2, 7295752478693650924, 4289360, 140734537023664, 0,
>                  0, 7295752478681068012, -7295522907851591188},
>                __mask_was_saved = 0, __saved_mask = {__val = {140339567368768,
>                    140339558774336, 140339567368624, 0, 140338056396821,
>                    4294967297, 0, 140339567368528, 30368510, 30368529,
>                    140339567368624, 0, 140339554445087, 140339567368768,
>                    140339554013764, 140338056396828}}}}}
> #9  0x00007fa3545e9b8a in xhttp_handler (msg=0x7fa35a10d0d0) at xhttp_mod.c:346
>          ret = 0
>          fake_msg = 0x7fa35a10e390 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nVia: SIP/2.0/TCP 192.98.102.10:45208\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple"...
>          fake_msg_len = 1290
>          pmatch = {rm_so = 1343633568, rm_eo = 32767}
>          c = 32 ' '
> #10 0x0000000000482492 in nonsip_msg_run_hooks (msg=0x7fa35a10d0d0)
>      at nonsip_hooks.c:125
>          r = 0
>          ret = 0
> #11 0x00000000004982c7 in receive_msg (
>      buf=0x7fa351da7e30 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.34.0\r\nConnection: close\r\nIf-None-Ma"..., len=1252, rcv_info=0x7fa351da7b68) at receive.c:158
>          msg = 0x7fa35a10d0d0
>          ctx = {rec_lev = 6214704, run_flags = 0, last_retcode = 1521445561,
>            jmp_env = {{__jmpbuf = {0, 5358010, 140734537021952, 5357895,
>                  140734537022488, 140339429670704, 140339429669712,
>                  34359869182}, __mask_was_saved = 1, __saved_mask = {__val = {
>                    4279160700464, 140338056396803, 256, 4289360,
>                    140734537023664, 140734537021952, 5361551, 140734537022488,
>                    140339429669712, 140339577004116, 4277787426821,
>                    34359869182, 140339429669832, 0, 2, 140734537022080}}}}}
>          ret = 0
>          inb = {
>            s = 0x7fa351da7e30 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.34.0\r\nConnection: close\r\nIf-None----Type <return> to continue, or q <return> to quit---
> Ma"..., len = 1252}
> #12 0x000000000051f294 in receive_tcp_msg (
>      tcpbuf=0x7fa351da7e30 "PUT /xcap-root/resource-lists/users/sip:jh at test.fi/index HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 996\r\nHost: 192.98.102.10:8080\r\nUser-Agent: sipsimple 0.34.0\r\nConnection: close\r\nIf-None-Ma"..., len=1252, rcv_info=0x7fa351da7b68, con=0x7fa351da7b50) at tcp_read.c:1179
>          buf = 0x0
>          bsize = 0
>          blen = 0
> #13 0x0000000000520271 in tcp_read_req (con=0x7fa351da7b50,
>      bytes_read=0x7fff50163c20, read_flags=0x7fff50163c18) at tcp_read.c:1384
>          bytes = 996
>          total_bytes = 996
>          resp = 1
>          size = 68719509411
>          req = 0x7fa351da7bc8
>          dst = {send_sock = 0x850160001, to = {s = {sa_family = 10208,
>                sa_data = "\214\000\000\000\000\000\020<\026P\377\177\000"},
>              sin = {sin_family = 10208, sin_port = 140, sin_addr = {
>                  s_addr = 0}, sin_zero = "\020<\026P\377\177\000"}}, id = 8,
>            proto = 0 '\000', send_flags = {f = 0 '\000', blst_imask = 0 '\000'}}
>          c = 0 '\000'
>          ret = -1
> #14 0x0000000000521aa4 in handle_io (fm=0x7fa35a0fa980, events=1, idx=-1)
>      at tcp_read.c:1614
>          ret = 8
>          n = 256
>          read_flags = 1
>          con = 0x7fa351da7b50
>          s = 8
>          resp = 1
>          t = 2098430786
> #15 0x000000000051b0ae in io_wait_loop_epoll (h=0x8c27e0, t=2, repeat=0)
>      at io_wait.h:1092
>          n = 1
>          r = 0
>          fm = 0x7fa35a0fa980
>          revents = 1
> #16 0x0000000000522341 in tcp_receive_loop (unix_sock=20) at tcp_read.c:1725
> ---Type <return> to continue, or q <return> to quit---
> No locals.
> #17 0x0000000000515e3d in tcp_init_children () at tcp_main.c:4956
>          r = 2
>          i = 3
>          reader_fd_1 = 20
>          pid = 0
>          si_desc = "tcp receiver (generic)\000\000 ^\004Z\243\177\000\000\260@\026P\377\177\000\000\273B\001\067\000\000\000\000PsA\000\000\000\000\000\260@\026P\377\177\000\000\020>\026P\377\177\000\000\225\330N\000\000\000\000\000\000\004\000\000\000\000\000\000\260H\003Z\243\177\000\000\235\314[\000\000\000\000\000`b\004Z\243\177\000\000\v\000\000\000\f\000\000\000\273B\001\067\000\000\000"
>          si = 0x0
> #18 0x00000000004658f9 in main_loop () at main.c:1723
>          i = 3
>          pid = 10494
>          si = 0x0
>          si_desc = "\230\005\aZ\243\177\000\000\b_\004Z\243\177\000\000\240\006\tZ\243\177\000\000\320 \tZ\243\177\000\000\240>\026P\377\177\000\000_US", '\000' <repeats 21 times>"\300, P\003Z\v\004\000\000\273B\001\067\000\000\000\000PsA\000\000\000\000\000\260@\026P\377\177", '\000' <repeats 18 times>"\360, >\026P\377\177\000\000\373\255J\000\000\000\000"
>          nrprocs = 9554880
> #19 0x0000000000468594 in main (argc=18, argv=0x7fff501640b8) at main.c:2566
>          cfg_stream = 0x1c68010
>          c = -1
>          r = 0
>          tmp = 0x7fff50164f84 ""
>          tmp_len = 0
>          port = 18
>          proto = 0
>          options = 0x5bd368 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
>          ret = -1
>          seed = 1702350220
>          rfd = 4
>          debug_save = 0
>          debug_flag = 0
>          dont_fork_cnt = 0
>          n_lst = 0x3
> ---Type <return> to continue, or q <return> to quit---
>          p = 0x416881 "H\203\304\b\303" <Address 0x416886 out of bounds>
> (gdb)
> (gdb)
> (gdb)
> (gdb) frame 1
> #1  0x00007fa3547ff9e2 in check_match_header (body=..., etag=0x7fff50162170)
>      at xcap_server.c:1625
> 1625			if (strncmp(start_pos, etag->s, cur_etag_len)==0)
> (gdb) print start_pos
> $1 = 0x7fa35a10e4f9 "\"urn:ietf:params:xml:ns:resource-lists\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_blockedcontacts\"/><rl:list name=\"oma_allcontacts\"><rl:external anchor=\"ht"...
> (gdb) print end_pos
> $2 = 0x7fa35a10e51f "\"><rl:list name=\"oma_buddylist\"/><rl:list name=\"oma_grantedcontacts\"/><rl:list name=\"oma_blockedcontacts\"/><rl:list name=\"oma_allcontacts\"><rl:external anchor=\"http%3A//192.98.102.10%3A8080/xcap-root/"...
> (gdb) print cur_etag_len
> $3 = 39
> (gdb)

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -




More information about the sr-users mailing list