Bug 698546

Summary: Randomly writing /dev/port caused guest terminate: Guest moved used index from 0 to 1824
Product: Red Hat Enterprise Linux 6 Reporter: Amos Kong <akong>
Component: qemu-kvmAssignee: Michael S. Tsirkin <mst>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: ailan, ddutile, jasowang, lmr, 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:
: 710017 (view as bug list) Environment:
Last Closed: 2011-06-08 21:16:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 710017    

Description Amos Kong 2011-04-21 08:07:28 UTC
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(0xc068, 0x35)
| Sending command: echo -e '\065' | dd of=/dev/port seek=49256 bs=1 count=1
| Sending command: echo $?
| outb(0xc05c, 0x63)
| Sending command: echo -e '\0143' | dd of=/dev/port seek=49244 bs=1 count=1
| Sending command: echo $?
| (qemu) Guest moved used index from 0 to 1824
| (qemu) (Process terminated with status 1)

eg.2
| outb(0xc062, 0x65)
| Sending command: echo -e '\0145' | dd of=/dev/port seek=49250 bs=1 count=1
| Sending command: echo $?
| outb(0xc052, 0xc)
| Sending command: echo -e '\014' | dd of=/dev/port seek=49234 bs=1 count=1
| (qemu) Guest moved used index from 0 to 50791
| (qemu) (Process terminated with status 1)


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.158.el6.x86_64
host kernel: 2.6.32-131.0.1.el6.x86_64
guest kernel: 2.6.32-71.18.2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. execute autotest.iofuzz test
https://github.com/autotest/autotest/blob/master/client/tests/kvm/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-20110418-172111-gzcY',server,nowait -serial unix:'/tmp/serial-20110418-172111-gzcY',server,nowait -drive file='/tmp/kvm_autotest_root/images/rhel6-64-virtio.qcow2',index=0,if=virtio,cache=none -device virtio-net-pci,netdev=idzEpvwU,mac='9a:8a:ec:e1:08:72',id='idTlommU' -netdev tap,id=idzEpvwU,vhost=on,ifname='t0-172111-gzcY',script='/etc/qemu-ifup-vbr0',downscript='no' -m 2048 -smp 2 -vnc :0

Comment 2 Michael S. Tsirkin 2011-06-08 21:16:51 UTC

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