Red Hat Bugzilla – Bug 596610
"Guest moved used index from 0 to 61440" if remove virtio serial device before virtserialport
Last modified: 2013-01-09 17:38:10 EST
Description of problem: Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.52.el6.x86_64 How reproducible: always Steps to Reproduce: 1. start guest with: -device virtio-serial-pci,id=virtio-serial0,vectors=4,bus=pci.0,addr=0x4 \ -device virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0,id=channel0 \ -chardev socket,path=/tmp/channel0,server,nowait,id=channel0 2. in qemu monitor (qemu) device_del virtio-serial0 3. Actual results: Guest moved used index from 0 to 61440 Expected results: handle the abnormal request Additional info: remove devices in correct order work fine. (qemu) device_del channel0 (qemu) device_del virtio-serial0
I can't reproduce this; though I see that this really can happen. Can you tell me exactly when you see this: 1) Does this happen if you start the guest and immediately remove the port, even before the guest has had a chance to boot up? 2) Does this happen after you do some activity on the virtio ports or does that not matter? 3) You are using rhel6 host as well as guest, right?
I just saw the exactly opposite behaviour: Unplugging the *port* before unplugging the device gives me the 'Guest moved used index from 0 to 61440' message.
Patch submitted upstream: http://news.gmane.org/find-root.php?message_id=%3c1c5b20f693ebc3882d01d8f2f9e807878251cd42.1277976486.git.amit.shah%40redhat.com%3e This crash happens only if the virtserialport is removed before the guest boots and initialises the virtqueue structures.
Reproduced in qemu-img-0.12.1.2-2.90.el6.x86_64 with #Description steps Verified in qemu-img-0.12.1.2-2.120.el6.x86_64 The guest running normally after hot-unplug virtio-serial device directly.
move to verified based on comment#9.
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: Removing a virtio-serial port or device before a guest has booted and initialised the device would cause QEMU to exit with an error message. This happened due to the exit routines which were called when a port gets unplugged tried to free any unused data the guest may have sent. However, since the guest had not initalised the virtio device, the virtio layer exited with an assert indicating the guest and host virtio state are not in sync. The fix is to not check for any unused data on the host if the guest side virtio state is not yet initialised.
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