From owner-freebsd-bugs@FreeBSD.ORG Sun Jul 16 02:00:33 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 A692716A4E5 for ; Sun, 16 Jul 2006 02:00:33 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE08943D5A for ; Sun, 16 Jul 2006 02:00:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6G20Wiu087326 for ; Sun, 16 Jul 2006 02:00:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6G20Wjt087325; Sun, 16 Jul 2006 02:00:32 GMT (envelope-from gnats) Resent-Date: Sun, 16 Jul 2006 02:00:32 GMT Resent-Message-Id: <200607160200.k6G20Wjt087325@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, "Stephen J. Roznowski" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A93E316A4DD for ; Sun, 16 Jul 2006 01:55:02 +0000 (UTC) (envelope-from sjr@comcast.net) Received: from alnrmhc11.comcast.net (alnrmhc13.comcast.net [206.18.177.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34E5243D45 for ; Sun, 16 Jul 2006 01:55:02 +0000 (GMT) (envelope-from sjr@comcast.net) Received: from istari.comcast.net (c-69-139-159-113.hsd1.md.comcast.net[69.139.159.113](misconfigured sender)) by comcast.net (alnrmhc13) with ESMTP id <20060716015501b1300fpgjke>; Sun, 16 Jul 2006 01:55:01 +0000 Received: from istari.comcast.net (localhost [127.0.0.1]) by istari.comcast.net (8.13.6/8.13.6) with ESMTP id k6G1t0VF076032 for ; Sat, 15 Jul 2006 21:55:00 -0400 (EDT) (envelope-from sjr@istari.comcast.net) Received: (from sjr@localhost) by istari.comcast.net (8.13.6/8.13.6/Submit) id k6G1t0dU076031; Sat, 15 Jul 2006 21:55:00 -0400 (EDT) (envelope-from sjr) Message-Id: <200607160155.k6G1t0dU076031@istari.comcast.net> Date: Sat, 15 Jul 2006 21:55:00 -0400 (EDT) From: "Stephen J. Roznowski" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/100365: snapshots on busy filesystem fail X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Stephen J. Roznowski" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2006 02:00:33 -0000 >Number: 100365 >Category: kern >Synopsis: snapshots on busy filesystem fail >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 16 02:00:31 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Stephen J. Roznowski >Release: FreeBSD 6.1-STABLE amd64 >Organization: >Environment: System: FreeBSD 6.1-STABLE FreeBSD 6.1-STABLE #3: Sat Jul 8 22:34:39 EDT 2006 >Description: Taking snapshots while creating/deleting directories leads to corrupted snapshots. >How-To-Repeat: I'm running the following script as root: #!/bin/sh FS=/usr/ports for i in 1 2 3 4 5 6 7 8 9 10 do echo $i mksnap_ffs $FS $FS/.snap/snapshot fsck_ffs $FS/.snap/snapshot /bin/rm -f $FS/.snap/snapshot done If the filesystem is quiet, the script completes without errors. In another window, I'm running the following: # mkdir /usr/ports/.a # cd /usr/ports/.a # while (1) > mkdir a b c d e f g h i j k l m n o p > rmdir a b c d e f g h i j k l m n o p > sleep 1 > end Now, when I run the previous script, occasionally I'll get snapshots that are corrupt when the fsck is checking them. [Appears to be about 50% of the time....] Additionally, I'm seeing the following error: mksnap_ffs: Cannot create /usr/ports/.snap/snapshot: Resource temporarily unavailable /usr/ports/.snap/snapshot is not a disk device and dmesg shows: fsync: giving up on dirty 0xffffff002fcee9b0: tag devfs, type VCHR usecount 1, writecount 0, refcount 635 mountedhere 0xffffff0000e7c600 flags () v_object 0xffffff002ff5a460 ref 0 pages 2556 lock type devfs: EXCL (count 1) by thread 0xffffff002ac52260 (pid 71385) dev ad0s1f fsync: giving up on dirty 0xffffff002fcee9b0: tag devfs, type VCHR usecount 1, writecount 0, refcount 634 mountedhere 0xffffff0000e7c600 flags () v_object 0xffffff002ff5a460 ref 0 pages 2552 lock type devfs: EXCL (count 1) by thread 0xffffff002ac52260 (pid 71385) dev ad0s1f I can provide more system configuration details if needed. >Fix: >Release-Note: >Audit-Trail: >Unformatted: