Subject: port-i386/16079: shutdown hangs the box
To: None <gnats-bugs@gnats.netbsd.org>
From: The Grey Wolf <greywolf@starwolf.com>
List: netbsd-bugs
Date: 03/26/2002 17:58:25
>Number:         16079
>Category:       port-i386
>Synopsis:       shutdown(8) causes the system to hang
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 26 17:59:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5ZC 21 March 2002
>Organization:
>Environment:
System: NetBSD rivendell.starwolf.com 1.5ZC NetBSD 1.5ZC (RIVENDELL) #12: Thu Mar 21 21:14:25 PST 2002 root@:/usr/src/sys/arch/i386/compile/RIVENDELL i386
Architecture: i386
Machine: i386
CPU: AMD Thunderbird 800MHz
MEM: 640MB PC100
Motherboard: Iwill KK266plus
Chipset: Via KT133
Periphery of consequence: Onboard ATA-100, PCI ATA-66 (Promise), 
	Intel i82557 Ethernet Rev 2; i82555 10-100 media interface Rev 0
>Description:
I just upgraded my MoBo to an IWill KK266plus, and my processor to a
smooth 800MHz AMD Thunderbird; chipset is VIA KT133.

I now suffer the hanging-while-shutting down bug I thought I'd seen
bandied about a while ago, and I'm interested to know if
	a) Anyone else has encountered this;
	b) anyone else with a *different* hardware setup has encountered this;
    and	c) there is a fix available.

If I type "shutdown -r" or "shutdown -h", eventually it does so, but
before doing so it is unable to sync the disks and all the filesystems
end up being marked dirty (hence a 6-minute reboot while waiting for
fsck to finish).

If I type simply "shutdown" [all shutdowns with appropriate time
parameters], my X server goes poof (yea), my rc.shutdown runs (yea),
taking with it just about everything...

...and then it hangs.

When I break to ddb and ps, I note that there are random things hanging
on a vplock or a vnlock; syslogd seems to be one of them, but rpcbind
was the one hanging before I added "KEYWORD: shutdown" to it (and others
in hopes of avoiding the hang).  The process(es) do not respond to a
kill from ddb, and I never reach single-user mode.

Yes, I have NFS mounts when the machine goes down; I expect that it will
be able to umount them.

Interestingly enough, if I do a 'kill 1', it seems to eventually get to
single-user mode, but I had to make sure I ran rc.shutdown by hand first
and then kill off some other things.
>How-To-Repeat:
	From multi-user mode:  shutdown now
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: