<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Alexander,<br>
<br>
Thank for your report - it will be better to push this via the
github tracker, the right place for coding issues:<br>
<a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/issues">https://github.com/OpenSIPS/opensips/issues</a><br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 22.02.2024 21:43, Alexander Kogan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:67fa0653-6d23-4db4-abfe-6fa25afce3fd@5gfuture.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi,</p>
<p>The OpenSIPS process gets stack in infinite loop when the
rtpengine module runs out of memory in send_rtpe_command()</p>
<p>Please review the following piece of code in rtpengine.c:</p>
<p><font face="monospace"> RTPE_START_READ();<br>
do {<br>
if (snode && snode->s) {<br>
if ((node = get_rtpe_node(snode, set)) == NULL
&& op == OP_OFFER)<br>
node = select_rtpe_node(ng_flags.call_id, 1,
set);<br>
snode = NULL;<br>
} else {<br>
node = select_rtpe_node(ng_flags.call_id, 1, set);<br>
}<br>
if (!node) {<br>
LM_ERR("no available proxies\n");<br>
RTPE_STOP_READ();<br>
goto error;<br>
}<br>
<br>
cp = send_rtpe_command(node, ng_flags.dict, &ret);<br>
} <b>while (cp == NULL);</b><br>
RTPE_STOP_READ();<br>
LM_DBG("proxy reply: %.*s\n", ret, cp);</font><br>
</p>
<p>When send_rtpe_command() returns NULL due to memory absence
here:</p>
<p><font face="monospace"> v = bencode_iovec(dict, &vcnt,
1, 0);<br>
if (!v) {<br>
LM_ERR("error converting bencode to iovec\n");<br>
return NULL;<br>
}</font><br>
</p>
<p>the mentioned loop ( <b>do {....} while(cp == NULL)</b> )
won't stop indefinitely causing the opensips process to become
stuck.</p>
<pre class="moz-signature" cols="72">Best regards,
Alexander Kogan,
Director of R&D
5g Future
<a class="moz-txt-link-freetext" href="http://5gfuture.com"
moz-do-not-send="true">http://5gfuture.com</a></pre>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>