Red Hat Bugzilla – Bug 803591
virsh segfault when attempting to detach disk from non-existent domain
Last modified: 2013-10-20 17:45:35 EDT
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.
Fixed in upstream. commit 68fd6a3b346fa848f1e55bd8179277cddd6904be Author: Alex Jia <ajia@redhat.com> Date: Thu Mar 15 13:57:50 2012 +0800 virsh: fix invalid free
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
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.
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