From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 21 07:10:16 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 1B85D16A401 for ; Tue, 21 Mar 2006 07:10:16 +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 8042243D45 for ; Tue, 21 Mar 2006 07:10:15 +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 k2L7AF7T074926 for ; Tue, 21 Mar 2006 07:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2L7AFWk074925; Tue, 21 Mar 2006 07:10:15 GMT (envelope-from gnats) Resent-Date: Tue, 21 Mar 2006 07:10:15 GMT Resent-Message-Id: <200603210710.k2L7AFWk074925@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, John Kozubik Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E5E516A420 for ; Tue, 21 Mar 2006 07:03:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90BA743D49 for ; Tue, 21 Mar 2006 07:03:20 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k2L73KA1078300 for ; Tue, 21 Mar 2006 07:03:20 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k2L73KeK078299; Tue, 21 Mar 2006 07:03:20 GMT (envelope-from nobody) Message-Id: <200603210703.k2L73KeK078299@www.freebsd.org> Date: Tue, 21 Mar 2006 07:03:20 GMT From: John Kozubik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/94769: Multiple file deletions on multi-snapshotted filesystems causes hang X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 07:10:16 -0000 >Number: 94769 >Category: kern >Synopsis: Multiple file deletions on multi-snapshotted filesystems causes hang >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 21 07:10:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: John Kozubik >Release: FreeBSD 6.1-BETA4 >Organization: www.kozubik.com >Environment: FreeBSD test.kozubik.com 6.1-BETA4 FreeBSD 6.1-BETA4 #0: Tue Mar 14 13:59:38 UTC 2006 root@wv1u.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 >Description: If you have a UFS2 filesystem with multiple snapshots on it, and commence several processes of rapid file deletions on that filesystem, the system will hang. I first produced this problem on a system that had a filesystem with six snapshots enabled on it. I proceeded to start three concurrent `rm` processes of directories with large numbers of files in them (on that filesystem). The system hung as a result. Further testing showed that in the exact same environment, three such `rm` processes did not hang a system when the filesystem in question only had two snapshots. I incremented the number of snapshots to 3, and the system hung when the same three `rm` processes were performed. It is possible that any ratio of a large number of snapshots to a large number of intensive file deletions on the filesystem that is snapshotted will cause the system to hang. For instance, one snapshot and ten file deletion processes, or perhaps ten snapshots and two file deletion processes. I have not tested any further combinations than the ones listed above. I am highly confident that this behavior exists and is reproducible. I have reproduced this behavior on both 6.0 and 6.1. >How-To-Repeat: (assume a filesystem mounted on /mnt/data1) cp -R /usr/src /mnt/data1/test1 cp -R /usr/src /mnt/data1/test2 cp -R /usr/src /mnt/data1/test3 mksnap_ffs /mnt/data1 /mnt/data1/.sync/snap1 mksnap_ffs /mnt/data1 /mnt/data1/.sync/snap2 mksnap_ffs /mnt/data1 /mnt/data1/.sync/snap3 rm -rf /mnt/data1/test1 & rm -rf /mnt/data1/test2 & rm -rf /mnt/data1/test3 & (system will hang) >Fix: Do not use UFS2 snapshots. It is unreasonable to assume that concurrent rapid file deletions will not occur on a filesystem that has snapshots on it. >Release-Note: >Audit-Trail: >Unformatted: