Bug 1003526 - Disk Hotplug will lead libvirtd crash
Disk Hotplug will lead libvirtd crash
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-02 05:17 EDT by Shanzhi Yu
Modified: 2016-05-16 00:20 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-1.1.1-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:20:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
gdb backtrace (9.11 KB, text/plain)
2013-09-02 05:20 EDT, Shanzhi Yu
no flags Details

  None (edit)
Description Shanzhi Yu 2013-09-02 05:17:59 EDT
Description of problem:

Disk Hotplug will lead libvirtd crash

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

libvirt-1.1.1-3.el7.x86_64
qemu-kvm-1.5.2-3.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1. start an guest
# virsh start demo
2. create an image and make ext3 fs on it
# qemu-img create /var/lib/libvirt/images/test.img 1G 
# mkfs.ext3 /var/lib/libvirt/images/test.img
3. attach disk to guest
# virsh attach-disk demo /var/lib/libvirt/images/test.img vdb --mode readonly --sourcetype file

Actual results:

error: Failed to attach disk
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Failed to reconnect to the hypervisor

Expected results:

succeed

Additional info:

attach fc/nfs/iscsi disk will also lead libvirtd crash
Comment 1 Shanzhi Yu 2013-09-02 05:20:31 EDT
Created attachment 792777 [details]
gdb backtrace
Comment 3 Shanzhi Yu 2013-09-02 05:32:13 EDT
(In reply to Shanzhi Yu from comment #0)
> Description of problem:
> 
> Disk Hotplug will lead libvirtd crash
> 
> Version-Release number of selected component (if applicable):
> 
> libvirt-1.1.1-3.el7.x86_64
> qemu-kvm-1.5.2-3.el7.x86_64
> 
> How reproducible:
> 
> 100%
> 
> Steps to Reproduce:
> 1. start an guest
> # virsh start demo
> 2. create an image and make ext3 fs on it
> # qemu-img create /var/lib/libvirt/images/test.img 1G 
> # mkfs.ext3 /var/lib/libvirt/images/test.img
> 3. attach disk to guest
> # virsh attach-disk demo /var/lib/libvirt/images/test.img vdb --mode
> readonly --sourcetype file
> 
> Actual results:
> 
> error: Failed to attach disk
> error: End of file while reading data: Input/output error
> error: One or more references were leaked after disconnect from the
> hypervisor
> error: Failed to reconnect to the hypervisor
> 
> Expected results:
> 
> succeed
> 
> Additional info:
> 
> attach fc/nfs/iscsi disk will also lead libvirtd crash

"virsh attach-disk demo /var/lib/libvirt/images/test.img vdb" can lead libvirtd crash, other options is not necessary
Comment 5 Ján Tomko 2013-09-02 06:09:10 EDT
Fixed upstream by:
commit bb97db2fb4315b7a7eb4403570d54c93992117de
Author:     Guido Günther <agx@sigxcpu.org>
AuthorDate: 2013-08-10 09:19:30 +0200
Commit:     Guido Günther <agx@sigxcpu.org>
CommitDate: 2013-08-12 19:31:18 +0200

    Don't crash in qemuBuildDeviceAddressStr

Downstream patch posted:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-September/msg00003.html
Comment 6 chhu 2013-09-09 01:34:57 EDT
Reproduced with libvirt-1.1.1-3.el7.x86_64, qemu-kvm-1.5.2-3.el7.x86_64.

Verified with the packages:
libvirt-1.1.1-4.el7.x86_64
qemu-kvm-1.5.3-2.el7.x86_64

Test steps:
1. start an guest
# virsh define rh7-qcow2.xml 
Domain rh7-qcow2 defined from rh7-qcow2.xml

2. create an image and make ext3 fs on it
# qemu-img create /var/lib/libvirt/images/test.img 1G 
# mkfs.ext3 /var/lib/libvirt/images/test.img

3. attach disk to guest
# virsh attach-disk rh7-qcow2 /var/lib/libvirt/images/test.img vdb --mode readonly --sourcetype file
Disk attached successfully

Test results:
current command work well, move to verified.
Comment 7 Ludek Smid 2014-06-13 05:20:37 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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