blob: cdbe0e1f7cc237e403254953d62724f15362af74 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
v3.0.0-rc4: VM fails to start after vcpuhotunplug, managedsave sequence
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
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.
Last good commit I could find, 2309832afdaf8d6451ebc2e81bace8eb8ea41293 where both vcpu hotplug and managed save sequence worked fine.
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)
This commit https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg01281.html from ~bharata-rao, fixes the issue.
Applied to ppc-for-3.1.
https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg01317.html
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=cc71c7760e263f808c4240a
|