Bug 832946

Summary: Hotplug vcpu lead guest hang with no error
Product: Red Hat Enterprise Linux 6 Reporter: yanbing du <ydu>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: acathrow, dallan, dyasny, dyuan, imammedo, juzhang, mzhan, pkrempa, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 834365 (view as bug list) Environment:
Last Closed: 2012-06-22 09:08:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yanbing du 2012-06-18 09:09:19 UTC
Description of problem:
Use setvcpus to hotplug vcpu for a guest, then the guest's CPU usage is 100% and guest hang there.
BTW, if set vcpu number to 0, it seems the error message is not correct.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.1.x86_64&libvirt-0.9.10-21.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
kernel-2.6.32-276.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Set the maximum cpu number to 4
#virsh dumpxml test
......
<vcpu placement='static' current='1'>4</vcpu>
.....
2. hotplug vcpus 
#virsh setvcpus test 2 

check the guest xml again
#virsh dumpxml test
......
<vcpu placement='static' current='2'>4</vcpu>
.....

3. After add step2, guest's CPU usage up to 100% and cann't conduct any operation in guest.

4. set vcpus to 0
# virsh setvcpus  test 0
error: invalid argument: virDomainSetVcpus
  
Actual results:
As steps 3&4.

Expected results:
Hotplug vcpu can succeed, and the error message should be improved when set vcpu to 0.

Additional info:
No error meesages in libvirtd.log

Comment 1 yanbing du 2012-06-18 09:43:30 UTC
This bug can always reproduced with rhel6.2 guest(release version), but can't reproduce with rhel6.3 guest.

Comment 2 Peter Krempa 2012-06-18 10:18:02 UTC
There's either a bug or the the guest OS is missing support for CPU hotplug, so that it cannot handle the CPU that has emerged in the emulated system. This part of this bug isn't a problem with libvirt. 

As of the error message, that probably is worth tweaking a little bit.

Comment 3 Peter Krempa 2012-06-21 16:33:17 UTC
I opened BZ#834365 to track improvement of the error message and I'm reassigning this to kernel to track the guest hang.

Comment 4 Igor Mammedov 2012-06-22 09:08:23 UTC
6.2 guest doesn't support cpu hotplug, and issue is fixed in 6.3

*** This bug has been marked as a duplicate of bug 788562 ***