Bug 669268

Summary: WinXP hang when reboot after setup copies files to the installation folders
Product: Red Hat Enterprise Linux 6 Reporter: Suqin Huang <shuang>
Component: qemu-kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: ehabkost, gleb, khong, knoel, mkenneth, ndai, snagar, tburke, virt-maint, xwei
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.134.el6 Doc Type: Bug Fix
Doc Text:
[this is a fix for a bug introduced during 6.1 development, so it is not a change between 6.0.0 and 6.1.0]
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 11:26:09 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: 580951    
Attachments:
Description Flags
guest hang none

Description Suqin Huang 2011-01-13 05:36:43 UTC
Created attachment 473214 [details]
guest hang

Description of problem:
During WinXP installation, guest will reboot after setup copies files to the installation folders. Guest hang at this step.

Version-Release number of selected component (if applicable):
seabios-0.6.1.2-1.el6

How reproducible:
100%

Steps to Reproduce:
1. cmd
/usr/libexec/qemu-kvm -drive file=/usr/image/winxp.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=idI9apjv,mac=9a:5c:2b:18:29:5c,netdev=idI9apjv,id=ndev00idI9apjv,bus=pci.0,addr=0x3 -netdev tap,id=idI9apjv,script='/usr/scripts/qemu-ifup-switch',downscript='no' -m 2048 -smp 2,cores=1,threads=1,sockets=2 \
-drive file='/usr/isos/ISO/WinXP/32/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.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  -cpu cpu64-rhel6,+sse2,+x2apic -vnc :0 -rtc base=localtime,clock=host,driftfix=none  -boot order=cdn,once=d,menu=off   -usbdevice tablet -enable-kvm -monitor stdio

2.
3.
  
Actual results:
WinXP hang after reboot

Expected results:


Additional info:
1. 
host:
kernel: 2.6.32-94.el6.x86_64
qemu: qemu-kvm-0.12.1.2-2.129.el6.x86_64

cpu:
processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 4450B
stepping	: 2
cpu MHz		: 1000.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv
bogomips	: 2004.03
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps


2. top:
Tasks: 145 total,   2 running, 143 sleeping,   0 stopped,   0 zombie
Cpu0  :100.0%us,  0.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.3%us,  0.0%sy,  0.0%ni, 98.7%id,  1.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3857288k total,  2939500k used,   917788k free,   120944k buffers
Swap:  6094840k total,    13964k used,  6080876k free,   417048k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                             
31543 root      20   0 2451m 2.0g 2912 R 99.7 55.1  23:07.47 qemu-kvm                                                                                                            
31511 root      20   0 2451m 2.0g 2912 S  0.3 55.1   0:29.42 qemu-kvm    

3. kvm_stat:

kvm statistics

 efer_reload                  0       0
 exits                 11022045    1020
 fpu_reload                 752       0
 halt_exits                  74       0
 halt_wakeup                 75       0
 host_state_reload	2271349      20
 hypercalls               63771       0
 insn_emulation         4577789       0
 insn_emulation_fail          1       0
 invlpg                   67537       0
 io_exits               2182509       0
 irq_exits              1593801    1020
 irq_injections          106994       0
 irq_window                   0       0
 largepages                   2       0
 mmio_exits               12798       0
 mmu_cache_miss           49243       0
 mmu_flooded              25258       0
 mmu_pde_zapped           13202       0
 mmu_pte_updated          97331       0
 mmu_pte_write           108784       0
 mmu_recycled                 0       0
 mmu_shadow_zapped        53582       0
 mmu_unsync                   0       0
 nmi_injections               0       0
 nmi_window                   0       0
 pf_fixed               1971373       0
 pf_guest                811996       0
 remote_tlb_flush            10       0
 request_irq                  0       0
 signal_exits                12       0
 tlb_flush               730563       0

4. it work if I downgrade seabios to seabios-0.5.1-3.el6
5. guest:
WinXP

Comment 3 Keqin Hong 2011-01-13 10:55:05 UTC
This bug can be reproduced by starting a WinXP-32 guest then restarting Windows.

Comment 4 Gleb Natapov 2011-01-13 13:24:24 UTC
So far I was not able to reproduce while rebooting WindowsXP.

Comment 5 Keqin Hong 2011-01-14 03:33:35 UTC
(In reply to comment #4)
> So far I was not able to reproduce while rebooting WindowsXP.
The problem only happens on AMD host, and doesn't exist on Intel host.

Below was top info qemu-kvm threads when winXP gotstuck:

Tasks:   7 total,   2 running,   5 sleeping,   0 stopped,   0 zombie
Cpu(s): 25.5%us,  0.3%sy,  0.0%ni, 74.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   7787304k total,  1799828k used,  5987476k free,    39000k buffers
Swap: 10027000k total,        0k used, 10027000k free,   289852k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                
10112 root      20   0 1848m 1.0g 3744 R 99.9 13.8   8:14.25 qemu-kvm                                                                                                               
10101 root      20   0 1848m 1.0g 3744 R  1.3 13.8   0:10.24 qemu-kvm                                                                                                               
10113 root      20   0 1848m 1.0g 3744 S  0.0 13.8   0:12.49 qemu-kvm                                                                                                               
10114 root      20   0 1848m 1.0g 3744 S  0.0 13.8   0:00.17 qemu-kvm                                                                                                               
10115 root      20   0 1848m 1.0g 3744 S  0.0 13.8   0:00.00 qemu-kvm                                                                                                               
10116 root      20   0 1848m 1.0g 3744 S  0.0 13.8   0:00.07 qemu-kvm                                                                                                               
10117 root      20   0 1848m 1.0g 3744 S  0.0 13.8   0:00.01 qemu-kvm

Comment 6 Keqin Hong 2011-01-14 03:37:15 UTC
CLI used:
/usr/libexec/qemu-kvm -M rhel6.0.0 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -name winxp-seabios -uuid bb340905-50b0-de70-921b-5c360a947fba -nodefconfig -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/winxp-seabios.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive file=/var/lib/libvirt/images/winxp-seabios.img,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:04:ad:19,bus=pci.0,addr=0x3 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc :0 -vga std -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

Comment 8 Keqin Hong 2011-01-19 09:48:12 UTC
Gleb,
Do you need additional info for this bug?

Thanks
Keqin

Comment 9 Gleb Natapov 2011-01-23 17:00:58 UTC
(In reply to comment #8)
> Gleb,
> Do you need additional info for this bug?
> 
Not yet. I was on vocation. Will look into it.

Comment 10 Xiaoqing Wei 2011-01-25 06:16:55 UTC
 after successfully installed the XP,it cant boot with any option.even     safe mode.


if in a AMD host boot the VM use a image(with XP installed used the same cmd with AMD host) created in intel host,it  boots normally.



seabios-0.6.1.2-1.el6.x86_64

Comment 11 Xiaoqing Wei 2011-01-25 06:52:35 UTC
steps to reproduce:

1,in AMD host with following packages:
seabios-0.6.1.2-1.el6.x86_64
kernel-2.6.32-94.el6.x86_64
qemu-kvm-0.12.1.2-2.129.el6.x86_64

2,install WinXP using      (This cmd works well in Intel machine.) :


qemu-kvm -name 'vm1'  -monitor stdio -chardev socket,id=serial_c8LL,path=/tmp/serial-20110125-130916-0OgQ,server,nowait -device isa-serial,chardev=serial_c8LL \
\
\
\
-drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/winXP-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=idNoOwh7,mac=9a:f5:5e:66:fe:07,netdev=idNoOwh7,id=ndev00idNoOwh7,bus=pci.0,addr=0x3 -netdev tap,id=idNoOwh7,ifname='t0-130916-0OgQ',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 512 -smp 2,cores=1,threads=1,sockets=2 -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/ISO/WinXP/32/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.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/winXP-32/answer.vfd' -vnc :0 -rtc base=localtime,clock=host,driftfix=none  -boot order=cdn,once=d,menu=off   -usbdevice tablet -enable-kvm

3,the installation process hang after files copy completed.

4,in qemu-kvm monitor type "system_reset" to reset the guest,now it can reboot and resume and       successfully complete        the installation process

5,the guest OS cant be booted even in safe mode.it stuck shortly after select safe mode.

6,type "q" in qemu-kvm monitor to quit the guest


7,in host: downgrade seabios to  seabios-0.5.1-3.el6.x86_64

8,use the qemu-kvm cmd in step 2 to boot the guest

Comment 12 Xiaoqing Wei 2011-01-25 07:01:21 UTC
(In reply to comment #11)
> steps to reproduce:
> 
> 1,in AMD host with following packages:
> seabios-0.6.1.2-1.el6.x86_64
> kernel-2.6.32-94.el6.x86_64
> qemu-kvm-0.12.1.2-2.129.el6.x86_64
> 
> 2,install WinXP using      (This cmd works well in Intel machine.) :
> 
> 
> qemu-kvm -name 'vm1'  -monitor stdio -chardev
> socket,id=serial_c8LL,path=/tmp/serial-20110125-130916-0OgQ,server,nowait
> -device isa-serial,chardev=serial_c8LL \
> \
> \
> \
> -drive
> file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/winXP-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=idNoOwh7,mac=9a:f5:5e:66:fe:07,netdev=idNoOwh7,id=ndev00idNoOwh7,bus=pci.0,addr=0x3
> -netdev
> tap,id=idNoOwh7,ifname='t0-130916-0OgQ',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no'
> -m 512 -smp 2,cores=1,threads=1,sockets=2 -drive
> file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/isos/ISO/WinXP/32/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.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/winXP-32/answer.vfd'
> -vnc :0 -rtc base=localtime,clock=host,driftfix=none  -boot
> order=cdn,once=d,menu=off   -usbdevice tablet -enable-kvm
> 
> 3,the installation process hang after files copy completed.
> 
> 4,in qemu-kvm monitor type "system_reset" to reset the guest,now it can reboot
> and resume and       successfully complete        the installation process
> 
> 5,the guest OS cant be booted even in safe mode.it stuck shortly after select
> safe mode.
> 
> 6,type "q" in qemu-kvm monitor to quit the guest
> 
> 
> 7,in host: downgrade seabios to  seabios-0.5.1-3.el6.x86_64
> 
> 8,use the qemu-kvm cmd in step 2 to boot the guest

9,the guest boot successfully and can operate normally

Comment 17 Keqin Hong 2011-02-11 05:04:35 UTC
Verified on qemu-kvm-0.12.1.2-2.144.el6 and seabios-0.6.1.2-3.el6.x86_64.
PASS.

Steps are the same as in Comment 0 and Comment 3/5/6.

Comment 19 Eduardo Habkost 2011-05-05 19:21:24 UTC
    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:
[this is a fix for a bug introduced during 6.1 development, so it is not a change between 6.0.0 and 6.1.0]

Comment 20 errata-xmlrpc 2011-05-19 11:26:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 21 errata-xmlrpc 2011-05-19 13:00:55 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html