Subject: kern/8964: panic on reboot(2) if an LFS is mounted read-only
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itohy@netbsd.org>
List: netbsd-bugs
Date: 12/06/1999 22:48:46
>Number:         8964
>Category:       kern
>Synopsis:       panic on reboot(2) if an LFS is mounted read-only
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec  6 22:48:00 1999
>Last-Modified:
>Originator:     ITOH Yasufumi
>Organization:
	
>Release:        1.4P (Dec. 3, 1999)
>Environment:
System: NetBSD 1.4P NetBSD 1.4P (ACHA.elf) #20: Sun Dec 5 14:55:44 JST 1999 itohy@pino.my.domain:/usr/src/sys/arch/x68k/compile/ACHA.elf x68k

no SOFTDEP in the kernel config.


>Description:
	The system panic()s on reboot if
	 1. an LFS is mounted, and
	 2. the filesystem is read-only.

	This problem seems to be introduced by the softdep merge.

>How-To-Repeat:
	Mount an LFS in read-only mode and reboot the system.
	Here's an example when the root filesystem is an LFS.

	# mount
	root_device on / type lfs (local, read-only)
	# reboot
	Dec  6 08:29:42 init: kernel security level changed from 0 to 1
	syncing disks... panic: bawrite LFS buffer
	Stopped in reboot at	cpu_Debugger+0x6:	unlk	a6
	db> trace
	cpu_Debugger(2004,1,2710,519c00,54fc54) + 6
	panic(116d2c,54fe68,45bd8,54fe60,12abd4) + 56
	lfs_bwrite(54fe60,12abd4,519c00,54fe9c,4bd16) + 1c
	bawrite(519c00) + 36
	vfs_shutdown(54ff3c,300e0,0,0,0) + be
	cpu_reboot(0,0,0,530640,1) + 3c
	sys_reboot(530640,54ff88,54ff80) + 52
	syscall(d0) + 196
	trap0() + e
	db>

>Fix:
	Unknown.
	LFS buffers should not be marked asynchronous.

>Audit-Trail:
>Unformatted: