kern/50856: kernel panic if mounting /tmp as mfs with soft-updates (-U)

Andreas Klemm andreas at FreeBSD.org
Sat Apr 12 06:20:17 PDT 2003


>Number:         50856
>Category:       kern
>Synopsis:       kernel panic if mounting /tmp as mfs with soft-updates (-U)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 12 06:20:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Klemm
>Release:        FreeBSD-4.8
>Organization:
FreeBSD
>Environment:

System: FreeBSD titan.klemm.apsfilter.org 4.8-STABLE FreeBSD 4.8-STABLE #0: Mon Apr 7 22:35:56 CEST 2003 root at titan.klemm.apsfilter.org:/usr/src/sys/compile/TITAN i386


>Description:

	mounting /tmp as memory filesystem with softupdates enabled
	crashes machine within ~10-20 seconds, even with no load in
	single user mode.

	panic: handle_written_filepage: not started
	syncing disks ... 19 6 6 6 6 6 6 6 9 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...
	0xcc5d66e0 1: dev:MFS3, flags= ...
	...        2: dev:MFS3, flags= ...
	...        3: dev:MFS3, flags= ...

	on 2nd mount attempt after powercycle and fsck:
	panic: handle_written_filepage: not started
	syncing disks ... 19 6 6 6 6 6 6 6 9 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...
	...        1: dev:MFS0, flags= ...
	...        2: dev:MFS0, flags= ...
	...        3: dev:MFS0, flags= ...

	mounting /tmp as memory fs *without* soft-updates causes no
	problem. Thats what I use since months and years.

	Question arises for me personally,
	- if this has to be fixed somewhere in kernel, so that -U can be
	  used as valid mount option for mfs, no matter if it makes
	  real sense or not (could one think of any benefit regarding
	  speed)
	- or if soft-updates can't be used "by design" for memory
	  filesystems.

	In the latter case then -U should simply be ignored when being
	used together with a memfs and produce a warning on execution
	so that people take -U out of fstab (so that no system instability
	arises in the future, if it doesn't crash immediately).

	I don't know if the panic comes so quickly on every machine,
	I have a PIII, 1 GHz, 512GB DRAM.

	My kernel config, if its of interest for you

#
# TITAN
#
machine		i386
cpu		I686_CPU
ident		TITAN
maxusers	0

options 	INCLUDE_CONFIG_FILE     # Include this file in kernel

# Power management support (see LINT for more options)
device		apm0	at nexus?

options		RANDOM_IP_ID
options 	ICMP_BANDLIM
options 	NSWAPDEV=2

options 	INET			#InterNETworking
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	SOFTUPDATES		#Enable FFS soft updates support
options 	UFS_DIRHASH		#Improve performance on big directories
options 	MFS			#Memory Filesystem
options 	MD_ROOT			#MD is a potential root device
options 	CD9660			#ISO 9660 Filesystem
options 	CD9660_ROOT		#CD-ROM usable as root, CD9660 required
options 	PROCFS			#Process filesystem
options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
options 	SCSI_DELAY=8000		#Delay (in ms) before probing SCSI
options 	UCONSOLE		#Allow users to grab the console
options 	KTRACE			#ktrace(1) support
options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores
options 	P1003_1B		#Posix P1003_1B real-time extensions
options 	_KPOSIX_PRIORITY_SCHEDULING
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options		CPU_ENABLE_SSE
options		USER_LDT
options 	QUOTA

options 	SHOW_BUSYBUFS	# List buffers that prevent root unmount

device		isa
device		pci

# Floppy drives
device		fdc0	at isa? port IO_FD1 irq 6 drq 2
device		fd0	at fdc0 drive 0

# ATA and ATAPI devices
device		ata0	at isa? port IO_WD1 irq 14
device		ata1	at isa? port IO_WD2 irq 15
device		ata
device		atadisk		# ATA disk drives
device		atapicd		# ATAPI CDROM drives
device		atapicam	# emulate ATAPI devices as SCSI ditto via CAM
options 	ATA_STATIC_ID	#Static device numbering

# SCSI Controllers
device		ahc		# AHA2940 and onboard AIC7xxx devices
options 	AHC_ALLOW_MEMIO

# SCSI peripherals
device		scbus		# SCSI bus (required)
#device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		pass		# Passthrough device (direct SCSI access)
device		pt		#

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc0	at isa? port IO_KBD
device		atkbd0	at atkbdc? irq 1 flags 0x1
device		psm0	at atkbdc? irq 12

device		vga0	at isa?

# splash screen/screen saver
pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? flags 0x100
options 	MAXCONS=4		# number of virtual consoles
options 	VESA
makeoptions	SC_DFLT_FONT=german.iso
options 	SC_HISTORY_SIZE=512	# number of history buffer lines

# Floating point support - do not disable.
device		npx0	at nexus? port IO_NPX irq 13

# Serial (COM) ports
device		sio0	at isa? port IO_COM1 flags 0x10 irq 4

# Parallel port
#device		ppc0	at isa? irq 7
#device		ppbus		# Parallel port bus (required)
#device		lpt		# Printer
#device		ppi		# Parallel port interface device

device		miibus		# MII bus support
device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)

device		pcm		# SOUND

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		usb		# USB Bus (required)
device		ugen		# Generic
device		uhid		# "Human Interface Devices"
device		ulpt		# Printer
#device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse
device		uscanner	# Scanners

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device	loop		# Network loopback
pseudo-device	ether		# Ethernet support
pseudo-device	pty		# Pseudo-ttys (telnet etc)
pseudo-device	md		# Memory "disks"
pseudo-device	bpf		#Berkeley packet filter
pseudo-device	vn		#Vnode driver (turns a file into a device)
pseudo-device	md		#Memory/malloc disk
pseudo-device	snp	3	#Snoop device - to look at pty/vty/etc..

>How-To-Repeat:

	mount /tmp as memfs with soft-updates enabled in single user mode.

	root# umount /tmp
	root# vi /etc/fstab
		/dev/ad0s2b /tmp mfs rw,-U 0 0
	root# mount /tmp

	Wait for about 10 seconds ... -> panic

>Fix:

	No patch or workaround.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list