We are using the t_uac_dlg function through a UDP MI Datagram to create local SIP/TCP requests. We are seeing a memory leak of increasing shared Memory usage, which is increasing at the same rate as tcp connections are created (tested under 4.0.1 and 4.3.1).
/usr/sbin/kamailio[25407]: NOTICE: fm_status: count= 71943 size= 14126536 bytes from mi_datagram: datagram_fnc.c: build_async_handler(387)
After looking at the memory dump and investigating the source, I guess that the memory leak is created, when the
MI_ASYNC_RPL_FLAG
is set. This seems to be set by:
modules/tmx/tmx_mod.c: {MI_TM_UAC, mi_tm_uac_dlg, MI_ASYNC_RPL_FLAG, 0, 0 },
only, which we are using heavily.
Can someone please give me a hint, where to search for the memory leak. My guess is that:
modules/mi_datagram/datagram_fnc.c:489
if (f->flags&MI_ASYNC_RPL_FLAG) {
hdl = build_async_handler(mi_socket_domain,
(struct sockaddr* )&reply_addr, reply_addr_len);
the handler is not correctly freed up in the async reply case.
Thank you!
Greetings
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/298
auth_ephemeral do_auth() function has this code:
ret = eph_auth_api.check_response(&cred->digest, _method, ha1);
if (ret == AUTHENTICATED)
{
if (eph_auth_api.post_auth(_m, _h) != AUTHENTICATED)
{
return AUTH_ERROR;
}
}
else if (ret == NOT_AUTHENTICATED)
{
return AUTH_INVALID_PASSWORD;
}
else
{
ret = AUTH_ERROR;
}
return AUTH_OK;
i was wondering if there is a typo in 'ret = AUTH_ERROR'; statement.
should it be 'return AUTH_ERROR;' instead?
-- juha