Bug 647367

Summary: kvm: guest stale memory after migration
Product: Red Hat Enterprise Linux 6 Reporter: Michael S. Tsirkin <mst>
Component: kernelAssignee: Michael S. Tsirkin <mst>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: akong, bcao, dhoward, jasowang, llim, plyons, tburke
Target Milestone: rcKeywords: ZStream
Target Release: 6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-2.6.32-83.el6 Doc Type: Bug Fix
Doc Text:
Migrating a guest could have resulted in dirty values for the guest being retained in memory, which could have caused both the guest and qemu to crash. The trigger for this was memory pages being both write-protected and dirty simultaneously. With this update, memory pages in the current bitmap are either dirty or write-protected when migrating a guest, with the result that neither qemu nor guest operating systems crash following a migration.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-23 20:27:46 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:    
Bug Blocks: 580951, 658437, 683781    

Description Michael S. Tsirkin 2010-10-28 06:09:05 UTC
Description of problem:
Guest memory would get olds values after migration, resulting
in guest/qemu crashes

Version-Release number of selected component (if applicable):
I reproduced this on an upstream kernel 2.6.36
But same code is in kernel-2.6.32-80.el6 so
I know it is broken there too.

How reproducible:
about 1 in 4 runs triggers this

Steps to Reproduce:
0. used intel non-ept system (should happen on all systems but this is what I have)
1. start guest 6.0 with virtio and vhost-net.
2. run netperf host to guest
3. while under stress, migrate
  
Actual results:
destination qemu exists with message 'guest moved index'

Expected results:
should keep going and complete netperf after migration

Additional info:
Try with both debug and release kernel on guest and host

Comment 3 Michael S. Tsirkin 2010-10-28 06:13:12 UTC
Fix: commit ae8894c00b560bde4cbbc2115f532df997e15d14 upstream

Comment 6 RHEL Program Management 2010-11-04 15:59:56 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 7 jason wang 2010-11-05 03:26:26 UTC
*** Bug 647964 has been marked as a duplicate of this bug. ***

Comment 8 Aristeu Rozanski 2010-11-17 19:47:26 UTC
Patch(es) available on kernel-2.6.32-83.el6

Comment 10 Michael S. Tsirkin 2011-01-13 08:46:40 UTC
This bug will affect vhost on and off, I think this is same as
https://bugzilla.redhat.com/show_bug.cgi?id=642243

Comment 11 Mike Cao 2011-01-13 09:50:21 UTC
Based on https://bugzilla.redhat.com/show_bug.cgi?id=642243#c15 ,
this issue has been fix ald.

Comment 13 Michael S. Tsirkin 2011-01-31 22:23:34 UTC
*** Bug 642243 has been marked as a duplicate of this bug. ***

Comment 14 Mike Cao 2011-02-24 06:38:52 UTC
based on comment#11 ,change status to VERIFIED.

Comment 16 Martin Prpič 2011-04-12 12:44: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:
Migrating a guest could have resulted in dirty values for the guest being retained in memory, which could have caused both the guest and qemu to crash. The trigger for this was memory pages being both write-protected and dirty simultaneously. With this update, memory pages in the current bitmap are either dirty or write-protected when migrating a guest, with the result that neither qemu nor guest operating systems crash following a migration.

Comment 17 errata-xmlrpc 2011-05-23 20:27:46 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-0542.html