Hello Albert,

4.4.7 is over three years old. Before you invest more time in this issue, I 
would suggest that you update to a maintained version (e.g. 5.4.x or 5.5.x).
There have been many extensions to the code base and also bug fixes to since 
this time.

The numbers from the memory debugging below basically list the allocated memory 
from these functions. They should normally not grow endless.

There are also ways to output information to the log file, described e.g. here: 
http://www.kamailio.org/wiki/tutorials/troubleshooting/memory

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: Albert Petit <[email protected]>
Sent: Monday, September 13, 2021 10:34 PM
To: Henning Westerholt <[email protected]>
Cc: Kamailio (SER) - Users Mailing List <[email protected]>; SIP 
Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List 
<[email protected]>
Subject: Re: [SR-Users] Question about suspected memory leak presence module

hi

using kamailio 4.4.7 on that environment

i will try to run some test locally simulating reception of a lot presence 
subscription and  observe mem_copy_subs_noc(),
Just to understand,  both mem_copy_subs_noc are not expected to increase, is 
that right? What do they exactly mean?

Thanks


On Sat, 11 Sep 2021, 22:22 Henning Westerholt, 
<[email protected]<mailto:[email protected]>> wrote:
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<https://gilawa.com/>

From: sr-users 
<[email protected]<mailto:[email protected]>>
 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 
<[email protected]<mailto:[email protected]>>
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?
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to