Bugs item #1721057, was opened at 2007-05-18 02:57
Message generated for change (Comment added) made by bogdan_iancu
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Kobi Eshun (ekobi)
>Assigned to: Bogdan (bogdan_iancu)
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: Bogdan (bogdan_iancu)
Date: 2007-05-25 15:37

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

Hi Kobi,

Thanks for the patch - you are right there.  I applied it on SVN trunk for
testing, to see if there are no issues (even if if looks ok to me too). If
ok, later I will backport it to 1.2 and 1.1 also.

regards,
Bogdan

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

Comment By: Kobi Eshun (ekobi)
Date: 2007-05-24 02: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-24 02: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 18: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

_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to