<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:blue">Hi Liviu/team, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">When I try to do an asynchronous REST_PUT call in OpenSIPS 2.2.2, I see the below observance and issues.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">All the calls are made from sipp client.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td width="41" valign="top" style="width:31.1pt;border:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><b><span style="color:blue">No<o:p></o:p></span></b></p>
</td>
<td width="186" valign="top" style="width:139.5pt;border:solid windowtext 1.0pt;border-left:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><b><span style="color:blue">Test Scenario <o:p></o:p></span></b></p>
</td>
<td width="396" valign="top" style="width:296.9pt;border:solid windowtext 1.0pt;border-left:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><b><span style="color:blue">Result/observation<o:p></o:p></span></b></p>
</td>
</tr>
<tr>
<td width="41" valign="top" style="width:31.1pt;border:solid windowtext 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">1.<o:p></o:p></span></p>
</td>
<td width="186" valign="top" style="width:139.5pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">Call-Id length < 50<o:p></o:p></span></p>
</td>
<td width="396" valign="top" style="width:296.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">Works perfectly fine<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="41" valign="top" style="width:31.1pt;border:solid windowtext 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">2<o:p></o:p></span></p>
</td>
<td width="186" valign="top" style="width:139.5pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">Call-Id length >54 and < 56<o:p></o:p></span></p>
</td>
<td width="396" valign="top" style="width:296.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">No crash observed. But error in curl_multiperform<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="41" valign="top" style="width:31.1pt;border:solid windowtext 1.0pt;border-top:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">3. <o:p></o:p></span></p>
</td>
<td width="186" valign="top" style="width:139.5pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">Call-Id length > 56 <o:p></o:p></span></p>
</td>
<td width="396" valign="top" style="width:296.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="color:blue">Opensips crashes at liburl. <o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Please find the details for test 2 and test 3.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">I have tested with REST_POST with case 3, I didn’t observe any crashes.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Please let me know what could cause this issue and how can I fix this?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="color:blue">Test2:<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:blue"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span style="color:#C00000">Jan 17 18:23:13 /usr/local/sbin/opensips[18554]: ERROR:rest_client:start_async_http_req: curl_multi_perform: Invalid multi handle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">Jan 17 18:23:13 /usr/local/sbin/opensips[18554]: ERROR:rest_client:start_async_http_req: curl_multi_remove_handle: Invalid multi handle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="color:blue">Test 3:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">(gdb) bt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#0 0x00007f370bccb9bb in curl_multi_add_handle () from /lib64/libcurl.so.4<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#1 0x00007f370bf05521 in start_async_http_req (msg=msg@entry=0x7f374db14270, method=method@entry=REST_CLIENT_PUT,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> url=0x7f374dad8178 "http://url", req_body=<optimized out>,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> req_ctype=<optimized out>, out_handle=out_handle@entry=0x7f374db204e0, body=body@entry=0x7f374db204e8, ctype=0x7f374db204f8)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> at rest_methods.c:227<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#2 0x00007f370bf0e2ca in w_async_rest_put (msg=0x7f374db14270, resume_f=0x7ffc6f551680, resume_param=0x7ffc6f551690,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> gp_url=<optimized out>, gp_body=<optimized out>, gp_ctype=<optimized out>, body_pv=0x7f374daf5510 "N",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> ctype_pv=0x7f374daf55a8 "N", code_pv=0x7f374daf5670 "N") at rest_client.c:579<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#3 0x00007f370d24920f in t_handle_async (msg=0x7f374db14270, a=0x7f374dad8508, resume_route=<optimized out>) at async.c:240<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#4 0x000000000042d724 in do_action (a=a@entry=0x7f374dad8680, msg=msg@entry=0x7f374db14270) at action.c:1863<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#5 0x00000000004341cc in run_action_list (a=<optimized out>, msg=0x7f374db14270) at action.c:172<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#6 0x0000000000430769 in do_action (a=a@entry=0x7f374dad8760, msg=msg@entry=0x7f374db14270) at action.c:1108<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#7 0x000000000043454d in run_action_list (msg=<optimized out>, a=<optimized out>) at action.c:172<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#8 run_actions (a=<optimized out>, msg=0x7f374db14270) at action.c:137<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#9 0x000000000042f8d7 in do_action (a=a@entry=0x7f374dad6b58, msg=msg@entry=0x7f374db14270) at action.c:745<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#10 0x0000000000434393 in run_action_list (msg=<optimized out>, a=<optimized out>) at action.c:172<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#11 run_actions (msg=0x7f374db14270, a=<optimized out>) at action.c:137<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#12 run_top_route (a=<optimized out>, msg=msg@entry=0x7f374db14270) at action.c:204<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#13 0x000000000043bcba in receive_msg (<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> buf=0x858c20 <buf.8277> "INVITE sip:+19084904567@10.10.10.05060 SIP/2.0\r\nTo: <sip:+19084904567@test.comcast.net;user=phone>\r\nFrom: \"test PA\"<sip:+16507083454@10.0.0.1:32004;user=phone;isup-oli=00>;"...,
len=<optimized out>,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> rcv_info=rcv_info@entry=0x7ffc6f552c70, existing_context=existing_context@entry=0x0) at receive.c:208<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#14 0x00000000005b0b03 in udp_read_req (si=<optimized out>, bytes_read=<optimized out>) at net/proto_udp/proto_udp.c:192<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#15 0x000000000059b960 in handle_io (idx=<optimized out>, event_type=<optimized out>, fm=<optimized out>) at net/net_udp.c:259<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#16 io_wait_loop_epoll (h=<optimized out>, t=<optimized out>, repeat=<optimized out>) at net/../io_wait_loop.h:225<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#17 udp_rcv_loop (si=si@entry=0x7f374dacb6c8) at net/net_udp.c:308<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#18 0x000000000059ce88 in udp_start_processes (chd_rank=chd_rank@entry=0x845830 <chd_rank.11028>, startup_done=startup_done@entry=0x0)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000"> at net/net_udp.c:372<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#19 0x0000000000419f50 in main_loop () at main.c:671<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#C00000">#20 main (argc=<optimized out>, argv=<optimized out>) at main.c:1261<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:blue">Regards,<br>
Agalya<o:p></o:p></span></p>
</div>
</body>
</html>