Red Hat Bugzilla – Bug 1091206
libvirtd crashed after hot-unplug the vcpus which is pinned to host cpus
Last modified: 2014-05-27 12:27:07 EDT
This bug has been copied from bug #1088165 and has been proposed to be backported to 6.5 z-stream (EUS).
Verify this bug with the following package version, it is fixed. Packages version: libvirt-0.10.2-29.el6_5.8.x86_64 qemu-kvm-0.12.1.2-2.415.el6_5.9.x86_64 kernel-2.6.32-431.20.2.el6.x86_64 Steps: 1. start one, guest, which contains 2 vcpus. # virsh start rhel6.5 Domain rhel6.5 started # virsh dumpxml rhel6.5|grep cpu <vcpu placement='static' current='2'>4</vcpu> 2. pin the 2nd vcpu to host cpus # virsh vcpupin rhel6.5 1 0,3 # virsh dumpxml rhel6.5|grep cpu <vcpu placement='static' current='2'>4</vcpu> <cputune> <vcpupin vcpu='1' cpuset='0,3'/> </cputune> 3. hot-unplug the last vcpu from guest # virsh setvcpus rhel6.5 1 # virsh dumpxml rhel6.5|grep cpu <vcpu placement='static' current='1'>4</vcpu> 4. check the libvirtd service status, it is working well. No dead. # service libvirtd status libvirtd (pid 2272) is running...
(In reply to Zhang Xuesong from comment #8) > Verify this bug with the following package version, it is fixed. > > Packages version: > libvirt-0.10.2-29.el6_5.8.x86_64 > qemu-kvm-0.12.1.2-2.415.el6_5.9.x86_64 > kernel-2.6.32-431.20.2.el6.x86_64 > > > Steps: > 1. start one, guest, which contains 2 vcpus. > # virsh start rhel6.5 > Domain rhel6.5 started > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='2'>4</vcpu> > > 2. pin the 2nd vcpu to host cpus > # virsh vcpupin rhel6.5 1 0,3 > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='2'>4</vcpu> > <cputune> > <vcpupin vcpu='1' cpuset='0,3'/> > </cputune> > Checking in the guest, and make sure the vcpu number in guest is right. Login the guest, and check the vcpuinfo, # cat /proc/cpuinfo |grep processor |wc -l 2 > 3. hot-unplug the last vcpu from guest > # virsh setvcpus rhel6.5 1 > > # virsh dumpxml rhel6.5|grep cpu > <vcpu placement='static' current='1'>4</vcpu> After hot-unplug. login the guest, and check the vcpuinfo, # cat /proc/cpuinfo |grep processor |wc -l 1 > > 4. check the libvirtd service status, it is working well. No dead. > # service libvirtd status > libvirtd (pid 2272) is running... Ad-hoc testing some other related testing, all of them are working well: 1. check the cpu-stats, vcpuinfo, vcpupin, vcpucount, all of them are working well. # virsh cpu-stats rhel6.5 CPU0: cpu_time 17.710181082 seconds vcpu_time 12.951564011 seconds CPU1: cpu_time 8.207106669 seconds vcpu_time 2.712824892 seconds CPU2: cpu_time 16.484833647 seconds vcpu_time 8.101443002 seconds CPU3: cpu_time 10.336857805 seconds vcpu_time 5.647272634 seconds Total: cpu_time 52.738979203 seconds user_time 3.550000000 seconds system_time 17.980000000 seconds # virsh vcpuinfo rhel6.5 VCPU: 0 CPU: 2 State: running CPU time: 29.4s CPU Affinity: yyyy # virsh vcpupin rhel6.5 VCPU: CPU Affinity ---------------------------------- 0: 0-3 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 1 2. Hot-plug vcpus, the vcpu number in vcpucount is working well. # virsh setvcpus rhel6.5 2 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 2 3. check in the guest, the vcpu number is increased as expected. # cat /proc/cpuinfo |grep processor |wc -l 2 4. hot-unplug vcpus, the vcpu number in vcpucount is working well. # virsh setvcpus rhel6.5 1 # virsh vcpucount rhel6.5 maximum config 4 maximum live 4 current config 2 current live 1 5. check in the guest, the vcpu number is decreased as expected. # cat /proc/cpuinfo |grep processor |wc -l 1
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-2014-0560.html