Bug 817243 - Guest failed to resume from S4 after migration with kvmclock
Guest failed to resume from S4 after migration with kvmclock
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Red Hat Kernel Manager
Virtualization Bugs
:
: 846479 (view as bug list)
Depends On:
Blocks: 720669 761491 798682
  Show dependency treegraph
 
Reported: 2012-04-28 05:13 EDT by Qunfang Zhang
Modified: 2013-02-21 01:10 EST (History)
9 users (show)

See Also:
Fixed In Version: kernel-2.6.32-301.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 01:10:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
isa serial log during guest do s4 and resume (20.12 KB, text/plain)
2012-04-28 05:16 EDT, Qunfang Zhang
no flags Details

  None (edit)
Description Qunfang Zhang 2012-04-28 05:13:54 EDT
Description of problem:
Boot a rhel6.3 guest with kvmclock and migrate it to another host, then do s4 and resume, but guest failed to resume. i wait about 5 mins for it to resume, but failed. 
If do NOT implement migration, guest can do s4 and resume correctly with kvmclock on the local disk.
If add "-kvmclock", this problem does not exist.

isa-serial log will be attached.

Version-Release number of selected component (if applicable):
Host:
kernel-2.6.32-262.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.285.el6.x86_64
seabios-0.6.1.2-19.el6.x86_64

Guest:
kernel-2.6.32-262.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Boot guest on the src host:
 /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -uuid d782bf5c-e817-411b-a9cf-545ae7c0f101 -rtc base=localtime,driftfix=slew -m 2G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3-64 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/mnt/rhel6.3-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,serial=zhang,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,scsi=off -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:0b:00,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/tmp/socket-1,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -monitor stdio -boot c -qmp tcp:0:5555,server,nowait -spice port=5930,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -device qxl,id=video1,vram_size=67108864,bus=pci.0,addr=0x7 -device sga -device virtio-balloon-pci,id=balloon0,bus=pci.0,id=0x6 -bios /usr/share/seabios/bios-pm.bin  -chardev socket,path=/tmp/qzhang-test,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1


2. Boot guest on the dst host with "-incoming tcp:0:5800"

3. Migrate guest from src host to dst host:
(qemu)migrate -d tcp:$dst_host_ip:5800

4. After finish migration, check if guest works well and then do s4 inside guest:
#pm-hibernate

5. After guest process quit, boot it again on the dst host without "-incoming..." to resume guest.

  
Actual results:
Guest failed to resume from s4 after migration.

Expected results:
Guest should resume from s4 correctly.

Additional info:
(1)disable kvmclock, the problem does not exist.
(2)without migration, this problem does not exist even with kvmclock.
Comment 1 Qunfang Zhang 2012-04-28 05:16:25 EDT
Created attachment 580949 [details]
isa serial log during guest do s4 and resume
Comment 7 RHEL Product and Program Management 2012-07-10 02:30:05 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 8 RHEL Product and Program Management 2012-07-10 19:38:41 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 9 RHEL Product and Program Management 2012-07-20 09:40:48 EDT
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.
Comment 11 Qunfang Zhang 2012-08-08 04:09:11 EDT
Hi, Marcelo
I can still reproduce this issue on 2.6.32-279.el6.x86_64 & qemu-kvm-0.12.1.2-2.295.el6.x86_64 & seabios-0.6.1.2-19.el6.x86_64. 

Do you use the same command line in the bug description? 
And I tried local migration, can not reproduce. So need to test on two hosts to migrate guest.
Comment 12 Marcelo Tosatti 2012-08-08 08:11:53 EDT
(In reply to comment #11)
> Hi, Marcelo
> I can still reproduce this issue on 2.6.32-279.el6.x86_64 &
> qemu-kvm-0.12.1.2-2.295.el6.x86_64 & seabios-0.6.1.2-19.el6.x86_64. 
> 
> Do you use the same command line in the bug description? 
> And I tried local migration, can not reproduce. So need to test on two hosts
> to migrate guest.

No, i will try similar options now. Yes, i am using
different machines for migration.

In the meantime, please enable serial console output in
the guest (add console=ttyS0,115200 to relevant entry
in /boot/grub/menu.lst) and log the entire suspend/resume crash
please.

Also, when the guest crashes, record the output of 5 calls
to QEMU monitor command:

info registers

with 1 second or more space between the 5 commands.

Thanks
Comment 14 Marcelo Tosatti 2012-08-08 11:58:23 EDT
*** Bug 846479 has been marked as a duplicate of this bug. ***
Comment 16 Jarod Wilson 2012-08-24 15:27:29 EDT
Patch(es) available on kernel-2.6.32-301.el6
Comment 19 langfang 2012-12-25 01:33:53 EST
Reproduce this bug as follow version:
Host:
[root@localhost home]# uname -r
2.6.32-262.el6.x86_64
[root@localhost home]# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.295.el6.x86_64

Guest:
[root@localhost home]# uname -r
2.6.32-262.el6.x86_64


Steps:
1.Boot guest(use kvmclok) on the src host
#cat /sys/devices/system/clocksource/clocksource0/current_clocksource
kvm-clock
2.Boot guest on the dst host with "-incoming tcp:0:5999"

3.Migrate guest from src host to dst host:
(qemu)migrate -d tcp:$dst_host_ip:5999

4.After finish migration, do s4 inside guest:
#pm-hibernate

5.After guest process quit, boot it again on the dst host without "-incoming..." to resume guest.

Resutls:
Guest failed to resume from s4 after migration.

ACPI: Waking up from system sleep state S4
virtio-pci 0000:00:03.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
virtio-pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 10 (level, high) -> IRQ 10
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:512 sysfs_add_one+0xc9/0x130() (Not tainted)
Hardware name: KVM
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:04.0/virtio1/virtio-ports/vport0p1/name'
Modules linked in: fuse sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 uinput ppdev parport_pc parport microcode sg 8139too 8139cp mii virtio_console virtio_balloon i2c_piix4 i2c_core ext4 mbcache jbd2 sr_mod cdrom virtio_blk pata_acpi ata_generic ata_piix virtio_pci virtio_ring virtio dm_mirror dm_region_hash dm_log dm_mod [last unloaded: speedstep_lib]
Pid: 11, comm: events/0 Not tainted 2.6.32-262.el6.x86_64 #1
Call Trace:
 [<ffffffff8106b607>] ? warn_slowpath_common+0x87/0xc0
 [<ffffffff8106b6f6>] ? warn_slowpath_fmt+0x46/0x50
 [<ffffffff811f2319>] ? sysfs_add_one+0xc9/0x130
 [<ffffffff811f0602>] ? sysfs_add_file_mode+0x62/0xb0
 [<ffffffff811f38f1>] ? internal_create_group+0xc1/0x1a0
 [<ffffffff811f3a03>] ? sysfs_create_group+0x13/0x20
 [<ffffffffa01524c3>] ? control_work_handler+0x1a3/0x480 [virtio_console]
 [<ffffffffa0152320>] ? control_work_handler+0x0/0x480 [virtio_console]
 [<ffffffff8108c620>] ? worker_thread+0x170/0x2a0
 [<ffffffff81091f90>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff8108c4b0>] ? worker_thread+0x0/0x2a0
 [<ffffffff81091c26>] ? kthread+0x96/0xa0
 [<ffffffff8100c14a>] ? child_rip+0xa/0x20
 [<ffffffff81091b90>] ? kthread+0x0/0xa0
 [<ffffffff8100c140>] ? child_rip+0x0/0x20
---[ end trace b0e298390c2136e2 ]---
virtio-ports vport0p1: Error -17 creating sysfs device attributes
------------[ cut here ]------------
WARNING: at fs/sysfs/dir.c:512 sysfs_add_one+0xc9/0x130() (Tainted: G        W  ---------------   )
Hardware name: KVM
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:04.0/virtio1/virtio-ports/vport0p2/name'
Modules linked in: fuse sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 uinput ppdev parport_pc parport microcode sg 8139too 8139cp mii virtio_console virtio_balloon i2c_piix4 i2c_core ext4 mbcache jbd2 sr_mod cdrom virtio_blk pata_acpi ata_generic ata_piix virtio_pci virtio_ring virtio dm_mirror dm_region_hash dm_log dm_mod [last unloaded: speedstep_lib]
Pid: 11, comm: events/0 Tainted: G        W  ---------------    2.6.32-262.el6.x86_64 #1
Call Trace:
 [<ffffffff8106b607>] ? warn_slowpath_common+0x87/0xc0
 [<ffffffff8106b6f6>] ? warn_slowpath_fmt+0x46/0x50
 [<ffffffff811f2319>] ? sysfs_add_one+0xc9/0x130
 [<ffffffff811f0602>] ? sysfs_add_file_mode+0x62/0xb0
 [<ffffffff811f38f1>] ? internal_create_group+0xc1/0x1a0
 [<ffffffff811f3a03>] ? sysfs_create_group+0x13/0x20
 [<ffffffffa01524c3>] ? control_work_handler+0x1a3/0x480 [virtio_console]
 [<ffffffffa0152320>] ? control_work_handler+0x0/0x480 [virtio_console]
 [<ffffffff8108c620>] ? worker_thread+0x170/0x2a0
 [<ffffffff81091f90>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff8108c4b0>] ? worker_thread+0x0/0x2a0
 [<ffffffff81091c26>] ? kthread+0x96/0xa0
 [<ffffffff8100c14a>] ? child_rip+0xa/0x20
 [<ffffffff81091b90>] ? kthread+0x0/0xa0
 [<ffffffff8100c140>] ? child_rip+0x0/0x20
---[ end trace b0e298390c2136e3 ]---
virtio-ports vport0p2: Error -17 creating sysfs device attributes
virtio-pci 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
ata2.00: configured for MWDMA2
PM: Saving image data pages (128931 pages) ... done
PM: Wrote 515724 kbytes in 222.83 seconds (2.31 MB/s)
PM: S|
Suspending console(s) (use no_console_suspend to debug)

Verify this bug as follow version:
Host
[root@amd-4450b-4-2 ~]# uname -r
2.6.32-348.el6.x86_64
[root@amd-4450b-4-2 ~]# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-0.12.1.2-2.348.el6.x86_64
Guest:
2.6.32-351.el6.x86_64

The steps as same as reproduce

Results:
Form log ,can see resume S4 successfully.
....
ACPI: Waking up from system sleep state S4

virtio-pci 0000:00:03.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
virtio-pci 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
Restarting tasks ... done.
eth1: link up, 100Mbps, full-duplex, lpa 0x05E1


Verify CLI: /usr/libexec/qemu-kvm -cpu Opteron_G3 -M rhel6.4.0 -enable-kvm -m 8G -smp 4,sockets=2,cores=2,threads=1 -name rhel6.4-64 -uuid 231481d8-5fca-4b8f-a035-dd314cd5306b -nodefconfig -nodefaults -monitor stdio -rtc base=utc  -drive file=/mnt/RHEL-Server-6.3-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=bus1 -device scsi-hd,bus=bus1.0,drive=drive-virtio-disk0,id=virtio-scsi-pci0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet0,id=net0,mac=14:37:E6:97:58:89 -spice port=5840,disable-ticketing -vga qxl -device virtio-balloon-pci,id=balloon0,bus=pci.0 -chardev socket,path=/tmp/qzhang-test,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1  -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0

Addtional info:
1)Tried this tests about 10 times ,not hit any problem,guest work well.

According to above test ,this bug fixed.
Comment 21 errata-xmlrpc 2013-02-21 01:10:07 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0496.html

Note You need to log in before you can comment on or make changes to this bug.