v3.0.0-rc4: VM fails to start after vcpuhotunplug, managedsave sequence

Bug #1785972 reported by Satheesh Rajendran
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

VM fails to start after vcpu hot un-plug, managedsave sequence

Host info:
Kernel: 4.18.0-rc8-00002-g1236568ee3cb

qemu: commit 6ad90805383e6d04b3ff49681b8519a48c9f4410 (HEAD -> master, tag: v3.0.0-rc4)
QEMU emulator version 2.12.94 (v3.0.0-rc4-dirty)

libvirt: commit 087de2f5a3dffb27d2eeb0c50a86d5d6984e5a5e (HEAD -> master)
libvirtd (libvirt) 4.6.0

Guest Kernel: 4.18.0-rc8-00002-g1236568ee3cb

Steps to reproduce:
1. Start a guest(VM) with 2 current , 4 max vcpus
virsh start vm1
Domain vm1 started

2. Hotplug 2 vcpus
virsh setvcpus vm1 4 --live

3. Hot unplug 2 vcpus
virsh setvcpus vm1 2 --live

4. Managedsave the VM
virsh managedsave vm1

Domain vm1 state saved by libvirt

5. Start the VM ---Fails to start
virsh start vm1

error: Failed to start domain avocado-vt-vm1
error: internal error: qemu unexpectedly closed the monitor: 2018-08-08T06:27:53.853818Z qemu: Unknown savevm section or instance 'spapr_cpu' 2
2018-08-08T06:27:53.854949Z qemu: load of migration failed: Invalid argument

Testcase:
avocado run libvirt_vcpu_plug_unplug.positive_test.vcpu_set.live.vm_operate.managedsave_with_unplug --vt-type libvirt --vt-extra-params emulator_path=/usr/share/avocado-plugins-vt/bin/qemu create_vm_libvirt=yes kill_vm_libvirt=yes env_cleanup=yes smp=8 backup_image_before_testing=no libvirt_controller=virtio-scsi scsi_hba=virtio-scsi-pci drive_format=scsi-hd use_os_variant=no restore_image_after_testing=no vga=none display=nographic kernel=/home/kvmci/linux/vmlinux kernel_args='root=/dev/sda2 rw console=tty0 console=ttyS0,115200 init=/sbin/init initcall_debug' take_regular_screendumps=no --vt-guest-os JeOS.27.ppc64le
JOB ID : 1f869477ad87e7d7e7e7777f631ae08965f41a74
JOB LOG : /root/avocado/job-results/job-2018-08-08T02.42-1f86947/job.log
 (1/1) type_specific.io-github-autotest-libvirt.libvirt_vcpu_plug_unplug.positive_test.vcpu_set.live.vm_operate.managedsave_with_unplug: ERROR (91.58 s)
RESULTS : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 95.89 s

Revision history for this message
Satheesh Rajendran (sathnaga) wrote :
Revision history for this message
Satheesh Rajendran (sathnaga) wrote :

Bisect result:

v3.0.0-rc0: vcpu hotplug crashes the domain - https://bugs.launchpad.net/qemu/+bug/1780928, this commit fixes that issue, b585395b655a6c1f9d9ebf1f0890e76d0708eed6 ppc/xics: fix ICP reset path

v3.0.0-rc1- v3.0.0-rc4: hotplug crash bug fixed, but now we are hitting this one.

Revision history for this message
Satheesh Rajendran (sathnaga) wrote :

Last good commit I could find, 2309832afdaf8d6451ebc2e81bace8eb8ea41293 where both vcpu hotplug and managed save sequence worked fine.

Revision history for this message
Bharata B Rao (bharata-rao) wrote :

The first commit that causes this issue is:

b94020268e0b6659499e250d25346baaa9888fed (spapr_cpu_core: migrate per-CPU data)

Simpler way to reproduce:
1. Hotplug a CPU
2. Hot unplug it
3. Migrate the VM (will fail)

Revision history for this message
Satheesh Rajendran (sathnaga) wrote :

This commit https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg01281.html from ~bharata-rao, fixes the issue.

Changed in qemu:
status: New → Confirmed
Revision history for this message
Satheesh Rajendran (sathnaga) wrote :
Changed in qemu:
status: Confirmed → Fix Committed
Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.