Subject: kern/8209: Reboot fails with union mounts
To: None <gnats-bugs@gnats.netbsd.org>
From: Gary Duzan <gary@wheel.tiac.net>
List: netbsd-bugs
Date: 08/15/1999 07:58:54
>Number:         8209
>Category:       kern
>Synopsis:       Reboot fails with union mounts
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 15 07:20:00 1999
>Last-Modified:
>Originator:     Gary Duzan
>Organization:
	Not a whole lot
>Release:        Sat Aug 14, 1999 current
>Environment:
System: NetBSD wheel 1.4J NetBSD 1.4J (WHEEL) #0: Sat Aug 14 21:21:47 EDT 1999 gary@wheel:/disk1/src/sys/arch/i386/compile/WHEEL i386


>Description:
	Since moving to a 1.4J kernel I have been unable to reboot
	with union mounts in place. The process gets to "syncing disks...
	4 4 done", then hangs. Popping into ddb shows only reboot and
	the kernel threads running, and reboot has the following trace:

		bpendsleep
		bpendsleep
		vfs_busy
		getnewvnode
		union_allocvp
		union_root
		union_unmount
		dounmount
		vfs_unmountall
		vfs_shutdown
		cpu_reboot
		sys_reboot
		syscall

	The problem appears to be that dounmount() sets the MNT_UNMOUNT
	flag and vfs_busy() waits for it to be unset, leaving it to spin
	forever. Normal union unmounts work normally, though.
>How-To-Repeat:
	Set up file systems like this:

/dev/ccd0a /disk1 lfs rw 0 2
/usr/src /disk1/src union rw,-b
/usr/pkgsrc /disk1/pkgsrc union rw,-b
/usr/xsrc /disk1/xsrc union rw,-b

	and try to reboot.
>Fix:
	I would if I could, but I can't, so I won't.
	Please forgive me if I don't.
	I want the simple fact understood:
	I would if I could, yes I would, but I can't, so I won't.

				      -- The Electric Company
>Audit-Trail:
>Unformatted: