RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 596610 - "Guest moved used index from 0 to 61440" if remove virtio serial device before virtserialport
Summary: "Guest moved used index from 0 to 61440" if remove virtio serial device befor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-05-27 06:39 UTC by lihuang
Modified: 2013-01-09 22:38 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.114.el6
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:28:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description lihuang 2010-05-27 06:39:04 UTC
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

Comment 1 Amit Shah 2010-06-08 06:23:32 UTC
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?

Comment 2 Amit Shah 2010-07-01 08:54:55 UTC
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.

Comment 3 Amit Shah 2010-07-01 09:36:23 UTC
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.

Comment 9 Golita Yue 2011-01-19 09:53:31 UTC
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.

Comment 11 Miya Chen 2011-03-09 03:17:56 UTC
move to verified based on comment#9.

Comment 12 Amit Shah 2011-05-04 10:52:44 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:
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.

Comment 13 errata-xmlrpc 2011-05-19 11:28:19 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 14 errata-xmlrpc 2011-05-19 12:45:27 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


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