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 803591 - virsh segfault when attempting to detach disk from non-existent domain
Summary: virsh segfault when attempting to detach disk from non-existent domain
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-15 07:28 UTC by Huang Wenlong
Modified: 2013-10-20 21:45 UTC (History)
11 users (show)

Fixed In Version: libvirt-0.9.10-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:50:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Huang Wenlong 2012-03-15 07:28:14 UTC
Description of problem:
virsh will crash and report lots of error  when detach-disk  with wrong arguments


Version-Release number of selected component (if applicable):
libvirt-0.9.10-5.el6.x86_64
qemu-kvm-0.12.1.2-2.241.el6.x86_64



How reproducible:
100%

Steps to Reproduce:

1.  try to detach disk with wrong arguments

[root@intel-w3520-12-1 images]# virsh detach-disk vdb guest
error: failed to get domain 'vdb'
*** glibc detected *** virsh: munmap_chunk(): invalid pointer: 0x00007fff500c1478 ***
======= Backtrace: =========
/lib64/libc.so.6[0x30ca0750c6]
/usr/lib64/libvirt.so.0(virFree+0x29)[0x3af164e659]
virsh[0x41afca]
virsh[0x413ca7]
virsh[0x4242fc]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x30ca01ecdd]
virsh[0x40a309]
======= Memory map: ========
00400000-0044b000 r-xp 00000000 fd:00 1065467                            /usr/bin/virsh
0064a000-00654000 rw-p 0004a000 fd:00 1065467                            /usr/bin/virsh
01a20000-01aab000 rw-p 00000000 00:00 0                                  [heap]
30c9800000-30c9820000 r-xp 00000000 fd:00 2102358                        /lib64/ld-2.12.so
30c9a1f000-30c9a20000 r--p 0001f000 fd:00 2102358                        /lib64/ld-2.12.so
30c9a20000-30c9a21000 rw-p 00020000 fd:00 2102358                        /lib64/ld-2.12.so
30c9a21000-30c9a22000 rw-p 00000000 00:00 0
30c9c00000-30c9c02000 r-xp 00000000 fd:00 2102367
 ...
2.# virsh list
 Id    Name                           State
----------------------------------------------------
 15    r                              running


3.

Actual results:
virsh crash and report lots of error

Expected results:
virsh do not crash and handle the error message

Additional info:
libvirtd   works well

it can not be reproduce on libvirt-0.9.4-23.el6_2.6.x86_64.rpm, so a regression bug.

Comment 2 Osier Yang 2012-03-15 07:34:20 UTC
Fixed in upstream.

commit 68fd6a3b346fa848f1e55bd8179277cddd6904be
Author: Alex Jia <ajia>
Date:   Thu Mar 15 13:57:50 2012 +0800

    virsh: fix invalid free

Comment 7 Laine Stump 2012-03-16 14:24:27 UTC
A backported fix has been posted to rhvirt-patches for inclusion in the RHEL build of libvirt:

http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-March/msg01462.html

Comment 10 Wayne Sun 2012-03-19 08:44:01 UTC
packages:
libvirt-0.9.10-6.el6.x86_64
qemu-kvm-0.12.1.2-2.247.el6.x86_64

follow the steps in description:
# virsh detach-disk vda guest
error: failed to get domain 'vda'
error: Domain not found: no domain with matching name 'vda'

# virsh detach-disk rhel6u2 vdc
error: No found disk whose source path or target is vdc

The problem is fixed.

Comment 12 errata-xmlrpc 2012-06-20 06:50:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


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