Bug 250152 - memory leak in fence_xvmd
memory leak in fence_xvmd
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.1
All Linux
low Severity low
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-30 14:43 EDT by Lon Hohberger
Modified: 2009-04-16 18:55 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2007-0575
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-07 11:59:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Lon Hohberger 2007-07-30 14:43:43 EDT
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 14:43:43 EDT
Created attachment 160263 [details]
Patch for leak in virt.c
Comment 3 Lon Hohberger 2007-07-30 16:39:23 EDT
Created attachment 160272 [details]
New patch
Comment 4 Lon Hohberger 2007-07-30 16:42:58 EDT
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 17:16:01 EDT
Patch in RHEL5 RHEL51 and HEAD
Comment 7 Lon Hohberger 2007-07-31 14:20:26 EDT
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 11:59:45 EST
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.