Bug 531692

Summary: kvm program exited auto after hotplug 16 vcpus
Product: Red Hat Enterprise Linux 5 Reporter: Suqin Huang <shuang>
Component: kvmAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: tburke, virt-maint, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-30 19:42:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Suqin Huang 2009-10-29 07:21:20 UTC
Description of problem:
kvm program exited auto after hotplug 16 vcpus

Version-Release number of selected component (if applicable):
kvm-83-127.el5

How reproducible:
always

Steps to Reproduce:
1. start vm with smp=1
CLI:
#/usr/libexec/qemu-kvm -drive file=~/share/images/Fedora-11-32.qcow2,if=ide -no-hpet -rtc-td-hack -smp 1 -m 2G -uuid `uuidgen` -net  nic,model=virtio,macaddr=00:A6:08:FA:DD:55,vlan=0 -net tap,vlan=0,script=/etc/qemu-ifup -cpu qemu64,+sse2 -boot c -vnc :6 -name F10-32 -monitor stdio
2. (qemu) cpu_set 1 online (repeat add cpu to 16)
3. 
  
Actual results:
after cpu_set 16 online, program exited automatically.

Expected results:


Additional info:

1. error:
kvm_create_vcpu: Invalid argument
kvm_set_lapic: Bad file descriptor
kvm_setup_cpuid2: Bad file descriptor
KVM_TPR_ACCESS_REPORTING: Bad file descriptor
kvm_set_msrs FAILED: Bad file descriptor
kvm_run: Bad file descriptor
kvm_run returned -9

2. (gdb)bt
No stack.

3. host: 
processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 67
model name	: Dual-Core AMD Opteron(tm) Processor 1216
stepping	: 3

4. guest: Fedora11-32, RHEL5.4-server-32

5. dmesg:
connection1:0: detected conn error (1011)
 connection2:0: detected conn error (1011)
 connection1:0: detected conn error (1011)
 connection2:0: detected conn error (1011)
 connection1:0: detected conn error (1011)
 connection2:0: detected conn error (1011)
 connection2:0: detected conn error (1011)
 connection1:0: detected conn error (1011)
 connection2:0: detected conn error (1011)
 connection1:0: detected conn error (1011)
breth0: port 2(tap0) entering disabled state
device tap0 left promiscuous mode
breth0: port 2(tap0) entering disabled state

Comment 3 Eduardo Habkost 2010-04-30 19:42:25 UTC
RHEL5 KVM only supports up to 16 vcpus. Trying to add more vcpus than supported by KVM will make qemu abort because it can't handle the semi-initialized state after vcpu_create() fails.

See bug 587661 for a related patch that changed qemu to explicitly abort when vcpu_create() fails.