[sr-dev] possible memory leak in registrar module (xavp_rcd_helper)

Luis Azedo luis at 2600hz.com
Tue May 2 10:24:03 CEST 2017


Hi,


i'm investigating a possible memory leak in registrar module, namely in xavp_rcd_helper function.

noticed an increase in shared memory allocated by core, removing the modparam("registrar", "xavp_rcd", "ulrcd") seems to fix this.

[root at dev-01 kamailio]# kamcmd mod.stats core shm
Module: core
{
xavp_new_value(94): 35704
    .....
}

[root at dev-01 kamailio]# kamcmd mod.stats core shm
Module: core
{
xavp_new_value(94): 164064
     ....
}

only one client registering every 60 sec.


not sure if it keeps accumulating values in the xavp or if its leaking.


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.


what am i missing here ?


Thanks



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170502/2f11e59f/attachment.html>


More information about the sr-dev mailing list