live migration of windows 2012 r2 instance with virtio balloon driver fails from mitaka to queens.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
Incomplete
|
Medium
|
Seyeong Kim | ||
Bionic |
Incomplete
|
Medium
|
Seyeong Kim | ||
Focal |
Incomplete
|
Medium
|
Seyeong Kim | ||
Groovy |
Won't Fix
|
Medium
|
Seyeong Kim |
Bug Description
[Impact]
livemigration of windows 2012 r2 instance with virtio balloon driver
from qemu 2.5(mitaka) to qemu 2.11(queens) is not working properly.
Especially instance keep moving e.g 2.5 -> 2.5 -> 2.11
Then It shows below msg from the 2nd mitaka node.
Migration: [ 94 %]error: internal error: qemu unexpectedly closed the monitor: 2020-09-
2020-09-
2020-09-
2020-09-
2020-09-
After patching for CVE-2016-5403, we did workaround with CVE-2015-
[Test Case]
Deploy 2 mitaka-staging machines kvm host
Deploy 1 queens-staging machines kvm host
Setting NFS server and client between them.
Deploy windows 2012r2 guest instance with virtio balloon driver on one of the mitaka host
Migrate it from mitaka to mitaka (it should be ok )
Migrate it from mitaka to queens ( it raises error )
I can reproduce this issue with baremetal or vm host
[Regressions]
As this patch is qemu related, current instance should be restarted to have this fix.
Also, this patch may cause failure of vm starting, migrating related to virtio drivers.
Especially Windows guest vm.
[Others]
Description: make sure vdev->vq[i].inuse never goes below 0
This is a work-around to fix live migrations after the patches for
CVE-2016-5403 were applied. The true root cause still needs to be
determined.
Origin: based on a patch by Len <email address hidden>
Bug-Ubuntu: https:/
Index: qemu-2.
=======
--- qemu-2.
+++ qemu-2.
@@ -1510,6 +1510,7 @@
for (i = 0; i < num; i++) {
if (vdev->
+ int inuse_tmp;
nheads = vring_avail_
/* Check it isn't doing strange things with descriptor numbers. */
if (nheads > vdev->vq[
@@ -1527,12 +1528,15 @@
* Since max ring size < UINT16_MAX it's safe to use modulo
* UINT16_MAX + 1 subtraction.
*/
- vdev->vq[i].inuse = (uint16_
+ inuse_tmp = (int)(vdev-
+
+ vdev->vq[i].inuse = (inuse_tmp < 0 ? 0 : inuse_tmp);
+
if (vdev->vq[i].inuse > vdev->vq[
- error_report("VQ %d size 0x%x < last_avail_idx 0x%x - "
+ error_report("VQ %d inuse %u size 0x%x < last_avail_idx 0x%x - "
- i, vdev->vq[
+ i, vdev->vq[i].inuse, vdev->vq[
CVE References
Changed in qemu (Ubuntu): | |
status: | New → Fix Released |
Changed in qemu (Ubuntu Xenial): | |
status: | New → In Progress |
description: | updated |
description: | updated |
tags: | added: sts |
tags: | added: sru-needed |
Changed in qemu (Ubuntu Xenial): | |
assignee: | nobody → Seyeong Kim (seyeongkim) |
no longer affects: | qemu (Ubuntu Xenial) |
description: | updated |
Changed in qemu (Ubuntu Bionic): | |
status: | New → In Progress |
assignee: | nobody → Seyeong Kim (seyeongkim) |
Changed in qemu (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Seyeong Kim (seyeongkim) |
Changed in qemu (Ubuntu Groovy): | |
status: | Fix Released → In Progress |
assignee: | nobody → Seyeong Kim (seyeongkim) |
Changed in qemu (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in qemu (Ubuntu Focal): | |
importance: | Undecided → Medium |
Changed in qemu (Ubuntu Groovy): | |
importance: | Undecided → Medium |
Hi, the same doesn't seem to trigger for Xenial->Bionic which should be what matches Mitaka-Queens right?
Did you find a way to reproduce it on Xenial->Bionic as well to justify the change to (non UCA) Xenial users?
The Error you reported sounded familiar, for just the error you report there was a discussion pointing to different fixes: /lists. gnu.org/ archive/ html/qemu- devel/2017- 04/msg00141. html
=> https:/
These changes only got into Ubuntu >=Bionic and would also be missing.
I wonder if these two changes would fix your issue as well (less code change, less chance for regression) or if they should be added on top of yours (more thorough fix of the area).
Thea are part of the upstream 2.6.1, so they were in since yakkety - if you use those of 2.6.1 they are quite likely to apply.