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 822068 - libvirtd will crash when hotplug attah-disk to guest
Summary: libvirtd will crash when hotplug attah-disk to guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 6.4
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-16 09:02 UTC by Huang Wenlong
Modified: 2013-10-20 21:45 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.13-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:13:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd crash log (4.36 MB, text/plain)
2012-05-16 09:04 UTC, Huang Wenlong
no flags Details
gdb backtrace (9.04 KB, text/plain)
2012-05-21 05:10 UTC, Huang Wenlong
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Huang Wenlong 2012-05-16 09:02:09 UTC
Description of problem:
libvirtd will crash when attah-disk to guest

Version-Release number of selected component (if applicable):
libvirt-0.9.11.3-1.el7.x86_64
qemu-kvm-1.0-17.1.el7.x86_64

How reproducible:
90%

Steps to Reproduce:
1. virsh attach-disk copy /dev/sda1 vda
error: Failed to attach disk
error: End of file while reading data: Input/output error

[root@intel-q9400-4-7 tmp]# virsh list
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': 
Connection refused


Actual results:
attach disk will crash libvirtd

Expected results:
attach disk successfully  and libvirtd is alive

Additional info:
I will attach libvirtd debug log when it crash

Comment 1 Huang Wenlong 2012-05-16 09:04:15 UTC
Created attachment 584905 [details]
libvirtd crash log

Comment 2 Peter Krempa 2012-05-18 12:36:25 UTC
Hi Huang,
could you please provide a full backtrace of the crashed daemon? I'm not able to reproduce this.

Peter

Comment 3 Huang Wenlong 2012-05-21 05:10:57 UTC
Created attachment 585716 [details]
gdb backtrace

Hi,Peter

I attached the gdb all backtrace ,thanks .


Wenlong

Comment 6 Peter Krempa 2012-06-14 11:52:43 UTC
Fixed upstream:

commit 0f4660c8787cc41fe67f869984c0ae11d680037e
Author: Peter Krempa <pkrempa>
Date:   Thu Jun 14 10:29:36 2012 +0200

    qemu: Fix off-by-one error while unescaping monitor strings
    
    While unescaping the commands the commands passed through to the monitor
    function qemuMonitorUnescapeArg() initialized lenght of the input string
    to strlen()+1 which is fine for alloc but not for iteration of the
    string.
    
    This patch fixes the off-by-one error and drops the pointless check for
    a single trailing slash that is automaticaly handled by the default
    branch of switch.

Comment 9 zhe peng 2012-07-31 10:20:39 UTC
I can reproduce this with:
libvirt-0.9.11.3-1.el7.x86_64
qemu-kvm-1.0-17.1.el7.x86_64

verify with:
libvirt-0.9.13-3.el6.x86_64

step:
  1: run cmd:
#for i in {a..z}; do virsh attach-disk $guest_name /dev/zero vd$i; done
error: Failed to attach disk
error: operation failed: target vda already exists

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

Disk attached successfully

error: Failed to attach disk
error: internal error No more available PCI addresses

#virsh list --all
Id    Name                           State
----------------------------------------------------
 3     rhel6.3rcqcow2                 running
 -     rhel6.3c                       shut off
 -     rhel6.3rc                      shut off
 -     rhel6u2                        shut off

libvirt not crash, verification passed.

Comment 10 errata-xmlrpc 2013-02-21 07:13:10 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-2013-0276.html


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