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

Chevio emercado at rapidlink.com
Mon Mar 16 15:15:08 CET 2009


Thank you guys for looking into this problem. I was getting gray hairs
already trying to find the memory leak on my custom module.

Vasil, I am using pkg_malloc, and pkg_free.

I changed the default memory per process to 4mb.

Bogdan, I Will get the fix from the SVN and compile it with it.

Chevio



Bogdan-Andrei Iancu wrote:
> 
> Hi guys,
> 
> Actually Vasil is right - during the latest changes in the DB API, by 
> mistake, the db rows were not freed anymore. But now it is fixed on SVN.
> 
> So, please update and test again.
> 
> Thanks and regards,
> Bogdan
> 
> Vasil Kolev wrote:
>> В 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?
>>
>>
>>   
> 
> 
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
> 
> 

-- 
View this message in context: http://n2.nabble.com/Memory-Leak-related-to-db_mysql-sip_trace-tp2484274p2486287.html
Sent from the OpenSIPS - Devel mailing list archive at Nabble.com.




More information about the Devel mailing list