Bug 710017

Summary: Randomly writing /dev/port caused guest terminate: Guest moved used index from 0 to 1824
Product: Red Hat Enterprise Linux 5 Reporter: Qingtang Zhou <qzhou>
Component: kvmAssignee: Michael S. Tsirkin <mst>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7CC: akong, jasowang, juzhang, lmr, michen, mkenneth, rhod, shuang, 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: 698546 Environment:
Last Closed: 2011-06-22 09:27:58 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: 698546    
Bug Blocks: 580946    

Description Qingtang Zhou 2011-06-02 09:32:01 UTC
+++ This bug was initially created as a clone of Bug #698546 +++

Description of problem:

Executing iofuzz test in Autotest framework, it's easy to cause guest exit with this kind of error: Guest moved used index from 0 to *

It's same as https://partner-bugzilla.redhat.com/show_bug.cgi?id=594654#c0
https://github.com/autotest/autotest/blob/master/client/tests/kvm/tests/iofuzz.py


eg.1
| outb(0xc926, 0xc0)
| Sending command: echo -e '\0300' | dd of=/dev/port seek=51494 bs=1 count=1
| Sending command: echo $?
| outb(0xc929, 0xad)
| Sending command: echo -e '\0255' | dd of=/dev/port seek=51497 bs=1 count=1
| (qemu) Guest moved used index from 0 to 65535
| Sending command: echo $?
| (qemu) (Process terminated with status 1)


eg.2
| outb(0xc915, 0xd5)
| Sending command: echo -e '\0325' | dd of=/dev/port seek=51477 bs=1 count=1
| Sending command: echo $?
| outb(0xc93a, 0x51)
| Sending command: echo -e '\0121' | dd of=/dev/port seek=51514 bs=1 count=1
| Sending command: echo $?
| (qemu) Guest moved used index from 0 to 64039
| (qemu) (Process terminated with status 1)

Version-Release number of selected component (if applicable):
kvm version: kvm-83-235.el5
host kernel: kernel-2.6.18-262.el5
guest kernel: kernel-2.6.18-262.el5


How reproducible:
always

Steps to Reproduce:
1. execute autotest.iofuzz test
https://github.com/autotest/autotest/blob/master/client/virt/tests/iofuzz.py
  
Actual results:
Guest terminated

Expected results:
qemu process is normal or hung.

Additional info:
# qemu-kvm -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20110529-082230-kLRP',server,nowait \
-serial unix:'/tmp/serial-20110529-082230-kLRP',server,nowait \
-drive file='RHEL-Server-5.7.qcow2',index=0,if=virtio,media=disk,cache=none,boot=on,format=qcow2\
-net nic,vlan=0,model=virtio,macaddr='9a:92:b7:10:02:ab' \
-net tap,vlan=0,ifname='t0-082230-kLRP',script='qemu-ifup-switch',downscript='no' \
-m 4096 \
-smp 2,cores=1,threads=1,sockets=2 \
-cpu qemu64,+sse2 \
-soundhw ac97 \
-spice port=8000,disable-ticketing \
-qxl 1 \
-rtc-td-hack \
-M rhel5.6.0 \
-boot c  \
-usbdevice tablet \
-no-kvm-pit-reinjection

Comment 2 Suqin Huang 2011-06-27 06:30:51 UTC
*** Bug 716797 has been marked as a duplicate of this bug. ***