Subject: bin/10637: shutdown can stick if rc.shutdown does
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <dolecek@ns.monte.cz>
List: netbsd-bugs
Date: 07/20/2000 05:02:25
>Number:         10637
>Category:       bin
>Synopsis:       shutdown can stick if rc.shutdown does
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 20 05:03:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jaromir Dolecek
>Release:        NetBSD-1.5_ALPHA (last i386 snapshot)
>Organization:
	IBIS Informational Systems, a.s.
>Environment:
	
System: NetBSD ns.monte.cz 1.5_ALPHA NetBSD 1.5_ALPHA (PROXY1) #14: Tue Jul 18 13:42:33 MEST 2000 dolecek@ns.monte.cz:/usr/home/dolecek/src/sys/arch/i386/compile/PROXY1 i386


>Description:
	shutdown calls /etc/rc.shutdown via system(3), e.g. synchronously.
	It does nothing to continue shutdown if rc.shutdown gets stuck
	for whatever reason (shutdown waits for it to finish).
>How-To-Repeat:
	mount SMB share via rumba, which for whatever reason gets stuck
	watch unrumba fail (stick too)
	brush hair and decide to do a shutdown (and debug the issue later)
	watch shutdown  count until zero, run shutdown hooks and do nothing
		after "Unmounting all filesystems" message is printed
>Fix:
	add an some alarm(2) calls and handlers in shutdown(8), so
	that there would be some reasonable period after which
	shutdown would continue whether or not rc.shutdown finished
	or not

	Man, I though this has been handled when the shutdown hooks
	were added!

	This is more or less a reminder, in case someone else would
	get to fix this sooner than me :)
>Release-Note:
>Audit-Trail:
>Unformatted: