Bug 720597 - install win7 with big ram and smp will hang at rebooting
install win7 with big ram and smp will hang at rebooting
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Marcelo Tosatti
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-12 04:10 EDT by Xiaoqing Wei
Modified: 2013-01-09 19:03 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Installation of Windows 7 Ultimate x86 (32-bit) Service Pack 1 on a guest with more than 4GB of RAM and more than one CPU from a DVD medium often crashes during the final steps of the installation process due to a system hang. To work around this issue, use the Windows Update utility to install the Service Pack.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-13 08:18:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
snapshot (319.61 KB, image/png)
2011-07-12 04:10 EDT, Xiaoqing Wei
no flags Details
gdb-bt (1.91 KB, text/plain)
2011-07-12 04:21 EDT, Xiaoqing Wei
no flags Details
kvm_stat info when guest hangs (1.34 KB, text/plain)
2011-07-12 04:22 EDT, Xiaoqing Wei
no flags Details
top show threads (799 bytes, text/plain)
2011-07-12 04:23 EDT, Xiaoqing Wei
no flags Details
recollect info with kernel167 qemu-kvm169 (6.65 MB, application/x-gzip)
2011-07-13 04:59 EDT, Xiaoqing Wei
no flags Details

  None (edit)
Description Xiaoqing Wei 2011-07-12 04:10:56 EDT
Created attachment 512355 [details]
snapshot

Description of problem:
install win7 with big ram and smp will hang at rebooting

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

How reproducible:
mostly
Intel host : (8 / 10)
AMD host : (0 / 4)
Steps to Reproduce:
1.start a smp win7 guest installation (8G ram ,4 vcpus)

qemu-kvm ... -m 8192 -smp 4,cores=2,threads=1,sockets=2 ...

2.wait till guest reboot (and it hangs)
3.
  
Actual results:
guest hangs at rebooting

Expected results:
guest finish installation successfully.

Additional info:
host cpu (8 cores):
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz

...

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 dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid

12G RAM



cmd to start guest installation :
qemu-kvm -name 'Win7_32-ide-rtl8139-uniprocessor_host_12G-guest_8G' -monitor stdio -chardev socket,id=serial_id_20110709-095719-IlQX,path=/tmp/serial-20110709-095719-IlQX,server,nowait -device isa-serial,chardev=serial_id_20110709-095719-IlQX -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win7-32.qcow2',index=0,if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2,aio=native -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -device rtl8139,netdev=idkNPcTY,mac=9a:d6:cf:f8:6e:31,id=ndev00idkNPcTY,bus=pci.0,addr=0x3 -netdev tap,id=idkNPcTY,vhost=on,ifname='t0-095719-IlQX',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 8192 -smp 4,cores=2,threads=1,sockets=2 -drive file='/home/en_windows_7_ultimate_with_sp1_x86_dvd_619077.iso',index=1,if=none,id=drive-ide0-0-1,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/windows/winutils.iso',index=2,if=none,id=drive-ide0-1-0,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/windows/virtio-win.iso',index=3,if=none,id=drive-ide0-1-1,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 -cpu cpu64-rhel6,+sse2,+x2apic -fda '/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win7-32/answer.vfd' -vnc :0 -rtc base=localtime,clock=host,driftfix=none -M rhel6.1.0 -boot order=cdn,once=d,menu=off   -usbdevice tablet -enable-kvm  

there are 2 workaround solutions:
1) boot guest with fewer ram (I tried 4G and it reboots);
	-m 4096 -smp 4,cores=2,threads=1,sockets=2 
2) boot guest with uniprocessor
	-m 8192 -smp 1,cores=1,threads=1,sockets=1
3] Seems to use AMD host is a workaround for me (Not really sure,I will do more test on it)
	CPU work for me :
		{AMD Phenom(tm) 9600B Quad-Core Processor} with 8G RAM
Comment 2 Xiaoqing Wei 2011-07-12 04:21:54 EDT
Created attachment 512359 [details]
gdb-bt
Comment 4 Xiaoqing Wei 2011-07-12 04:22:54 EDT
Created attachment 512361 [details]
kvm_stat info when guest hangs
Comment 5 Xiaoqing Wei 2011-07-12 04:23:47 EDT
Created attachment 512364 [details]
top show threads
Comment 8 Xiaoqing Wei 2011-07-13 04:59:11 EDT
Created attachment 512607 [details]
recollect info with kernel167 qemu-kvm169

recollect kvm_stat , trace , gdb_info , top_info , vmstat with RHEL6.2 host (kernel 167 , qemu-kvm 169)
Comment 11 Marcelo Tosatti 2011-07-18 17:17:17 EDT
Xiaoqing Wei,

I cannot reproduce the problem, after 10 installation attempts, with Windows 7 Ultimate 32-bits, on Intel host. This is the command line:

/usr/libexec/qemu-kvm -drive file=/root/images/win7_ultimate.img,cache=writeback \
-m 8G -vnc :1 \
-net nic,vlan=0,macaddr=20:20:20:00:00:02,model=rtl8139 \
-net tap,script=/root/ifup.sh -monitor telnet:127.0.0.1:4445,server,nowait \
-cdrom /root/en_windows_7_ultimate_x86_dvd_x15-65921.iso \
-cpu cpu64-rhel6,+sse2,+x2apic -usbdevice tablet -enable-kvm  -boot d \
-smp 4,cores=2,threads=1,sockets=2

qemu-kvm-0.12.1.2-2.160.el6
kernel-2.6.32-131.0.15.el6

From RHEL6.1. Can you please reproduce and confirm that:

1) Booting with 4G fixes the problem.
2) Booting with smp=1 (uniprocessor) fixes the problem.
3) Using AMD machine fixes the problem.
Comment 12 Xiaoqing Wei 2011-07-18 22:45:45 EDT
(In reply to comment #11)
Marcelo Tosatti ,
> qemu-kvm-0.12.1.2-2.160.el6
> kernel-2.6.32-131.0.15.el6
> 
I can reproduce this bug using hosts with fresh installed RHEL-Server-6.1
# rpm -q kernel qemu-kvm
kernel-2.6.32-131.0.15.el6.x86_64
qemu-kvm-0.12.1.2-2.160.el6.x86_64


> From RHEL6.1. Can you please reproduce and confirm that:
> 
> 1) Booting with 4G fixes the problem.
confirmed,on the host previously stucks a 8G smp4 guest.
Can pass when guest 4G 4smp . 

> 2) Booting with smp=1 (uniprocessor) fixes the problem.
confirmed,on the host previously stucks a 8G smp4 guest.
Can pass when guest 8G uniprocessor

> 3) Using AMD machine fixes the problem.
confirmed, the following models, intel buggy and amd works for me,

model name	: Intel(R) Xeon(R) CPU            5130  @ 2.00GHz   SMP4

model name	: Intel(R) Xeon(R) CPU           W3520  @ 2.67GHz   SMP8

model name	: AMD Phenom(tm) II X4 B95 Processor                SMP4
Comment 13 Xiaoqing Wei 2011-07-18 22:50:22 EDT
(In reply to comment #12)
Hi Marcelo Tosatti ,
the cmd I reproduce is:
qemu-kvm -name Intel_w3520_8G4smp -monitor stdio -chardev socket,id=serial_id_20110719-094508-C4VO,path=/tmp/serial-20110719-094508-C4VO,server,nowait -device isa-serial,chardev=serial_id_20110719-094508-C4VO -drive file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win7-32.qcow2,index=0,if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2,aio=native -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -device rtl8139,netdev=idCYWr5D,mac=9a:75:9a:35:95:ac,id=ndev00idCYWr5D,bus=pci.0,addr=0x3 -netdev tap,id=idCYWr5D,vhost=on,ifname=win7_32_intel,script=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no \
\
\
-m 8192 -smp 4,cores=2,threads=1,sockets=2 \
[above cmd hangs]
\
\[following works for me]
-m 4096 -smp 4,cores=2,threads=1,sockets=2 \
-m 8192 -smp 1,cores=1,threads=1,sockets=1 \
\
-drive file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/ISO/Windows7/en_windows_7_ultimate_with_sp1_x86_dvd_619077.iso,index=1,if=none,id=drive-ide0-0-1,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/windows/winutils.iso,index=2,if=none,id=drive-ide0-1-0,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/windows/virtio-win.iso,index=3,if=none,id=drive-ide0-1-1,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 -cpu cpu64-rhel6,+sse2,+x2apic -fda /usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/win7-32/answer.vfd -vnc :0 -rtc base=localtime,clock=host,driftfix=none -M rhel6.1.0 -boot order=cdn,once=d,menu=off -usbdevice tablet -enable-kvm -S

Best Regards,
Xiaoqing.
Comment 16 Marcelo Tosatti 2011-07-21 18:32:43 EDT
cpu0 is stuck waiting for other cpus to cross a barrier:

     baf:       f3 90                   pause
     bb1:       8b d0                   mov    %eax,%edx
     bb3:       33 c9                   xor    %ecx,%ecx
     bb5:       f0 0f c1 0a             lock xadd %ecx,(%edx)
     bb9:       85 c9                   test   %ecx,%ecx
     bbb:       75 f2                   jne    0xbaf

Since installation succeeds sporadically and its not possible to spot any bugs on kvm side, lets consider this a guest bug. This combination (+4GB memory on 32-bit guest, SP1 installation from DVD) is very uncommon, so adding an entry
Technical Notes should be enough.

-----------

Cause
Installation of Windows 7 Ultimate x86 (32-bit) Service Pack 1 on guest with more than 4GB of RAM and more than one CPU often crashes during final steps.

Consequence
Installation fails due to a system hang.

Workaround
Avoid installing Windows 7 Ultimate x86 Service Pack 1 from DVD media, in case guest uses more than 4GB of RAM.

Instead, use Windows Update to install Service Pack 1.
Comment 18 Dor Laor 2011-09-27 09:51:23 EDT
What's the explanation it works for Marcelo and not for QE?
Can you two share the host cpu info?

Also, I recommend not to use -cpu qemu64 but use -cpu Nehalem.
Can QE retest with it?
I do like to treat it as exception and find the cause till the exception phase ends.
Comment 19 Xiaoqing Wei 2011-09-28 03:06:09 EDT
(In reply to comment #18)
Hi Dor,
> What's the explanation it works for Marcelo and not for QE?
> Can you two share the host cpu info?
> 
> Also, I recommend not to use -cpu qemu64 but use -cpu Nehalem.
> Can QE retest with it?
> I do like to treat it as exception and find the cause till the exception phase
> ends.

with -cpu Nehalem, guest also stucks

Here's "info register" when guest stuck
(qemu) info registers 
EAX=00000006 EBX=00000026 ECX=e3d3ffaa EDX=178bf3fd
ESI=8bb3ed20 EDI=8bb56140 EBP=85c91cb8 ESP=85c91ca8
EIP=8be3601b EFL=00000006 [-----P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0023 00000000 ffffffff 00c0f300 DPL=3 DS   [-WA]
CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0023 00000000 ffffffff 00c0f300 DPL=3 DS   [-WA]
FS =0030 8bb3ec00 00003748 00409300 DPL=0 DS   [-WA]
GS =0000 00000000 ffffffff 00000000
LDT=0000 00000000 ffffffff 00000000
TR =0028 80216000 000020ab 00008b00 DPL=0 TSS32-busy
GDT=     8aaea000 000003ff
IDT=     8aaea400 000007ff
CR0=8001003b CR2=826ae000 CR3=00185000 CR4=000006f8
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000 
DR6=ffff0ff0 DR7=00000400
FCW=027f FSW=0020 [ST=0] FTW=00 MXCSR=00000000
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=ffffe00000000000 4011
FPR4=0000000000000000 8000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
(qemu) 


full cmd:

qemu-kvm -name win7-32-qxl-smp8-8g -monitor stdio -chardev socket,id=serial_id_20110928-144721-Ey3q,path=/tmp/serial,server,nowait -device isa-serial,chardev=serial_id_20110928-144721-Ey3q \
\
-drive file='win7-32-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-net-pci,netdev=idMurXTt,mac=9a:b4:ed:a0:bd:82,id=ndev00idMurXTt,bus=pci.0,addr=0x3 -netdev tap,id=idMurXTt,ifname='t0-win7-32' \
\
\
-m 8192 -smp 8,cores=2,threads=2,sockets=2 \
\
\
-drive file='Windows7.iso',index=1,if=none,id=drive-ide0-0-0,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file='winutils.iso',index=2,if=none,id=drive-ide0-0-1,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive file='virtio-win.iso',index=3,if=none,id=drive-ide0-1-0,media=cdrom,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0\
\
\
\
 -cpu Nehalem  \
\
\
-fda 'answer.vfd' -spice port=8000,disable-ticketing -vga qxl -rtc base=localtime,clock=host,driftfix=none -boot order=cdn,once=d,menu=off     -M rhel6.2.0 -usb -device usb-tablet -enable-kvm

Hst_info: SMP=8 ,RAM=12G
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz

Best Regards,
Xiaoqing.
Comment 21 Dor Laor 2011-10-04 18:02:02 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Installation of Windows 7 Ultimate x86 (32-bit) Service Pack 1 on guest with
more than 4GB of RAM and more than one CPU often crashes during final steps.

Consequence
Installation fails due to a system hang.

Workaround
Avoid installing Windows 7 Ultimate x86 Service Pack 1 from DVD media, in case
guest uses more than 4GB of RAM.

Instead, use Windows Update to install Service Pack 1.
Comment 23 Martin Prpic 2011-11-11 07:34:59 EST
Added to the Knows Issues chapter of the 6.2 Technical Notes.
Comment 24 Martin Prpic 2011-11-11 07:35:00 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,12 +1 @@
-Cause
+Installation of Windows 7 Ultimate x86 (32-bit) Service Pack 1 on a guest with more than 4GB of RAM and more than one CPU from a DVD medium often crashes during the final steps of the installation process due to a system hang. To work around this issue, use the Windows Update utility to install the Service Pack.-Installation of Windows 7 Ultimate x86 (32-bit) Service Pack 1 on guest with
-more than 4GB of RAM and more than one CPU often crashes during final steps.
-
-Consequence
-Installation fails due to a system hang.
-
-Workaround
-Avoid installing Windows 7 Ultimate x86 Service Pack 1 from DVD media, in case
-guest uses more than 4GB of RAM.
-
-Instead, use Windows Update to install Service Pack 1.

Note You need to log in before you can comment on or make changes to this bug.