[OpenSIPS-Devel] Help finding memory leak - 3.4.16
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Jan 29 09:08:55 UTC 2026
Glad you found the issue !
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 29.01.2026 04:14, Daniel Zanutti wrote:
> Hi Bogdan
>
> You were right, found out the problem was a customization we did in a
> module.
> Didn't know that get_dlg_by_ids function adds a ref internally so the
> dialog is never released. The problem is that this customization is
> not called on every call, so leak didn't happen very often. Now we are
> calling dlg_unref properly.
>
> image.png
>
> Thanks for helping out!
>
>
> On Tue, Jan 27, 2026 at 6:49 AM Bogdan-Andrei Iancu
> <bogdan at opensips.org> wrote:
>
> Hi Daniel,
>
> The dump shows you have ~29K dialogs in memory....maybe your
> billing module is messing up with the dialogs?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> https://www.siphub.com
>
> On 27.01.2026 04:50, Daniel Zanutti wrote:
>> Hi Bogdan
>>
>> Took some time but I got the log. Could you please take a look?
>>
>> https://pastebin.com/mBGmpjfY
>>
>> Thanks
>>
>> On Fri, Jan 23, 2026 at 9:31 AM Bogdan-Andrei Iancu
>> <bogdan at opensips.org> wrote:
>>
>> Hi Daniel.
>>
>> See
>> https://opensips.org/Documentation/TroubleShooting-OutOfMem
>> on how to do proper mem dumping. List again the output please.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>> https://www.opensips-solutions.com
>> https://www.siphub.com
>>
>> On 23.01.2026 03:10, Daniel Zanutti wrote:
>>>
>>> Hi,
>>>
>>> I'm facing a shared memory leak on OpenSIPS 3.4.16. SHM is
>>> set to 2 GB, and its usage keeps increasing over time until
>>> the process crashes. This usually happens after 1–2 days of
>>> uptime.
>>>
>>> I do have a custom billing module, originally developed for
>>> OpenSIPS 1.11.x and later ported to 3.4.x. While the module
>>> is a suspect, I'm also trying to rule out other possible
>>> causes in the core or standard modules.
>>>
>>> I generated the following |mem_shm_dump| after 24 hours of
>>> traffic, at a moment with no active calls:
>>> https://pastebin.com/QUmVJ1BH<https://pastebin.com/QUmVJ1BH>
>>>
>>> Any hints or suggestions on how to further investigate this
>>> would be greatly appreciated.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20260129/2f6e6e30/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 18612 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/devel/attachments/20260129/2f6e6e30/attachment-0001.png>
More information about the Devel
mailing list