Bug 831899

Summary: kvm guest hangs after cpu-hotplug
Product: Red Hat Enterprise Linux 6 Reporter: yunpingzheng <yunzheng>
Component: qemu-kvmAssignee: Igor Mammedov <imammedo>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, bsarathy, dyasny, gleb, juzhang, michen, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 09:06:43 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:
Attachments:
Description Flags
dmesg_detail
none
guest_log_kernel_panic none

Description yunpingzheng 2012-06-14 03:16:01 UTC
Description of problem:
boot a guest,then hotplug a vcpu,the guest will hang.then 	
a few minutes later  qemu will throw "kvm internal error"info.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.295.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot a guest using qemu-kvm, using 
-smp 4,cores=2,threads=1,sockets=2,maxcpus=30 \
-cpu 'SandyBridge' 
2.after the guest is boot,run cpu_set 4 online
3.the guest hang ,several minutes  later throw the error info.
  
Actual results:
hot plug successfully.

Expected results:
the guest hang

Additional info:

host info:
kernel: kernel-2.6.32-278.el6.x86_64
cpuinfo:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid

guest info:
rhel 6.2.64

error:info:
(qemu) KVM internal error. Suberror: 1
rax 0000000000000040 rbx 000000000000000a rcx 000000000000032f rdx 000000000000000a
rsi 0000000000000012 rdi 0000000000000008 rsp 0000000000000360 rbp 0000000000000000
r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11 0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
rip 0000000000000004 rflags 00010046
cs 0600 (00006000/0000ffff p 1 dpl 0 db 0 s 1 type b l 0 g 0 avl 0)
ds 0040 (00000400/0000ffff p 1 dpl 0 db 0 s 1 type 3 l 0 g 0 avl 0)
es 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 9dc0 (0009dc00/0000ffff p 1 dpl 0 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt 0/ffff
idt 0/ffff
cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
emulation failure, check dmesg for details

qemu commands:
qemu-kvm \
-monitor stdio \
-name 'vm1' \
-nodefaults \
-drive file='/root/RHEL-Server-6.2-64-virtio.qcow2',index=0,if=none,id=drive-virtio-isk1,media=disk,cache=none,boot=off,snapshot=off,format=qcow2,aio=native \
-device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 \
-device virtio-net-pci,netdev=idKbAEdY,mac=9a:fb:8b:72:44:e7,id=ndev00idKbAEdY ,bus=pci.0,addr=0x3 \
-netdev tap,id=idKbAEdY,vhost=on,script=/root/qemu-ifup-switch  \
-m 4096 \
-smp 4,cores=2,threads=1,sockets=2,maxcpus=30 \
-cpu 'SandyBridge'  \
-vnc :0 \
-vga std \
-rtc base=utc,clock=host,driftfix=slew \
-M rhel6.3.0 \
-boot order=cdn,once=c,menu=off    \
-enable-kvm

Comment 1 yunpingzheng 2012-06-14 03:19:50 UTC
Created attachment 591719 [details]
dmesg_detail

Comment 3 yunpingzheng 2012-06-14 05:29:01 UTC
I tried rhel6.3 guest as well, can not hit this issue

Comment 4 yunpingzheng 2012-06-14 05:29:43 UTC
Created attachment 591734 [details]
guest_log_kernel_panic

Comment 5 juzhang 2012-06-14 06:16:23 UTC
FYI
Bug 788562 - kvm guest hangs when hot-plugged vcpu is onlined due to uninitialized hv_clock

Comment 6 Igor Mammedov 2012-06-14 16:18:41 UTC
yunpingzheng,

Try with http://brewweb.devel.redhat.com/brew/taskinfo?taskID=4513399

Comment 7 yunpingzheng 2012-06-20 09:19:14 UTC
Igor Mammedov :

i can not get the rpm from the link you provide.could you provide a link for me ?

Comment 8 Igor Mammedov 2012-06-20 11:57:31 UTC
(In reply to comment #7)
> Igor Mammedov :
> 
> i can not get the rpm from the link you provide.could you provide a link for
> me ?

http://people.redhat.com/imammedo/60SW6BLwQ08/kernel-2.6.32-220.22.1.el6kk.x86_64.rpm

Comment 9 yunpingzheng 2012-06-25 06:39:54 UTC
> http://people.redhat.com/imammedo/60SW6BLwQ08/kernel-2.6.32-220.22.1.el6kk.
> x86_64.rpm
failed dependencies. need kernel-firmware. please provide all the rpm pkg link.

Comment 10 yunpingzheng 2012-06-25 07:10:20 UTC
Igor Mammedov
guest using the kernel you provided. after cpu_hotplug the guest os work well.

Comment 11 Igor Mammedov 2012-06-25 09:06:43 UTC
yunpingzheng,

Thanks for confirmation. 
Please exclude cpu-hotplug tests form 6.2 guest test plan or file a bug 6.2.z.

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