From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 25 06:10:04 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 8C22C16A41F for ; Wed, 25 Jan 2006 06:10:04 +0000 (GMT) (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 1AD6643D48 for ; Wed, 25 Jan 2006 06:10:04 +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 k0P6A32c040715 for ; Wed, 25 Jan 2006 06:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0P6A3ES040714; Wed, 25 Jan 2006 06:10:03 GMT (envelope-from gnats) Resent-Date: Wed, 25 Jan 2006 06:10:03 GMT Resent-Message-Id: <200601250610.k0P6A3ES040714@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 7404616A41F for ; Wed, 25 Jan 2006 06:06:32 +0000 (GMT) (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 40CEC43D46 for ; Wed, 25 Jan 2006 06:06:32 +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 k0P66W9I041307 for ; Wed, 25 Jan 2006 06:06:32 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k0P66VHV041306; Wed, 25 Jan 2006 06:06:31 GMT (envelope-from nobody) Message-Id: <200601250606.k0P66VHV041306@www.freebsd.org> Date: Wed, 25 Jan 2006 06:06:31 GMT From: John Kozubik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/92292: Heavy IO on a md-backed filesystem on a snapshotted filesystem will block 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: Wed, 25 Jan 2006 06:10:04 -0000 >Number: 92292 >Category: kern >Synopsis: Heavy IO on a md-backed filesystem on a snapshotted filesystem will block >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 Jan 25 06:10:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: John Kozubik >Release: 6.0-RELEASE >Organization: www.kozubik.com >Environment: FreeBSD test 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Wed Nov 30 13:35:22 PST 2005 user@test:/usr/src/sys/i386/compile/test i386 >Description: If you create a filesystem backed by an md device, and the backing store and mount point for that md-backed filesystem exist on a filesystem that has a snapshot on it, the underlying filesystem will block. First, the IO process will become stuck in the biowr state, then the mount point of the md-backed filesystem will block against all requests, and eventually the entire underlying snapshotted filesystem will block against all requests. The snapshot cannot be removed at this point because you cannot access the filesystem it exists on, and the IO process cannot be killed. The system itself seems to remain responsive, with the exception of that entire filesystem. >How-To-Repeat: create a snapshot on a filesystem: mksnap_ffs /mnt/fs1 /mnt/fs1/.snap/snapshot Create a md-backed, mounted filesystem, on the same filesystem you just snapshotted: dd if=/dev/zero of=/mnt/fs1/file bs=1k count=2100000 mkdir /mnt/fs1/dir mdconfig -a -t vnode -f /mnt/fs1/file -u 0 disklabel -r -w md0 auto newfs /dev/md0c mount /dev/md0c /mnt/fs1/dir Do some IO inside of the md-backed filesystem: cp -R /usr/ports/* /mnt/fs1/dir (above behavior ensues) >Fix: Do not run md-backed filesystems on top of filesystems that have been snapshotted. >Release-Note: >Audit-Trail: >Unformatted: