[OpenSIPS-Users] Potential memory leak in siptrace module

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Feb 1 11:53:44 EST 2018


Hi Steve,

Thank you for your report. Could you provide the exact revision of your 
OpenSIPS (opensips -V) ?

Also what requests are you calling the sip_trace() for (INVITES ? 
PUBLISH? all?) and what are the input paramters ?

Thanks,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 01/31/2018 07:48 PM, Steve Brisson wrote:
>
> I've found that when I call the sip_trace method, in the main request 
> routing block, the shmem used_size and fragments continually increases 
> until the process crashes from an out of memory condition.
>
> By enabling memory alloc debugging, I confirmed that the leaked 
> allocation is the shm_malloc of a trace_info_t structure in the 
> sip_trace_w method [siptrace.c:1539]. This piece of memory is supposed 
> to be freed in the dialog terminated callback but because of the logic 
> in the sip_trace_w method, trace_flags gets modified to 
> TRACE_TRANSACTION and the dialog callbacks are never registered.
>
> I haven't worked out the details of a proper fix yet. My workaround 
> has been to remove the siptrace module from my config.
>
> OpenSIPS config details:
>
> opensips 2.3.2 (x86_64/linux)
>
> #siptrace module config
>
> modparam("siptrace", "trace_on", 0)
>
> modparam("siptrace", "trace_id", 
> "[tid]uri=mysql://db-user:db-pass@db-host/db-name;table=sip_trace;")
>
> #siptrace method call in main request branch
>
> sip_trace("tid", "d", "sip");
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180201/d17451f2/attachment.html>


More information about the Users mailing list