Bug 516769 - Got "Guest moved used index from 6479 to 25579" during restart of rhel5.4 with virtio block after performing suspend to disk.
Summary: Got "Guest moved used index from 6479 to 25579" during restart of rhel5.4 wit...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Lawrence Lim
URL:
Whiteboard:
: 657182 (view as bug list)
Depends On:
Blocks: 542378 Rhel5KvmTier3 582519
TreeView+ depends on / blocked
 
Reported: 2009-08-11 13:10 UTC by Miya Chen
Modified: 2014-03-26 01:00 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Guests cannot presently use suspend to disk options with the para-virtualized block drivers. Presently, some required functionality for suspending is missing both in the driver and the device layers.
Clone Of:
: 542378 582519 (view as bug list)
Environment:
Last Closed: 2010-11-25 09:47:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miya Chen 2009-08-11 13:10:23 UTC
Description of problem:
After performing suspend to disk to rhel5.4, boot guest with same cmd, got error "Guest moved used index from 6479 to 25579" and qemu quit.

Version-Release number of selected component (if applicable):
83-105

How reproducible:
100%

Steps to Reproduce:
1.boot guest by;
/usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=rhel-5.4-64-block.raw,if=virtio,boot=on -cpu qemu64,+sse2 -m 8G -smp 8 -net nic,macaddr=20:20:20:90:80:65,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -net nic,macaddr=20:20:20:90:80:66,model=e1000,vlan=1 -net tap,script=/etc/qemu-ifup,vlan=1 -vnc :5&
2.#cd /sys/power/
3.#echo disk > state
4.after suspend finish, restart guest by the same cmd.

  
Actual results:
# Guest moved used index from 6479 to 25579
[1]+  Exit 1                  /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=rhel-5.4-64-block.raw,if=virtio,boot=on -cpu qemu64,+sse2 -m 8G -smp 8 -net nic,macaddr=20:20:20:90:80:65,model=virtio,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -net nic,macaddr=20:20:20:90:80:66,model=e1000,vlan=1 -net tap,script=/etc/qemu-ifup,vlan=1 -vnc :5

Expected results:


Additional info:
rhel5.4 with ide block does not have this problem.

Comment 1 Qunfang Zhang 2009-08-12 07:47:53 UTC
This bug can be reproduced on kvm-83-83 and kvm-83-94

Comment 2 Mark McLoughlin 2009-08-18 08:04:34 UTC
bug #497504 had a similar error

Comment 4 Yaniv Kaul 2009-09-07 07:57:10 UTC
Also happened to me:
KVM 112, Windows 2008 R2, with 2 vCPUs, after resume, with virtio-net (and IDE).
Raised severity and priority a bit.

Comment 5 Dor Laor 2009-09-08 09:20:26 UTC
Yan and Yuri analysed it as an issue of missing device reset call when the pci status register sets its RST bit.

Comment 6 Dor Laor 2009-09-16 09:29:21 UTC
We posted kvm rpm to Yaniv. Any news?

Comment 8 Yvugenfi@redhat.com 2009-09-16 09:36:30 UTC
(In reply to comment #6)
> We posted kvm rpm to Yaniv. Any news?  

The guest is no longer crashes.
But there are test hangs in the device path verified with PNP test. Probably our driver bug.

Comment 9 Dor Laor 2009-09-21 11:47:35 UTC

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

Comment 10 Yvugenfi@redhat.com 2009-09-21 11:58:32 UTC
Not sure that this bug is duplicated. The symptom seams the same as for https://bugzilla.redhat.com/show_bug.cgi?id=521829 but I think it worth checking if the solution also applicable here

Comment 11 Michael S. Tsirkin 2009-09-22 16:35:05 UTC
(In reply to comment #5)
> Yan and Yuri analysed it as an issue of missing device reset call when the pci
> status register sets its RST bit.  

AFAIK PCI status does not have a reset bit.
Yan, Yuri, please document your findings somewhere.

Comment 13 Yvugenfi@redhat.com 2009-09-23 09:27:01 UTC
(In reply to comment #11)
> (In reply to comment #5)
> > Yan and Yuri analysed it as an issue of missing device reset call when the pci
> > status register sets its RST bit.  
> 
> AFAIK PCI status does not have a reset bit.
> Yan, Yuri, please document your findings somewhere.  

We never said it was RST bit , it is probably Dor's mistake when he described the bug.

As you also can see from the sources we are talking about command register  and bus master bit (0x04 D:2)

Comment 14 Michael S. Tsirkin 2009-09-23 09:42:35 UTC
Could you please document your findings here?
Do you see a value written into the device control register?
What is this value?


Also, Yaniv reports that with new drivers and fixed
qemu memory corruption bug, the issue does not happen anymore.
Do you still think there's an issue that needs to be fixed?
If yes, could you check what happens with the control register write after qemu is fixed, please?

Comment 15 Michael S. Tsirkin 2009-09-23 09:44:34 UTC
(In reply to comment #4)
> Also happened to me:
> KVM 112, Windows 2008 R2, with 2 vCPUs, after resume, with virtio-net (and
> IDE).
> Raised severity and priority a bit.  

Seems like an unrelated issue.

Comment 16 Michael S. Tsirkin 2009-09-23 10:36:09 UTC
Could this be tested with new patch from
https://bugzilla.redhat.com/show_bug.cgi?id=524557
?
If does not help, can also try testing with old patch
from same bug, just as an additional datapoint.

Comment 17 Gleb Natapov 2009-09-23 10:44:30 UTC
This bug has no any connection or similarity to 524557. The is likely bug in virtio-blk guest driver WRT suspend (bug report states that the problem doesn't happen with IDE, but it will be good to reproduce without virtio-net to completely rule it out). Somebody familiar with guest driver should look at it.

Comment 18 Gleb Natapov 2009-09-23 10:50:33 UTC
can you retest with virtio-disk but without virtio-net?

Comment 19 Miya Chen 2009-09-23 11:24:56 UTC
(In reply to comment #18)
> can you retest with virtio-disk but without virtio-net?  

retest with virtio block but without virtio-net in kvm-83-105.el5_4.4, this problem can be reproduced.

cmd:
Steps to Reproduce:
1.boot guest by;
/usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive
file=rhel-5.4-64-block.raw,if=virtio,boot=on -cpu qemu64,+sse2 -m 8G -smp 4
-net nic,macaddr=20:20:20:11:44:99,model=e1000,vlan=0 -net
tap,script=/etc/qemu-ifup,vlan=0 -vnc :5&
2.#cd /sys/power/
3.#echo disk > state
4.after suspend finish, restart guest by the same cmd.


Actual results:
# Guest moved used index from 5627 to 0

Comment 20 Dor Laor 2009-10-01 13:09:40 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Suspend to disk of guest with virtio block does not work. Some logic is missing both in the driver and the device layers

Comment 21 Yaniv Kaul 2009-10-06 15:17:06 UTC
Dor, we are talking here about:
1. *Internal* guest suspend to disk - not QEMU's migration to file, right?
2. With all virtio devices? I've had something similar with Win2K8 and virtio-net - or is it a different issue?

We need to be more clear on the release notes.

Comment 22 Michael S. Tsirkin 2009-10-06 15:20:36 UTC
Yaniv, yes.

Comment 23 Christopher Curran 2009-10-23 01:31:37 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1 @@
-Suspend to disk of guest with virtio block does not work. Some logic is missing both in the driver and the device layers+Guests cannot presently use suspend to disk options with the para-virtualized block drivers. Presently, some required functionality for suspending is missing both in the driver and the device layers.

Comment 28 Kevin Wolf 2010-12-01 08:42:57 UTC
*** Bug 657182 has been marked as a duplicate of this bug. ***


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