Bug 250152 - memory leak in fence_xvmd
Summary: memory leak in fence_xvmd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-30 18:43 UTC by Lon Hohberger
Modified: 2009-04-16 22:55 UTC (History)
3 users (show)

Fixed In Version: RHBA-2007-0575
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-07 16:59:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for leak in virt.c (479 bytes, patch)
2007-07-30 18:43 UTC, Lon Hohberger
no flags Details | Diff
New patch (675 bytes, patch)
2007-07-30 20:39 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0575 0 normal SHIPPED_LIVE cman bug fix update 2007-10-31 12:26:24 UTC

Description Lon Hohberger 2007-07-30 18:43:43 UTC
Description of problem:

There is a small leak in fence_xvmd

The fix looks like the following:

--- cluster/fence/agents/xvm/virt.c     2006/11/03 15:58:56     1.3
+++ cluster/fence/agents/xvm/virt.c     2007/07/30 16:14:18     1.3.2.1
@@ -108,6 +108,7 @@

        /* We have all the locally running domains & states now */
        /* Sort */
+       free(d_ids);
        qsort(&vl->vm_states[0], vl->vm_count, sizeof(vl->vm_states[0]),
              _compare_virt);
        return vl;


Unfortunately, this is insufficient, as there is a much larger memory leak in
libvirt as in bug #250146

Comment 1 Lon Hohberger 2007-07-30 18:43:43 UTC
Created attachment 160263 [details]
Patch for leak in virt.c

Comment 3 Lon Hohberger 2007-07-30 20:39:23 UTC
Created attachment 160272 [details]
New patch

Comment 4 Lon Hohberger 2007-07-30 20:42:58 UTC
Not calling virDomainDestroy() on the domain also had a side effect of keeping
references open on the connection handle, causing virConnectClose() to not
complete successfully; the second patch fixes that.  Combined with the change to
libvirt.c in bug #250146, this issue is resolved.

Comment 6 Lon Hohberger 2007-07-30 21:16:01 UTC
Patch in RHEL5 RHEL51 and HEAD

Comment 7 Lon Hohberger 2007-07-31 18:20:26 UTC
Removing dependency on the libvirt memory leak since we're going to ship these
fixes irrespective of libvirt's status.

Comment 10 errata-xmlrpc 2007-11-07 16:59:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0575.html



Note You need to log in before you can comment on or make changes to this bug.