[OpenSIPS-Users] Possible memory leak in PKG

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Oct 10 13:33:15 UTC 2022


Hi Arto,

Thanks for the report here. So, the 3.2.7 suffers of a mem leak which 
DOES NOT exist in 3.1.1, mainly this

       109600 : 4858 x [dlg_vals.c: fetch_dlg_value, line 176]

right ?

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 27-30 Sept 2022, Athens
   https://www.opensips.org/events/Summit-2022Athens/

On 10/5/22 10:16 AM, Arto Kuiri wrote:
> Hi,
>
> I think I have stumbled to some kind of memory leak. I made new 
> opensips server used same opensips.cfg (changed only ip address) as in 
> my older servers and after some time I started to get these to log file:
>
> /usr/sbin/opensips[1145854]: ERROR:core:fm_malloc: not enough free pkg 
> memory (2312 bytes left, need 2472), please increase the "-M" command 
> line parameter!
> /usr/sbin/opensips[1145854]: ERROR:core:receive_msg: no pkg mem left 
> for sip_msg
>
> Older servers works fine with much higher load. Old servers are with 
> opensips 3.1.1 and new server is 3.2.7 :
>
> opensips -V
> version: opensips 3.1.1 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> main.c compiled on  with gcc 9
>
> opensips -V
> version: opensips 3.2.7 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
> Q_MALLOC, F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll, sigio_rt, select.
> main.c compiled on  with gcc 11
>
> I allocated more memory and changed private memory allocator to 
> F_MALLOC_DBG
>
> After while I checked what process had highest memory useage and I did:
> opensips-cli -x mi mem_pkg_dump <pid>
> (PID was "SIP receiver udp")
>

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


More information about the Users mailing list