FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 02-24-2011, 01:09 PM
"Fabio M. Di Nitto"
 
Default config: stop leaking memory on config reload

Resolves: rhbz#680155

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
config/plugins/xml/config.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/config/plugins/xml/config.c b/config/plugins/xml/config.c
index 1db23da..7dcf8ba 100644
--- a/config/plugins/xml/config.c
+++ b/config/plugins/xml/config.c
@@ -142,7 +142,5 @@ fail:
if (doc)
xmlFreeDoc(doc);

- xmlCleanupParser();
-
return err;
}
--
1.7.4
 
Old 02-25-2011, 03:55 PM
Lon Hohberger
 
Default config: stop leaking memory on config reload

On Thu, Feb 24, 2011 at 03:09:32PM +0100, Fabio M. Di Nitto wrote:
> Resolves: rhbz#680155

ACK, but seriously, a function called "xmlCleanupParser()" shouldn't
leak memory ...



--
Lon Hohberger - Red Hat, Inc.
 
Old 02-28-2011, 03:41 AM
"Tim Serong"
 
Default config: stop leaking memory on config reload

On 2/26/2011 at 03:55 AM, Lon Hohberger <lhh@redhat.com> wrote:
> On Thu, Feb 24, 2011 at 03:09:32PM +0100, Fabio M. Di Nitto wrote:
> > Resolves: rhbz#680155
>
> ACK, but seriously, a function called "xmlCleanupParser()" shouldn't
> leak memory ...

It's probably just sweeping it under the rug :P

Tim


--
Tim Serong <tserong@novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.
 
Old 02-28-2011, 03:48 AM
"Fabio M. Di Nitto"
 
Default config: stop leaking memory on config reload

On 02/25/2011 05:55 PM, Lon Hohberger wrote:
> On Thu, Feb 24, 2011 at 03:09:32PM +0100, Fabio M. Di Nitto wrote:
>> Resolves: rhbz#680155
>
> ACK, but seriously, a function called "xmlCleanupParser()" shouldn't
> leak memory ...

I think the problem is triggered by the fact that initial load of config
is done in the main thread, while subsequent reloads are done in another
thread. libxml2 is said to be thread friendly only under certain
circumstances and it's not completely tested for it. The documentation
does mention that and since we don't really have a need to use the whole
thread code here, let's take the easy approach.

In my tests, where i was calling only xmlCleanupParser, it was not
leaking at all. The leak happens only when there is an xmlParseFile and
xmlFreeDoc associated with it. Weird but well....

Fabio
 

Thread Tools




All times are GMT. The time now is 02:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org