[OpenSIPS-Devel] Memory Leak related to db_mysql/sip_trace

Vasil Kolev vasil.kolev at attractel.com
Mon Mar 16 11:14:23 CET 2009


В 23:02 -0700 на 15.03.2009 (нд), Chevio написа:
> I have been doing some tests as I noticed that opensips is eating the
> system
> memory.
> 
...

This seems like a problem I've been discussing with Bogdan on irc - from
what I've seen in the DB layer code and the modules, if you fetch a
string from the database it's never freed - the memory is allocated in
the db_row functions, and db_free_row() is never called, except in error
conditions.

(There's also db_free_rows, which DOES NOT call db_free_row).

Chevio, which memory allocator are you using? I guess the system one,
judging by the fact that the memory manages to grow so much (the others
have a limited pool). Can you try enabling the memory allocator
debugger, running for a while with the mysql-intensive stuff and then
killing the process and seeing where do the allocations that were left
were done from?


-- 
Regards,
Vasil Kolev
Attractel NV
dCAP #1324, LPIC2




More information about the Devel mailing list