[OpenSIPS-Users] Possible dispatcher module memory leak
Fox, Chad
CDFox at west.com
Wed Dec 17 23:06:15 CET 2008
We have experienced an issue where a device in our dispatcher list
becomes unavailable and the dispatcher has to begin probing that
resource.
We noticed that the memory grows at a constant rate after this happens
and until the device is brought back online.
Inspecting the memory allocated by shm_malloc we see that the leaked
memory is made up of dlg_t objects and strings allocated via
shm_str_dup.
Looking at the ds_check_timer() function we see where the dlg_t objects
and strings are allocated by a call to new_dlg_uac from
t_request_outside().
Is it the dispatcher module's job to shm_free the dialog memory, or does
tm free it on it's own?
<modules/dispatcher/dispatch.c> (openser 1.3.2)
void ds_check_timer(unsigned int ticks, void* param)
{
...
dlg_t * dialog;
...
/* Iterate over the groups and the entries of each group: */
for(list = _ds_list; list!= NULL; list= list->next)
{
for(j=0; j<list->nr; j++)
{
/* If the Flag of the entry has
"Probing set, send a probe: */
if
((list->dlist[j].flags&DS_PROBING_DST) > 0)
{
...
/* Execute the Dialog
using the "req_outside"-Method of the
* TM-Module.
* req_outside(str* m,
str* t, str* f, str* h, str* b,
*
dlg_t** d, transaction_cb c, void* cp); */
if
(tmb.t_request_outside(&ds_ping_method,
&list->dlist[j].uri,
&ds_ping_from,
NULL,
NULL,
&dialog,
ds_options_callback,
(void*)(long)list->id) < 0) {
LM_ERR("unable to execute dialog\n");
}
}
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081217/0dd79f4e/attachment-0001.htm
More information about the Users
mailing list