Hello,

 

the output below indicates the memory allocated in the individual functions. So it seems that the mem_copy_subs_noc() function allocates a lot of memory. It is increasing over time? The final output looks like a wrapping error, the counter goes negative.

 

Which version of Kamailio do you use on the server?

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Albert Petit
Sent: Thursday, September 9, 2021 11:42 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List <sr-users@lists.sip-router.org>
Subject: [SR-Users] Question about suspected memory leak presence module

 

Hi,

 

I am suspecitng presence module might be having a memory leak on a production server used by an end user (not have access to it).

 

The output of command kamcmd mod.stats presence shm is

Module: presence

{

        mem_copy_subs(148): 25720

        mem_copy_subs_noc(214): 1672201904

        mem_copy_subs_noc(251): 678406560

        add_event(181): 88

        shm_copy_event(57): 40

        shm_copy_event(50): 312

        add_event(156): 40

        add_event(149): 456

        new_shtable(66): 5767168

        new_shtable(53): 262144

        init_evlist(289): 16

        Total: -1938302848

}

 

I am not sure what mem_copy_subs_noc is meaning. And final output is negative,  SHM is incfreasing all the time but not sure of the root cause

 

is this a reasonable hint that a memory leak is related to presence?