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 1131821 - Libvirtd crash while set blkdeviotune with the hotplug disk and specify the --config option
Summary: Libvirtd crash while set blkdeviotune with the hotplug disk and specify the -...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1131819
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-20 06:38 UTC by zhenfeng wang
Modified: 2015-07-22 05:46 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.10.2-48.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1131819
Environment:
Last Closed: 2015-07-22 05:46:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1252 0 normal SHIPPED_LIVE libvirt bug fix update 2015-07-20 17:50:06 UTC

Description zhenfeng wang 2014-08-20 06:38:42 UTC
+++ This bug was initially created as a clone of Bug #1131819 +++

Description of problem:
Libvirtd crash while set blkdeviotune with the hotplug disk and specify the --config option

Version-Release number of selected component (if applicable):
libvirt-1.2.7-1.el7.x86_64
qemu-kvm-rhev-2.1.0-1.el7.x86_64
kernel-3.10.0-142.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6                          shut off

2.Create a img
#qemu-img create /var/lib/libvirt/images/test.img 1G

3.Attach the disk to the guest
#virsh attach-disk rhel6 /var/lib/libvirt/images/test.img vdb

4.Set io parameters for the vdb and specify the --config option, the libvirtd crashs

Check the libvirtd pid before the operation
# ps aux|grep libvirtd
root     26323  4.5  0.2 540600 17784 ?        Ssl  10:51   0:00 /usr/sbin/libvirtd


# virsh blkdeviotune rhel6 vdb --write-iops-sec 10 --config
error: Unable to change block I/O throttle
error: End of file while reading data: Input/output error
error: Failed to reconnect to the hypervisor

re-check the libvirtd pid, the pid changes

# ps aux|grep libvirtd
root     30602  0.2  0.2 614332 17852 ?        Ssl  11:03   0:00 /usr/sbin/libvirtd

5.The coredump info was in the attachment

Actual results:
Libvirtd crash while set blkdeviotune with the hotplug disk and specify the --config option

Expected results:
shouldn't crash

--- Additional comment from zhenfeng wang on 2014-08-20 02:37:44 EDT ---

Comment 2 zhenfeng wang 2014-08-20 06:53:27 UTC
Since i can't reproduce this issue with the libvirt-0.10.2-42.el6.x86_64.rpm, so  maybe this issue is a regression issue, please help check it, thanks

Comment 3 Peter Krempa 2014-08-20 09:10:16 UTC
Fixed upstream:

commit 653137eb957a278b556c6226424aad5395a38a61
Author: Peter Krempa <pkrempa>
Date:   Wed Aug 20 10:49:49 2014 +0200

    qemu: blkiotune: Avoid accessing non-existing disk configuration
    
    When a user would try changing the persistent IO tuning settings for a
    disk that was hotplugged to a vm in a transient way, the
    qemuDomainSetBlockIoTune API would use the same index for both the
    live and config disk array. The disk was missing from the config array
    though causing a crash of libvirtd.
    
    To fix the issue, determine the indexes separately.

v1.2.7-180-g653137e

Comment 6 Luyao Huang 2015-02-02 05:39:48 UTC
I can reproduce this bug with libvirt-0.10.2-46.el6.x86_64:

1. prepare a running vm:
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     r6                             running

2. hot-plug a disk 
# virsh attach-disk r6 /var/lib/libvirt/images/test6.img sda
Disk attached successfully

3.use blkdeviotune set the value to hotplug disk
# virsh blkdeviotune r6 sda 1234 --config
error: Unable to change block I/O throttle
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

And verify this bug with libvirt-0.10.2-48.el6.x86_64:

1.update libvirt to libvirt-0.10.2-48.el6.x86_64 and use blkdeviotune set the value to hotplug disk:

# virsh blkdeviotune r6 sda 1234 --config
error: Unable to change block I/O throttle
error: invalid argument: missing persistent configuration for disk 'sda'

2. restart the vm:
# virsh destroy  r6
Domain r6 destroyed

# virsh start r6
Domain r6 started

3.hot-plug a disk:
# virsh attach-disk r6 /var/lib/libvirt/images/test6.img sda
Disk attached successfully

4. set blk tune to the hot-plug disk:
# virsh blkdeviotune r6 sda 1123 --config 
error: Unable to change block I/O throttle
error: invalid argument: missing persistent configuration for disk 'sda'

Comment 8 errata-xmlrpc 2015-07-22 05:46:38 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.

https://rhn.redhat.com/errata/RHBA-2015-1252.html


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