Bug 560577

Summary: Second save (after successful restore) or second migrate of the same HVM domain not working
Product: Red Hat Enterprise Linux 5 Reporter: Michal Novotny <minovotn>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: areis, mrezanin, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-03 12:50:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Novotny 2010-02-01 08:56:50 UTC
Description of problem:
When you save the domain, restore it and save it again, the Xen daemon is stuck. The same with migrations.

Version-Release number of selected component (if applicable):
xen-3.0.3-103.el5 (but tested and not working even with xen-3.0.3-80.el5 and xen-3.0.3-94.el5)
kernel-xen-2.6.18-185.el5 (but tested and not working even with kernel-xen.2.6.18-128.el5 and kernel-xen.2.6.18-156.el5)

How reproducible:
100%

Steps to Reproduce:
1. xm create HVM guest
2. xm save guest /path/to/file
3. xm restore /path/to/file
4. xm save guest /path/to/file

-- or --

1. xm create HVM guest
2. xm migrate guest another_host
(on another host: poweroff the guest)
(on original host: repeat steps 1 and 2 - it's stuck now)
 
Actual results:
The save/migrate is stuck with "XendDomainInfo.handleShutdownWatch" message:
DEBUG (XendCheckpoint:92) In saveInputHandler suspend
DEBUG (XendCheckpoint:94) Suspending 2 ...
DEBUG (XendDomainInfo:1246) XendDomainInfo.handleShutdownWatch
in /var/log/xen/xend.log file. You have to break save/migrate with Ctrl+C since Xen daemon is stuck...

Expected results:
Second iteration of save/migrate is working fine with following xend.log contents:
DEBUG (XendCheckpoint:92) In saveInputHandler suspend
DEBUG (XendCheckpoint:94) Suspending 2 ...
[2010-01-29 11:39:34 xend.XendDomainInfo 13942] INFO (XendDomainInfo:1209) Domain has shutdown: name=migrating-rhel5u4-64.guesthvm id=20 reason=suspend.
INFO (XendCheckpoint:105) Domain 20 suspended.
INFO (XendCheckpoint:110) _releaseDevices for hvm domain
INFO (image:482) use sigusr1 to signal qemu 14110
DEBUG (XendCheckpoint:114) Written done
...

Additional info:
I've been investigating this and it seems that dominfo['shutdown'] is not set to 1 for the second iteration and dominfo['shutdown_reason'] is not set appropriately as well. More information can be found in bug 557446#c7 ...

Comment 5 Miroslav Rezanina 2010-02-03 11:10:32 UTC
Michal,
which images do you test this problem with?

Comment 6 Miroslav Rezanina 2010-02-03 12:50:16 UTC
Tested on images for bz 555910. This images are frozen after restore (migration/save). Calling save on this images can't be successfull - images do not react on shutdown command.

*** This bug has been marked as a duplicate of bug 555910 ***

Comment 7 Paolo Bonzini 2010-04-08 15:48:50 UTC
This bug was closed during 5.5 development and it's being removed from the internal tracking bugs (which are now for 5.6).