[sr-dev] How to catch a mem leak

Jon Bonilla (Manwe) manwe at aholab.ehu.es
Wed Oct 31 12:55:43 CET 2012


Hi all

I'm using diferent versions of kamailio 3.3 in production environment. In 2
cases I've found what I suspect to be a mem leak in the parser. 

In my scenarios, there's a stateless proxy in front of a stateful one. Both
run on the same machine and both handle the same traffic (except the one
rejected by the sl one). So my guess is that the parser has the mem leak
somewhere because the difference is the malformed messages rejected by the
first proxy.

Both have the same pkg and shm options.

The stateless one runs out of mem. shm mem and pkg mem grow until kamailio runs
out of mem. I have generated coredumps of the sl processes with kill -6 when the
mem was about to run out but I can't see anything useful there. 

My question is, how can I debug this? Build kamailio with different flags?
Increase mem verbosity? It takes several days until it runs out of mem and I'd
like to catch it soon.




thanks,

Jon




More information about the sr-dev mailing list