<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>i'm investigating a possible memory leak in registrar module, namely in <span>xavp_rcd_helper function.</span></p>
<p><span>noticed an increase in shared memory allocated by core, removing the <span style="font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><b>modparam("registrar",
 "xavp_rcd", "ulrcd") </b></span></span><span style="font-size: 12pt;">seems to fix this.</span></p>
<p><span></p>
<div><br>
</div>
<div>[root@dev-01 kamailio]# kamcmd mod.stats core shm</div>
<div>Module: core</div>
<div>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>xavp_new_value(94): 35704</div>
<div>    .....</div>
<div>}</div>
<div><br>
</div>
<div>
<div>[root@dev-01 kamailio]# kamcmd mod.stats core shm</div>
<div>Module: core</div>
<div>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>xavp_new_value(94): 164064</div>
<div>     ....</div>
}</div>
<div><br>
</div>
<div>only one client registering every 60 sec.</div>
<div><br>
</div>
</span>
<p></p>
<p><span>not sure if it keeps accumulating values in the xavp or if its leaking.</span></p>
<p><span><br>
</span></p>
<p><span>however, a doubt came across. the lookup function is supposed to fill the xavp if configured, but the value seems to be related to the current process and afaik xavp are allocated in shared memory making it available to all processes. now, if two requests
 arrive at the same time and both do a lookup on the registrar, the xavp will potentially have the wrong value for one of the requests.</span></p>
<p><span><br>
</span></p>
<p><span>what am i missing here ?</span></p>
<p><span><br>
</span></p>
<p><span>Thanks</span></p>
<p><span><br>
</span></p>
<p><span><br>
</span></p>
<p><br>
</p>
</div>
</body>
</html>