<p>Dear all,<br>
many times, when i call dialog_list on dialog module  with jsonrpc, kamailio crash.</p>
<p>The version i use is: 4.4.2</p>
<p>Thanks for any suggestion.</p>
<p>##################################################<br>
gdb list:<br>
(gdb) list<br>
1661            lock_get( &profile->lock );<br>
1662            for ( i=0 ; i< profile->size ; i++ ) {<br>
1663                    ph = profile->entries[i].first;<br>
1664                    if(ph) {<br>
1665                            do {<br>
1666                                    if ((!value || (STR_EQ(<em>value, ph->value))) && ph->dlg) {<br>
1667                                            /</em> print dialog <em>/<br>
1668                                            internal_rpc_print_dlg(rpc, c, ph->dlg, 0);<br>
1669                                    }<br>
1670                                    /</em> next */<br>
##################################################<br>
gdb info locals:<br>
(gdb) info locals<br>
profile = 0x7f2a5098fb40<br>
ph = 0x0<br>
i = 10<br>
##################################################</p>
<p>#0  0x00007f2a706eb00a in internal_rpc_profile_print_dlgs (rpc=0x7f2a4fdf99a0, c=0x7f2a4fdf9940, profile_name=0x7fffb9fa8b10, value=0x0)<br>
at dialog.c:1666<br>
1666                                    if ((!value || (STR_EQ(*value, ph->value))) && ph->dlg) {<br>
##################################################</p>
<p>The dump , with bt full is this :<br>
#0  0x00007f2a706eb00a in internal_rpc_profile_print_dlgs (rpc=0x7f2a4fdf99a0, c=0x7f2a4fdf9940, profile_name=0x7fffb9fa8b10, value=0x0)<br>
at dialog.c:1666<br>
profile = 0x7f2a5098fb40<br>
ph = 0x0<br>
i = 10<br>
<a href="https://github.com/kamailio/kamailio/issues/1" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/1" data-id="31891578" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#1</a>  0x00007f2a706eb6e4 in rpc_profile_print_dlgs (rpc=0x7f2a4fdf99a0, c=0x7f2a4fdf9940) at dialog.c:1772<br>
profile_name = {s = 0x1c78b00 "outbound", len = 8}<br>
value = {s = 0x0, len = 0}<br>
<a href="https://github.com/kamailio/kamailio/pull/2" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/2" data-id="41491271" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#2</a>  0x00007f2a4fbe45c6 in jsonrpc_dispatch (msg=0x7fffb9fa9f10, s1=0x0, s2=0x0) at jsonrpc-s_mod.c:1091<br>
rpce = 0x7f2a75609360<br>
ctx = 0x7f2a4fdf9940<br>
ret = 0<br>
nj = 0x1c76af0<br>
val = {s = 0x1c77b20 "dlg.profile_list", len = 16}<br>
<strong>FUNCTION</strong> = "jsonrpc_dispatch"<br>
<a href="https://github.com/kamailio/kamailio/pull/3" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/3" data-id="48744343" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#3</a>  0x000000000041f4ad in do_action (h=0x7fffb9fa9e30, a=0x7f2a75584700, msg=0x7fffb9fa9f10) at action.c:1054<br>
ret = -5<br>
v = 4288256<br>
dst = {send_sock = 0x1b9fa9b23, to = {s = {sa_family = 14080, sa_data = "Xu*\177\000\000\b7Xu*\177\000"}, sin = {<br>
sin_family = 14080, sin_port = 30040, sin_addr = {s_addr = 32554}, sin_zero = "\b7Xu*\177\000"}, sin6 = {<br>
sin6_family = 14080, sin6_port = 30040, sin6_flowinfo = 32554, sin6_addr = {__in6_u = {<br>
__u6_addr8 = "\b7Xu*\177\000\000S \205\000\060\000\000", __u6_addr16 = {14088, 30040, 32554, 0, 8275, 133, 48, 0},<br>
__u6_addr32 = {1968715528, 32554, 8724563, 48}}}, sin6_scope_id = 26}}, id = 0, proto = 16 '\020', send_flags = {<br>
f = 155 '\233', blst_imask = 250 '\372'}}<br>
tmp = 0x7fffb9fab700 "\t"<br>
new_uri = 0x0<br>
end = 0x0<br>
crt = 0x7fffb9fa92d0 ""<br>
cmd = 0x7f2a754adcc0<br>
len = 0<br>
user = 0<br>
uri = {user = {s = 0x12c <Address 0x12c out of bounds>, len = 0}, passwd = {s = 0x7fffb9fa92d0 "", len = 1969341184}, host = {<br>
s = 0x7f2a75475010 "\001", len = 4742114}, port = {s = 0x0, len = 0}, params = {<br>
s = 0x98206f7473 <Address 0x98206f7473 out of bounds>, len = 1969341256}, sip_params = {<br>
s = 0x7fffb9fa91e0 "`\222\372\271\377\177", len = 6538286}, headers = {s = 0x1c2b6f0 "\300\300\302\001", len = 0},<br>
port_no = 50838, proto = 30049, type = 32554, flags = 0, transport = {s = 0x0, len = -940795965}, ttl = {s = 0x0, len = 0},<br>
user_param = {s = 0x6222286e00000000 <Address 0x6222286e00000000 out of bounds>, len = 577270895}, maddr = {<br>
s = 0x3a746e65696c6309 <Address 0x3a746e65696c6309 out of bounds>, len = 0}, method = {s = 0x75c5f0 "core",<br>
len = -1174760864}, lr = {s = 0x764661 "rval_destroy", len = 7718524}, r2 = {s = 0x7f2a7561c348 "\002", len = 1967607824},<br>
gr = {s = 0x7fffb9fa91b8 "H\303au*\177", len = 1967607824}, transport_val = {s = 0x7f2a7561c300 "\300\004", len = 1969341256},<br>
ttl_val = {s = 0x7f2a7557e200 "\020", len = -1174760316}, user_param_val = {s = 0x7f2a75583700 "\002", len = 1969341256},<br>
maddr_val = {s = 0x416f00 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\060\336q", len = -1174751488}, method_val = {<br>
---Type  to continue, or q  to quit---<br>
s = 0x0, len = 0}, lr_val = {s = 0x7fffb9fa9260 "Ð’\372\271\377\177", len = 5581478}, r2_val = {s = 0x0, len = 0}, gr_val = {<br>
s = 0x3a28d <Address 0x3a28d out of bounds>, len = 1969177728}}<br>
next_hop = {user = {s = 0x1c2b6f0 "\300\300\302\001", len = 1969330344}, passwd = {<br>
s = 0x69692c22 <Address 0x69692c22 out of bounds>, len = 29537760}, host = {<br>
s = 0x400000000 <Address 0x400000000 out of bounds>, len = -1174761304}, port = {<br>
s = 0x71657228 <Address 0x71657228 out of bounds>, len = 1969342102}, params = {s = 0x0, len = 1}, sip_params = {s = 0x0,<br>
len = -1174761328}, headers = {s = 0x1 <Address 0x1 out of bounds>, len = 2}, port_no = 40672, proto = 47610, type = 32767,<br>
flags = 3120206016, transport = {s = 0x7a6563697220616c <Address 0x7a6563697220616c out of bounds>, len = 1701736297}, ttl = {<br>
s = 0x7f2a75580848 "\001", len = -1174760828}, user_param = {s = 0x7fffb9fa9f10 "\b\005", len = -1174757840}, maddr = {<br>
s = 0x65722e2e223a7069 <Address 0x65722e2e223a7069 out of bounds>, len = 1702129517}, method = {s = 0x7f2a7561c696 "/sip",<br>
len = 29855024}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x500000004 <Address 0x500000004 out of bounds>,<br>
len = 4}, transport_val = {s = 0x400000004 <Address 0x400000004 out of bounds>, len = 6552774}, ttl_val = {<br>
s = 0x7fffb9fa9060 "", len = 1967607824}, user_param_val = {s = 0x1000001 <Address 0x1000001 out of bounds>,<br>
len = 1967607824}, maddr_val = {s = 0x7fffb9fa90b0 "\020PGu*\177", len = 1956545302}, method_val = {s = 0x0, len = 0},<br>
lr_val = {s = 0x1000000 <Address 0x1000000 out of bounds>, len = 14985000}, r2_val = {<br>
s = 0x165e80 <Address 0x165e80 out of bounds>, len = 1792216}, gr_val = {s = 0x1ed710 <Address 0x1ed710 out of bounds>,<br>
len = 8}}<br>
u = 0x7f2a75583f30<br>
port = 0<br>
dst_host = 0x7f2a75583700<br>
i = 32767<br>
flags = 0<br>
avp = 0x7fffb9fa9e30<br>
st = {flags = 151652617, id = 29193, name = {n = 0, s = {s = 0x6e65090a00000000 <Address 0x6e65090a00000000 out of bounds>,<br>
len = -1174761256}, re = 0x6e65090a00000000}, avp = 0x7fffb9fa9000}<br>
sct = 0x7fffb9fa94d0<br>
sjt = 0x7fffb9fa9f10<br>
rve = 0x416f00<br>
mct = 0x7fffb9fab700<br>
rv = 0x92922726f727265<br>
rv1 = 0x0<br>
c1 = {cache_type = 3120205776, val_type = 32767, c = {avp_val = {n = -940803561, s = {<br>
s = 0x31c7ec7a17 "\213D$8H\201\304\070\002", len = -1174757616}, re = 0x31c7ec7a17}, pval = {rs = {<br>
s = 0x31c7ec7a17 "\213D$8H\201\304\070\002", len = -1174757616}, ri = -1174757840, flags = 32767}},<br>
i2s = "vp(s:inserver_erPor)","}<br>
s = {s = 0x1c2b6f0 "\300\300\302\001", len = 0}<br>
srevp = {0x0, 0x0}<br>
mod_f_params = {{type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
---Type  to continue, or q  to quit---<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}}<br>
<strong>FUNCTION</strong> = "do_action"<br>
<a href="https://github.com/kamailio/kamailio/pull/4" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/4" data-id="49856885" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#4</a>  0x000000000042c218 in run_actions (h=0x7fffb9fa9e30, a=0x7f2a75584700, msg=0x7fffb9fa9f10) at action.c:1549<br>
t = 0x7f2a75584700<br>
ret = -1<br>
mod = 0x0<br>
ms = 0<br>
<strong>FUNCTION</strong> = "run_actions"<br>
<a href="https://github.com/kamailio/kamailio/issues/5" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/5" data-id="51480460" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#5</a>  0x000000000041f416 in do_action (h=0x7fffb9fa9e30, a=0x7f2a75585b10, msg=0x7fffb9fa9f10) at action.c:1045<br>
ret = 1<br>
v = 1<br>
dst = {send_sock = 0x7fffb9fa9b50, to = {s = {sa_family = 64710, sa_data = "c\000\000\000\000\000\060\233\372\271\377\177\000"},<br>
sin = {sin_family = 64710, sin_port = 99, sin_addr = {s_addr = 0}, sin_zero = "0\233\372\271\377\177\000"}, sin6 = {<br>
sin6_family = 64710, sin6_port = 99, sin6_flowinfo = 0, sin6_addr = {__in6_u = {<br>
__u6_addr8 = "0\233\372\271\377\177\000\000Ù¨bu*\177\000", __u6_addr16 = {39728, 47610, 32767, 0, 43225, 30050, 32554,<br>
0}, __u6_addr32 = {3120208688, 32767, 1969400025, 32554}}}, sin6_scope_id = 366}}, id = 10, proto = -24 '\350',<br>
send_flags = {f = 234 '\352', blst_imask = 98 'b'}}<br>
tmp = 0x1467562aa20 <Address 0x1467562aa20 out of bounds><br>
new_uri = 0x7a0a02 "parse_headers"<br>
end = 0x79db5c "core: parser/msg_parser.c"<br>
crt = 0x40 <Address 0x40 out of bounds><br>
cmd = 0x7f2a75475010<br>
len = 1967607824<br>
user = 32554<br>
uri = {user = {s = 0x0, len = 0}, passwd = {s = 0x7fffb9fa9b70 "@\234\372\271\004", len = 6529985}, host = {<br>
s = 0x416f00 "1\355I\211\321^H\211\342H\203\344\360PTI\307\300\060\336q", len = -1174751488}, port = {s = 0x0, len = 0},<br>
params = {s = 0x7fffb9fa9ba0 "p\234\372\271\377\177", len = 6661320}, sip_params = {s = 0x7fffb9fa99f0 "", len = 1967607824},<br>
headers = {s = 0x0, len = 1967607824}, port_no = 39488, proto = 47610, type = 32767, flags = 6552774, transport = {<br>
s = 0x7fffb9fa9a20 "", len = 1967607824}, ttl = {s = 0x1000000 <Address 0x1000000 out of bounds>, len = 1967607824},<br>
user_param = {s = 0x7fffb9fa9a70 "\240\232\372\271\377\177", len = 1956545302}, maddr = {<br>
s = 0x1ed710 <Address 0x1ed710 out of bounds>, len = 0}, method = {s = 0x1000000 <Address 0x1000000 out of bounds>,<br>
len = 14986448}, lr = {s = 0x1658d8 <Address 0x1658d8 out of bounds>, len = 1790768}, r2 = {<br>
s = 0x1ed710 <Address 0x1ed710 out of bounds>, len = 8}, gr = {s = 0x12e <Address 0x12e out of bounds>, len = 1967607824},<br>
transport_val = {s = 0x14600000000 <Address 0x14600000000 out of bounds>, len = 1969417808}, ttl_val = {<br>
s = 0x7fffb9fa9aa0 "\240\233\372\271\377\177", len = 4742114}, user_param_val = {s = 0x0, len = 1967607824}, maddr_val = {<br>
s = 0x0, len = 0}, method_val = {s = 0x7fffb9fa9ba0 "p\234\372\271\377\177", len = 6534031}, lr_val = {s = 0x79d630 "core",<br>
len = 6552774}, r2_val = {s = 0x7fffb9fa9b00 "n\001", len = 1969417880}, gr_val = {s = 0x7f2a7562aa20 "", len = 1969399988}}<br>
next_hop = {user = {s = 0x7fffb9fa9820 "", len = 1967607824}, passwd = {s = 0x1000000 <Address 0x1000000 out of bounds>,<br>
len = 1967607824}, host = {s = 0x7fffb9fa9870 "\240\230", <incomplete sequence \372\271>, len = 1956545302}, port = {<br>
---Type  to continue, or q  to quit---<br>
s = 0x1c588e1 "\311\305\001", len = 0}, params = {s = 0x1000000 <Address 0x1000000 out of bounds>, len = 14986216},<br>
sip_params = {s = 0x1659c0 <Address 0x1659c0 out of bounds>, len = 1969416936}, headers = {s = 0x7f2a7562aa20 "",<br>
len = 1969399993}, port_no = 301, proto = 0, type = ERROR_URI_T, flags = 0, transport = {<br>
s = 0x7f2a7562a8d9 "Content-Type: application/json-rpc\r\nCache-Control: no-cache\r\nPragma: no-cache\r\nUser-Agent: Java/1.8.0_121\r\nHost: \r\nAccept: text/html, image/gif, image/jpeg, <em>; q=.2, <em>/</em>; q=.2\r\nConn"..., len = 0}, ttl = {<br>
s = 0xb9fa98a0 <Address 0xb9fa98a0 out of bounds>, len = 1969416936}, user_param = {s = 0x0, len = 1967607824}, maddr = {<br>
s = 0x0, len = 0}, method = {s = 0x7fffb9fa99a0 "\240\233\372\271\377\177", len = 6534031}, lr = {s = 0x79d630 "core",<br>
len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x7fffb9fa9e7c "\260\f\222\017", len = -1174757736}, transport_val = {<br>
s = 0x79d630 "core", len = -1174757704}, ttl_val = {s = 0x7a0a10 "get_hdr_field", len = 7986012}, user_param_val = {<br>
s = 0xe8 <Address 0xe8 out of bounds>, len = 1967607824}, maddr_val = {s = 0x79d630 "core", len = 1969416864}, method_val = {<br>
s = 0x7a0a10 "get_hdr_field", len = 7986012}, lr_val = {s = 0xe8 <Address 0xe8 out of bounds>, len = 1967607824}, r2_val = {<br>
s = 0x7f2a75475010 "\001", len = 1969416864}, gr_val = {s = 0x7f2a7562eaa0  <incomplete sequence \350>, len = 1969399988}}<br>
u = 0x7f2a7562ee50<br>
port = 0<br>
dst_host = 0x80067e961<br>
i = 0<br>
flags = 0<br>
avp = 0x7f2a75475010<br>
st = {flags = 3120207856, id = 32767, name = {n = 1967607824, s = {s = 0x7f2a75475010 "\001", len = 1969239958},<br>
re = 0x7f2a75475010}, avp = 0x7f2a75475010}<br>
sct = 0x4b9fa9c40<br>
sjt = 0x79d630<br>
rve = 0x7f2a75582f20<br>
mct = 0x7fffb9fab700<br>
rv = 0x63fcc6<br>
rv1 = 0x0<br>
c1 = {cache_type = 43, val_type = RV_NONE, c = {avp_val = {n = 0, s = {s = 0x0, len = 7718384}, re = 0x0}, pval = {rs = {s = 0x0,<br>
len = 7718384}, ri = 26, flags = 0}}, i2s = "\t\000\000\000\000\000\000\000huTu</em>\177\000\000\000\000\000\000\000"}<br>
s = {s = 0x7fffb9fa99f0 "", len = 1969239512}<br>
srevp = {0x3000000018, 0x7fffb9fa9ab0}<br>
mod_f_params = {{type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}, {type = NOSUBTYPE, u = {number = 0, string = 0x0, str = {s = 0x0, len = 0}, data = 0x0, attr = 0x0,<br>
select = 0x0}}}<br>
<strong>FUNCTION</strong> = "do_action"</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1032">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZRs5Mmc27pLH-1HE4PyvoMKLSQH5ks5rlQeFgaJpZM4Ma_yQ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZR8r-mpzWJRZQUvirKRqEGAxD6jNks5rlQeFgaJpZM4Ma_yQ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1032"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"kamailio segmentation fault - dialog RPC (#1032)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1032"}}}</script>