[Devel] [ openser-Bugs-1721057 ] failed pkg_malloc() causes real memory to leak.

SourceForge.net noreply at sourceforge.net
Thu May 24 01:42:27 CEST 2007


Bugs item #1721057, was opened at 2007-05-17 16:57
Message generated for change (Comment added) made by ekobi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1721057&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Kobi Eshun (ekobi)
Assigned to: Nobody/Anonymous (nobody)
Summary: failed pkg_malloc() causes real memory to leak.

Initial Comment:
Hi,

While debugging a separate issue (presence module attempting to read huge table into RAM) I noticed that when pkg_malloc() is unable to fulfill a request for package memory, the process leaks a proportional amount of  conventional memory. In addition, the process may also be leaking some package memory during this failure mode.

I'll be glad to run additional specific tests to help with debugging if required.
--
kobi

----------------------------------------------------------------------

>Comment By: Kobi Eshun (ekobi)
Date: 2007-05-23 16:42

Message:
Logged In: YES 
user_id=1039134
Originator: YES

Hi,

I believe the problem is in modules/mysql/dbase.c, in
db_mysql_store_result(). When db_mysql_convert_result() fails because it
cannot allocate memory, the existing code does not call
db_mysql_free_dbresult() for fear of doing a double free on the
rows/columns. But it still needs to do a mysql_free_result().

I just uploaded a trivial patch to fix this. Cheers,
--
kobi

----------------------------------------------------------------------

Comment By: Kobi Eshun (ekobi)
Date: 2007-05-23 16:39

Message:
Logged In: YES 
user_id=1039134
Originator: YES

File Added: mysql-free-result.patch

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2007-05-21 08:11

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Ekobi,

which presence table is about? I'm warking with Anca on this issue, but we
need fitst to locate it. If the conventional mem is leaking, it means it is
a mysql driver error - either the free_result() is not called, either there
is a bug in the driver/library.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1721057&group_id=139143



More information about the Devel mailing list