Subject: bin/17945: rc and rc.shutdown have problems with rc_fast_and_loose
To: None <gnats-bugs@gnats.netbsd.org>
From: None <greywolf@starwolf.com>
List: netbsd-bugs
Date: 08/14/2002 22:09:44
>Number: 17945
>Category: bin
>Synopsis: rc and rc.shutdown have problems with rc_fast_and_loose
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 14 22:10:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6D-20010715
>Organization:
Star Wolf Innovations/West Hyperspace Productions
>Environment:
System: NetBSD rivendell.starwolf.com 1.6D NetBSD 1.6D (RIVENDELL) #16: Mon Jul 29 15:56:46 PDT 2002 greywolf@rivendell.starwolf.com:/usr/src/sys/arch/i386/compile/RIVENDELL i386
Architecture: i386
Machine: i386
>Description:
rc: if rc_fast_and_loose is set to NO, it is the same effect as
if it were set to YES.
rc.shutdown: if rc_fast_and_loose is set, rc.shutdown will abort
prematurely if any of the shutdown scripts exit non-zero.
This can leave processes hung in vnlock, preventing init
from recovering and granting a single-user shell.
>How-To-Repeat:
in /etc/rc.conf: rc_fast_and_loose=NO
exit from single-user shell
shutdown now
wait (interminably); exit to ddb and ps. Note processes hung on
vnlock. These processes will keep a single-user shell from
getting there. This is arguably the wrong way to fix this,
putting "# KEYWORD: shutdown" in the rc script, but it is
certainly the most painless at the moment.
By the way, you will now have to sync, discover that your
machine will not sync, reboot and wait for fsck to finish.
>Fix:
--- /etc/defaults/rc.conf Wed Aug 14 21:57:11 2002
+++ /etc/defaults/rc.conf.orig Sat Jul 13 21:12:39 2002
@@ -26,8 +26,6 @@
# NOTE: USE THIS AT YOUR OWN RISK; A ROGUE COMMAND
# MAY INADVERTENTLY PREVENT BOOT TO MULTIUSER.
#
-# MUST BE EMPTY IF YOU DO NOT WISH TO USE IT -- rc_fast_and_loose=NO
-# WILL BEHAVE THE SAME AS rc_fast_and_loose=YES!!!
#rc_fast_and_loose=YES
# Additional flags to the rcorder(8) that's run by /etc/rc.
--- rc.shutdown Wed Aug 14 22:00:18 2002
+++ rc.shutdown.orig Wed Aug 14 21:59:33 2002
@@ -18,9 +18,6 @@
echo "Skipping shutdown hooks."
exit 0
fi
-# rc_fast_and_loose CANNOT be set with shutdown or it will fail to run
-# everything it is supposed to if anything exits badly.
-rc_fast_and_loose=
stty status '^T'
>Release-Note:
>Audit-Trail:
>Unformatted: