Bug 1074906

Summary: ACPI power off doesn't work after do S3 during migration
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Amit Shah <amit.shah>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: amit.shah, areis, bsarathy, chayang, flang, hhuang, juzhang, kraxel, mdeng, michen, mkenneth, pbonzini, quintela, qzhang, rbalakri, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 915140 Environment:
Last Closed: 2015-03-04 05:40:33 UTC Type: Bug
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: 867787, 875096, 915140, 1074901    
Bug Blocks: 915139, 923626    

Comment 1 Sibiao Luo 2014-03-11 09:14:10 UTC
host info:
# uname -r && rpm -q qemu-kvm-rhev && rpm -q seabios
3.10.0-100.el7.x86_64
qemu-kvm-rhev-1.5.3-50.el7.x86_64
seabios-1.7.2.2-11.el7.x86_64
guest info:
3.10.0-100.el7.x86_64

ACPI power off doesn't work when do S3 during migration.

Steps:
1.Sync the src and dest host time with clock.redhat.com 
2.boot a guest in src and sync guest time.
3.boot the dest with...-incoming tcp:0:5888,server,nowait
4.do S3 in guest.
# pm-suspend
5.migrate from src to dest.
6.do ACPI power off in guest.
(qemu) system_powerdown     <-------- Note: not poweroff in guest.
(qemu) info status 
VM status: paused (suspended)
7.wakeup the VM.
(qemu) system_wakeup 

Results:
after step 6, it fail to ACPI power off, while do S3 instead of it.
after step 7, guest will call trace.
# dmesg
[  119.260990] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  119.604923] PM: Syncing filesystems ... done.
[  120.107501] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  120.109329] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  120.111073] Suspending console(s) (use no_console_suspend to debug)
[  120.687187] ------------[ cut here ]------------
[  120.687238] WARNING: at drivers/gpu/drm/qxl/qxl_ttm.c:420 qxl_sync_obj_wait+0x172/0x1f0 [qxl]()
[  120.687240] sync obj 301 still has outstanding releases 0 0 0 4096 1
[  120.687316] Modules linked in: tcp_lp bnep bluetooth rfkill fuse ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ip_tables sg qxl ttm drm_kms_helper drm virtio_balloon crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd i2c_piix4 virtio_console i2c_core mperf microcode serio_raw pcspkr nfsd uinput auth_rpcgss nfs_acl lockd sunrpc xfs libcrc32c ata_generic pata_acpi virtio_blk virtio_net
[  120.687331]  ata_piix virtio_pci libata virtio_ring virtio floppy dm_mirror dm_region_hash dm_log dm_mod
[  120.687333] CPU: 2 PID: 3459 Comm: kworker/u8:15 Not tainted 3.10.0-100.el7.x86_64 #1
[  120.687334] Hardware name: Red Hat KVM, BIOS Bochs 01/01/2011
[  120.687355] Workqueue: events_unbound async_run_entry_fn
[  120.687360]  0000000000000009 ffff8800365cda20 ffffffff815c2e0a ffff8800365cda58
[  120.687362]  ffffffff81059bd1 0000000000000001 ffff8800b8579720 0000000000000001
[  120.687365]  ffff8800b8579738 0000000000000000 ffff8800365cdab8 ffffffff81059c3c
[  120.687365] Call Trace:
[  120.687380]  [<ffffffff815c2e0a>] dump_stack+0x19/0x1b
[  120.687389]  [<ffffffff81059bd1>] warn_slowpath_common+0x61/0x80
[  120.687392]  [<ffffffff81059c3c>] warn_slowpath_fmt+0x4c/0x50
[  120.687398]  [<ffffffff815c7753>] ? schedule_hrtimeout_range+0x13/0x20
[  120.687403]  [<ffffffffa0337eb2>] qxl_sync_obj_wait+0x172/0x1f0 [qxl]
[  120.687429]  [<ffffffffa02ee7a1>] ttm_bo_wait+0x91/0x190 [ttm]
[  120.687435]  [<ffffffffa02f0064>] ttm_bo_evict+0x54/0x340 [ttm]
[  120.687441]  [<ffffffffa02f048a>] ttm_mem_evict_first+0x13a/0x1b0 [ttm]
[  120.687445]  [<ffffffffa02f08a4>] ttm_bo_force_list_clean+0x64/0xb0 [ttm]
[  120.687450]  [<ffffffffa02f0a93>] ttm_bo_evict_mm+0x33/0x60 [ttm]
[  120.687455]  [<ffffffffa033a54a>] qxl_vram_evict+0x1a/0x20 [qxl]
[  120.687459]  [<ffffffffa033515d>] qxl_drm_freeze+0x9d/0xf0 [qxl]
[  120.687462]  [<ffffffffa0335240>] qxl_pm_suspend+0x20/0x50 [qxl]
[  120.687475]  [<ffffffff812d5dcc>] pci_pm_suspend+0x6c/0x150
[  120.687478]  [<ffffffff812d5d60>] ? pci_pm_freeze+0xe0/0xe0
[  120.687488]  [<ffffffff813a0e7e>] dpm_run_callback+0x2e/0x60
[  120.687491]  [<ffffffff813a1d27>] __device_suspend+0xe7/0x290
[  120.687493]  [<ffffffff813a1eef>] async_suspend+0x1f/0xa0
[  120.687495]  [<ffffffff81086be9>] async_run_entry_fn+0x39/0x120
[  120.687500]  [<ffffffff8107860b>] process_one_work+0x17b/0x460
[  120.687503]  [<ffffffff810793bb>] worker_thread+0x11b/0x400
[  120.687505]  [<ffffffff810792a0>] ? rescuer_thread+0x3e0/0x3e0
[  120.687507]  [<ffffffff8107fc10>] kthread+0xc0/0xd0
[  120.687510]  [<ffffffff8107fb50>] ? kthread_create_on_node+0x110/0x110
[  120.687515]  [<ffffffff815d2b6c>] ret_from_fork+0x7c/0xb0
[  120.687517]  [<ffffffff8107fb50>] ? kthread_create_on_node+0x110/0x110
[  120.687519] ---[ end trace 71ebbefe7a0e37df ]---
[  120.687520] [TTM] Failed to expire sync object before buffer eviction
[  120.687976] PM: suspend of devices complete after 576.348 msecs
[  120.688120] PM: late suspend of devices complete after 0.139 msecs
[  120.689283] PM: noirq suspend of devices complete after 1.161 msecs
[  120.689288] ACPI: Preparing to enter system sleep state S3
[  120.689326] PM: Saving platform NVS memory
[  120.689327] Disabling non-boot CPUs ...
[  120.689419] Unregister pv shared memory for cpu 1
[  120.695723] Broke affinity for irq 9
[  120.696840] smpboot: CPU 1 is now offline
[  120.697410] Unregister pv shared memory for cpu 2
[  120.703621] Broke affinity for irq 11
[  120.704745] smpboot: CPU 2 is now offline
[  120.705031] Unregister pv shared memory for cpu 3
[  120.711412] Broke affinity for irq 12
[  120.712523] smpboot: CPU 3 is now offline
[  120.713516] kvm-clock: cpu 0, msr 1:3ff86001, primary cpu clock, resume
[  120.713516] ACPI: Low-level resume complete
[  120.713516] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S0_] (20130517/hwxface-571)
[  120.713516] PM: Restoring platform NVS memory
[  120.713516] Enabling non-boot CPUs ...
[  120.713516] smpboot: Booting Node 0 Processor 1 APIC 0x1
[  120.713516] kvm-clock: cpu 1, msr 1:3ff86041, secondary cpu clock
[  120.726894] KVM setup async PF for cpu 1
[  120.726898] kvm-stealtime: cpu 1, msr 13fc8df80
[  120.727205] CPU1 is up
[  120.727237] smpboot: Booting Node 0 Processor 2 APIC 0x2
[  120.727209] kvm-clock: cpu 2, msr 1:3ff86081, secondary cpu clock
[  120.758784] KVM setup async PF for cpu 2
[  120.758787] kvm-stealtime: cpu 2, msr 13fd0df80
[  120.758850] CPU2 is up
[  120.758874] smpboot: Booting Node 0 Processor 3 APIC 0x3
[  120.758852] kvm-clock: cpu 3, msr 1:3ff860c1, secondary cpu clock
[  120.772277] KVM setup async PF for cpu 3
[  120.772280] kvm-stealtime: cpu 3, msr 13fd8df80
[  120.772357] CPU3 is up
[  120.772539] ACPI: Waking up from system sleep state S3
[  120.777841] PM: noirq resume of devices complete after 5.217 msecs
[  120.777931] PM: early resume of devices complete after 0.045 msecs
[  120.778034] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[  120.779842] virtio-pci 0000:00:05.0: irq 40 for MSI/MSI-X
[  120.779881] virtio-pci 0000:00:05.0: irq 41 for MSI/MSI-X
[  120.779920] virtio-pci 0000:00:05.0: irq 42 for MSI/MSI-X
[  120.811934] usb usb1: root hub lost power or was reset
[  120.811936] virtio-pci 0000:00:04.0: irq 43 for MSI/MSI-X
[  120.811968] virtio-pci 0000:00:04.0: irq 44 for MSI/MSI-X
[  121.146106] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[  121.284499] PM: resume of devices complete after 506.562 msecs
[  121.344466] Restarting tasks ... done.
[  125.108927] SELinux: initialized (dev binfmt_misc, type binfmt_misc), uses genfs_contexts
[  128.288595] xor: automatically using best checksumming function:
[  128.299005]    avx       : 29636.000 MB/sec
[  128.327009] raid6: sse2x1   10460 MB/s
[  128.344005] raid6: sse2x2   12992 MB/s
[  128.361004] raid6: sse2x4   15144 MB/s
[  128.361540] raid6: using algorithm sse2x4 (15144 MB/s)
[  128.362334] raid6: using ssse3x2 recovery algorithm
[  128.394448] bio: create slab <bio-2> at 2
[  128.399185] Btrfs loaded
[  129.777484] nr_pdflush_threads exported in /proc is scheduled for removal
[  129.778453] sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case.  If you have one, please send an email to linux-mm.