Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
libvirtd crashed after hot-unplug the vcpus which is pined to some host cpus.
Version-Release number of selected component (if applicable):
libvirt-0.10.2-32.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.423.el6.x86_64
kernel-2.6.32-457.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. prepare one shutoff guest, revise the dumpxml as following:
......
<vcpu placement='static' current='2'>4</vcpu>
......
2. start the guest
3. check the cpu settings in the dumpxml
# virsh dumpxml rhel6.5|grep cpu
<vcpu placement='static' current='2'>4</vcpu>
4. pin the 2nd cpu to some host cpus.
# virsh vcpupin rhel6.5 1 0,3
5. check the cpu settings in the dumpxml again, the result is as expected.
# virsh dumpxml rhel6.5|grep cpu
<vcpu placement='static' current='2'>4</vcpu>
<cputune>
<vcpupin vcpu='1' cpuset='0,3'/>
</cputune>
6. hot-unplug the vcpus
# virsh setvcpus rhel6.5 1
7. check the cpu settings in the dumpxml again, then libvirtd dead.
# virsh dumpxml rhel6.5|grep cpu
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused
# service libvirtd status
libvirtd dead but pid file exists
Actual results:
As step 7
Expected results:
libvirt should not crashed, should prompt the user the hot-unplug cpus are pined to host cpus and forbid to hot-unplug it.
Addtional info:
attached is the bt info for reference.
Now pushed upstream:
commit a0a8dc695e9e20fa8b4ebe9c7ad697a4e9b3ac41
Author: Ján Tomko <jtomko>
CommitDate: 2014-04-22 14:49:25 +0200
Properly free vcpupin info for unplugged CPUs
Remove the pointer from def->cputune.vcpupin after unplugging
the CPU and also free the bitmap contained in the structure
by calling virDomainVcpuPinDel instead of VIR_FREE.
Introduced by commit 0df1a79.
This makes virDomainLookupVcpuPin redundant.
https://bugzilla.redhat.com/show_bug.cgi?id=1088165
git describe: v1.2.3-144-ga0a8dc6
Posted downstream:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2014-April/msg00455.html
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/RHBA-2014-1374.html
Description of problem: libvirtd crashed after hot-unplug the vcpus which is pined to some host cpus. Version-Release number of selected component (if applicable): libvirt-0.10.2-32.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.423.el6.x86_64 kernel-2.6.32-457.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare one shutoff guest, revise the dumpxml as following: ...... <vcpu placement='static' current='2'>4</vcpu> ...... 2. start the guest 3. check the cpu settings in the dumpxml # virsh dumpxml rhel6.5|grep cpu <vcpu placement='static' current='2'>4</vcpu> 4. pin the 2nd cpu to some host cpus. # virsh vcpupin rhel6.5 1 0,3 5. check the cpu settings in the dumpxml again, the result is as expected. # virsh dumpxml rhel6.5|grep cpu <vcpu placement='static' current='2'>4</vcpu> <cputune> <vcpupin vcpu='1' cpuset='0,3'/> </cputune> 6. hot-unplug the vcpus # virsh setvcpus rhel6.5 1 7. check the cpu settings in the dumpxml again, then libvirtd dead. # virsh dumpxml rhel6.5|grep cpu error: Failed to reconnect to the hypervisor error: no valid connection error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused # service libvirtd status libvirtd dead but pid file exists Actual results: As step 7 Expected results: libvirt should not crashed, should prompt the user the hot-unplug cpus are pined to host cpus and forbid to hot-unplug it. Addtional info: attached is the bt info for reference.