RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 603442 - RHEL 6 beta 1 & Fedora 14: Reference leak in libvirtd remote*() functions
Summary: RHEL 6 beta 1 & Fedora 14: Reference leak in libvirtd remote*() functions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-13 08:20 UTC by Justin Clift
Modified: 2010-11-11 14:47 UTC (History)
8 users (show)

Fixed In Version: libvirt-0_8_1-10_el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:47:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Clift 2010-06-13 08:20:36 UTC
Description of problem:

As reported by Matthias Bolte on the libvirt developer mailing list, the libvirt source code has reference leaks in several functions:

  http://www.redhat.com/archives/libvir-list/2010-June/msg00331.html

  remoteDispatchDomainMemoryStats()
  remoteDispatchDomainMigrateFinish2()
  remoteDispatchDomainIsActive()
  remoteDispatchDomainIsPersistent()
  remoteDispatchInterfaceIsActive()
  remoteDispatchNetworkIsActive()
  remoteDispatchNetworkIsPersistent()
  remoteDispatchStoragePoolIsActive()
  remoteDispatchStoragePoolIsPersistent()

This leads to incorrect information being passed back to a libvirt client program if the object it is working on has been recreated.

For example:

    virsh # pool-create-as images_dir3 dir - - - - "/home/images2"
    Pool images_dir3 created

    virsh # pool-info images_dir3
    Name:           images_dir3
    UUID:           90301885-94eb-4ca7-14c2-f30b25a29a36
    State:          running
    Capacity:       395.20 GB
    Allocation:     30.88 GB
    Available:      364.33 GB

    virsh # pool-destroy images_dir3
    Pool images_dir3 destroyed

    virsh # pool-create-as images_dir3 dir - - - - "/home/images2"
    Pool images_dir3 created

    virsh # pool-info images_dir3
    Name:           images_dir3
    UUID:           90301885-94eb-4ca7-14c2-f30b25a29a36
    error: Storage pool not found

    virsh #

In the above, the "images_dir3" storage pool was created, and libvirt generated a new UUID for it at creation time.  However, the old UUID is incorrectly still being used to refer to this recreated pool instance, causing the above "Storage pool not found" failure.


Version-Release number of selected component (if applicable):

In RHEL 6 beta1: libvirt-0.7.6-2.el6.x86_64.rpm
In Fedora 14 (rawhide): libvirt-0.8.1-1.fc14.x86_64.rpm


How reproducible:

Every time.


Steps to Reproduce:
1. Compile a new virsh, with a call to virStoragePoolIsPersistent(pool) added to the virsh "pool-info" function cmdPoolInfo().
2. Create a directory "/tmp/testbug" on a server with libvirtd running.
3. Use the new virsh connect to the libvirtd server.
4. Inside virsh, create a new storage pool:

   # pool-create-as mypool dir - - - - "/tmp/testbug"
   Pool mypool created

5. Still inside the same virsh session, destroy the storage pool:

   # pool-destroy mypool
   Pool mypool destroyed

6. Still inside the same virsh session, re-create the storage pool using the same name:

   # pool-create-as mypool dir - - - - "/tmp/testbug"
   Pool mypool created

7. Attempts to access this pool by name (in this virsh session) will now fail:

   # pool-info mypool
   Name:           mypool
   UUID:           90301885-94eb-4ca7-14c2-f30b25a29a36
   error: Storage pool not found


Actual results:

Recreated storage pools are unable to be found correctly in a given client session.


Expected results:

Recreated storage pools should work "as per normal".


Additional info:

Matthias Bolte's patch submitted to the libvirt developer mailing list is known to fix this problem in git head:

  http://www.redhat.com/archives/libvir-list/2010-June/msg00331.html

This bug also affects the libvirtd in present Fedora 14 rawhide.

Comment 2 RHEL Program Management 2010-06-13 08:43:08 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Jiri Denemark 2010-06-14 15:59:53 UTC
*** Bug 603494 has been marked as a duplicate of this bug. ***

Comment 4 Moran Goldboim 2010-06-15 12:15:44 UTC
Blocks automated testing form rhevm/vdsm.
In addition it causes an inconsistency between the domains vdsm sees and the ones libvirt sees.

Comment 5 Jiri Denemark 2010-06-15 15:52:39 UTC
Turned out bug 603494 is not actually a dup of this one... sorry about the noise.

Comment 7 Dave Allan 2010-06-24 01:33:39 UTC
libvirt-0_8_1-10_el6 has been built in RHEL-6-candidate with the fix.

Dave

Comment 10 xhu 2010-09-08 04:50:33 UTC
Verified this bug with RHEL6 RC build and it passed:
libvirt-0.8.1-27.el6.x86_64
qemu-kvm-0.12.1.2-2.113.el6.x86_64
kernel-2.6.32-71.el6.x86_64

Comment 11 releng-rhel@redhat.com 2010-11-11 14:47:46 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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