Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 848272

Summary: Guest failed to resume from S4 after migration
Product: Red Hat Enterprise Linux 5 Reporter: FuXiangChun <xfu>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9CC: amit.shah, chayang, flang, juzhang, michen, mkenneth, rhod, sluo, virt-maint, wdai
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 04:06:44 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:
Attachments:
Description Flags
serial log none

Description FuXiangChun 2012-08-15 05:44:52 UTC
Description of problem:
Boot a rhel5.8z guest and migrate it to another host, then do s4 and resume, but guest failed to resume. guest will hang,If do NOT implement migration, guest can do s4 and resume correctly.

isa-serial log will be attached.

Version-Release number of selected component (if applicable):
# uname -r
2.6.18-336.el5
# rpm -qa|grep kvm
kvm-83-259.el5


How reproducible:
100%

Steps to Reproduce:
1.boot guest in src host
/usr/libexec/qemu-kvm -m 4G -smp 4,cores=2,threads=2,sockets=1 -M rhel5.6.0 -cpu qemu64,+sse2,-kvmclock -name sounddevice -drive file=/root/mnt/rhel5.9.qcow2,format=qcow2,media=disk,if=ide,cache=none,werror=stop,boot=on -net nic,vlan=1,model=rtl8139,macaddr=00:25:64:FD:22:1a -net tap,sndbuf=0,vlan=1,script=/etc/qemu-ifup,downscript=no -uuid cb7f4a37-7936-4e10-8f9e-5c7f8251723f -serial unix:/tmp/ttyS0,server,nowait -usbdevice tablet -soundhw ac97 -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -boot dc -balloon none -vnc :1

2. Boot guest on the dst host with "-incoming tcp:0:555"
# /usr/libexec/qemu-kvm -m 4G -smp 4,cores=2,threads=2,sockets=1 -M rhel5.6.0 -cpu qemu64,+sse2,-kvmclock -name sounddevice -drive file=/root/mnt/rhel5.9.qcow2,format=qcow2,media=disk,if=ide,cache=none,werror=stop,boot=on -net nic,vlan=1,model=rtl8139,macaddr=00:25:64:FD:22:1a -net tap,sndbuf=0,vlan=1,script=/etc/qemu-ifup,downscript=no -uuid cb7f4a37-7936-4e10-8f9e-5c7f8251723f -serial unix:/tmp/ttyS0,server,nowait -usbdevice tablet -soundhw ac97 -no-hpet -rtc-td-hack -no-kvm-pit-reinjection -monitor stdio -boot dc -balloon none -vnc :1 -incoming tcp:0:555

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

4.After finish migration, check if guest works well and then do s4 inside guest:
#pm-hibernate or #echo disk >/sys/power/state

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)rhel5 default enable kvmclock.
(2)without migration, this problem does not exist.

Comment 1 FuXiangChun 2012-08-15 05:48:49 UTC
Created attachment 604502 [details]
serial log

Comment 2 FuXiangChun 2012-08-15 05:49:53 UTC
rhel6 has the same bug https://bugzilla.redhat.com/show_bug.cgi?id=817243

Comment 3 FuXiangChun 2012-08-15 06:15:57 UTC
rhel5.8GA guest has the same issue too.

Comment 4 langfang 2012-08-15 08:58:49 UTC
test

# uname -r
2.6.18-336.el5
# rpm -qa|grep kvm
kvm-83-259.el5

guest: win7-sp1-x86_64  

after migration--->S4--->resume successfully.

Comment 5 Amit Shah 2012-08-16 04:06:44 UTC
We've disabled s3/s4 in RHEL5 guests in bug 834511, and we won't backport any kvmclock patches specifically for the s3/s4 case.

Comment 6 FuXiangChun 2012-08-17 07:34:10 UTC
(In reply to comment #5)
> We've disabled s3/s4 in RHEL5 guests in bug 834511, and we won't backport
> any kvmclock patches specifically for the s3/s4 case.

Amit, 
 Since I run guest with IDE no virtio. so kvm shouldn't disabed s3/s4.
 Guest default enable kvmclock in rhel5 host.  you mean kvmclock cause this issue,right?

Comment 7 Amit Shah 2012-08-17 07:42:47 UTC
Yes, it's a kvmclock issue.  Ronen, should we backport kvmclock fixes to rhel5?  Preventing s3/s4 when only kvmclock is active can be tricky, but doable.

However, considering we won't have too many customers not using virtio, this can be regarded as a low-prio thing to look at.

Comment 8 Ronen Hod 2012-08-19 07:49:44 UTC
I agree that the bug's specifics are not typical with our customers (no virtio, S4 in guest + migration).
Since RHEL5 customers probably stick to their current settings, Let's not make such changes until we really have to.
Thanks, Ronen.