Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145683 - XEN: System (Dom0) shutdown/reboot fails if domU hangs
Summary: XEN: System (Dom0) shutdown/reboot fails if domU hangs
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-31 02:00 UTC by Andreas Gerstenberg
Modified: 2011-03-26 11:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for /etc/init.d/xendomains (xendomains-init.patch,823 bytes, patch)
2006-08-31 02:02 UTC, Andreas Gerstenberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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