From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 31 12:40:03 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9806916A4B3 for ; Wed, 31 Oct 2007 12:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6D99C13C4BB for ; Wed, 31 Oct 2007 12:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9VCe38u033347 for ; Wed, 31 Oct 2007 12:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9VCe3oH033346; Wed, 31 Oct 2007 12:40:03 GMT (envelope-from gnats) Resent-Date: Wed, 31 Oct 2007 12:40:03 GMT Resent-Message-Id: <200710311240.l9VCe3oH033346@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, "Matthew D. Fuller" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D627016A47C for ; Wed, 31 Oct 2007 12:37:46 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from optimus.centralmiss.com (ns.centralmiss.com [206.156.254.79]) by mx1.freebsd.org (Postfix) with ESMTP id A873F13C48A for ; Wed, 31 Oct 2007 12:37:46 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (adsl-072-148-013-213.sip.jan.bellsouth.net [72.148.13.213]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by optimus.centralmiss.com (Postfix) with ESMTP id 04A8A28433 for ; Wed, 31 Oct 2007 07:37:32 -0500 (CDT) Received: from mortis.over-yonder.net (mortis [10.20.30.2]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by draco.over-yonder.net (Postfix) with ESMTP id 8DA6F61C41 for ; Wed, 31 Oct 2007 07:37:31 -0500 (CDT) Received: by mortis.over-yonder.net (Postfix, from userid 100) id CC66220F25; Wed, 31 Oct 2007 07:37:30 -0500 (CDT) Message-Id: <20071031123730.CC66220F25@mortis.over-yonder.net> Date: Wed, 31 Oct 2007 07:37:30 -0500 (CDT) From: "Matthew D. Fuller" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/117716: Remount can corrupt filesystems and lock them mounted X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Matthew D. Fuller" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 12:40:04 -0000 >Number: 117716 >Category: kern >Synopsis: Remount can corrupt filesystems and lock them mounted >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 31 12:40:03 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Matthew D. Fuller >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD mortis.sighup.org 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Oct 27 12:13:10 CDT 2007 root@mortis.sighup.org:/usr/ports/KERNELOBJ/sys/MORTIS i386 >Description: Attempting to remount a filesystem fails to flush its outstanding buffers, and spews out errors like softdep_waitidle: Failed to flush worklist for 0xc3b60d0c Once this occurs the filesystem can't be re-mounted, can't be umount'd, and can't be umount -f'd. Any attempt to do so will elicit a repeat of the softdep_waitidle message. Reboot won't cleanly unmount it either. Post-reboot fscking turns up a lot of errors. Using umount instead of mount -u doesn't provoke it (or at least, does so MUCH less often; mount -u does it reliably). If filesystem is made without softupdates, it also doesn't occur. This has been going on for at least a year in -CURRENT, and so it's probably in RELENG_7 too. See previous reports like >How-To-Repeat: NOTE: Running this script will produce a mounted filesystem on /mnt that can't be gotten rid of without rebooting. No additional instability has ever been observed from this, but be warned. #!/bin/sh -ex # Make file rm -f /tmp/fs dd if=/dev/zero of=/tmp/fs bs=1m count=20 # Make vnode mdconfig -a -t vnode -f /tmp/fs -u 10 # Make the filesystem newfs -U /dev/md10 # Mount mount /dev/md10 /mnt # Make the big tree mtree -deU -f /etc/mtree/BSD.usr.dist -p /mnt/ >> /dev/null # Sync up sync ; sync ; sync # Now blow it away rm -rf /mnt/* # This works... #umount /mnt # But this doesn't mount -u -o ro /mnt # BOOM. >Fix: >Release-Note: >Audit-Trail: >Unformatted: