cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] config: stop leaking memory on config reload
Date: Mon, 28 Feb 2011 05:48:47 +0100	[thread overview]
Message-ID: <4D6B292F.8080100@redhat.com> (raw)
In-Reply-To: <20110225165501.GW10920@redhat.com>

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



      parent reply	other threads:[~2011-02-28  4:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 14:09 [Cluster-devel] [PATCH] config: stop leaking memory on config reload Fabio M. Di Nitto
2011-02-25 16:55 ` Lon Hohberger
2011-02-28  4:41   ` Tim Serong
2011-02-28  4:48   ` Fabio M. Di Nitto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D6B292F.8080100@redhat.com \
    --to=fdinitto@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).