From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 12 06:20:17 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E24137B404 for ; Sat, 12 Apr 2003 06:20:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3962343FE1 for ; Sat, 12 Apr 2003 06:20:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3CDKDUp060857 for ; Sat, 12 Apr 2003 06:20:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3CDKD9C060855; Sat, 12 Apr 2003 06:20:13 -0700 (PDT) Resent-Date: Sat, 12 Apr 2003 06:20:13 -0700 (PDT) Resent-Message-Id: <200304121320.h3CDKD9C060855@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andreas Klemm Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7847737B401 for ; Sat, 12 Apr 2003 06:10:15 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D98943FD7 for ; Sat, 12 Apr 2003 06:10:13 -0700 (PDT) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h3CDAAcx030466 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 12 Apr 2003 15:10:11 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost)h3CDA9l3030465; Sat, 12 Apr 2003 15:10:10 +0200 (CEST) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.9/8.12.8) with ESMTP id h3CD5EFu001455; Sat, 12 Apr 2003 15:05:19 +0200 (CEST) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.12.9/8.12.8/Submit) id h3CD5EXg001454; Sat, 12 Apr 2003 15:05:14 +0200 (CEST) Message-Id: <200304121305.h3CD5EXg001454@titan.klemm.apsfilter.org> Date: Sat, 12 Apr 2003 15:05:14 +0200 (CEST) From: Andreas Klemm To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: Kirk McKusick Subject: kern/50856: kernel panic if mounting /tmp as mfs with soft-updates (-U) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andreas Klemm List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 13:20:17 -0000 >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@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: