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.