Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 145683

Summary: XEN: System (Dom0) shutdown/reboot fails if domU hangs
Product: Gentoo Linux Reporter: Andreas Gerstenberg <andy+gentoo>
Component: New packagesAssignee: Gentoo Xen Devs <xen>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: stefan, wschlich
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for /etc/init.d/xendomains

Description Andreas Gerstenberg 2006-08-31 02:00:45 UTC
During Dom0 shutdown/reboot, the /etc/init.d/xendomain script uses "xm shutdown --wait ${domU}". If "xm" can't shutdown the DomU, the complete shutdown procedure hangs and the system will not shutdown/reboot.

Patch applied for /etc/init.d/xendomains:

/etc/init.d/xendomains waits up to ${SHUTDOWN_TIMEOUT} seconds to shutdown a DomU domain and if the DomU is still running, it will be destroyed.
If the DomU will not be destroyed, "/etc/init.d/xend stop" hangs later in the shutdown procedure on Dom0 (different reason, same result ;-)

${SHUTDOWN_TIMEOUT} can be configured in /etc/conf.d/xendomains. If not, 60 seconds are assumed.
Comment 1 Andreas Gerstenberg 2006-08-31 02:02:34 UTC
Created attachment 95535 [details, diff]
Patch for /etc/init.d/xendomains
Comment 2 Alexander Wigen 2007-05-03 13:18:37 UTC
Thanks for a very nice patch, only thing is that 60 seconds might be a bit low for a default value. Squid for example takes a long time to shut down.

Cheers
Comment 3 Micheal Marineau (RETIRED) gentoo-dev 2007-05-03 16:53:08 UTC
I'll include this in next time I update of xen-tools-3.0.4, probably with a default limit of 5 minutes.
Comment 4 Stefan de Konink 2008-09-05 02:58:48 UTC
(In reply to comment #3)
> I'll include this in next time I update of xen-tools-3.0.4, probably with a
> default limit of 5 minutes.

Maybe get it into 3.3? Next to this it is terribly difficult for me to reboot/shutdown Xen. A timer solution that really kicks it would be nice. (I'll try the sysrq magic too)
Comment 5 Alexey Shvetsov archtester gentoo-dev 2011-03-26 11:20:42 UTC
Xen 4.1 in tree. Please test with it and reopen if it doesnt work