From nobody@FreeBSD.org  Wed Jan 25 06:06:32 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7404616A41F
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <john@kozubik.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Heavy IO on a md-backed filesystem on a snapshotted filesystem will block
X-Send-Pr-Version: www-2.3

>Number:         92292
>Category:       kern
>Synopsis:       [md] [hang] Heavy IO on a md-backed filesystem on a snapshotted filesystem will block
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 25 06:10:03 GMT 2006
>Closed-Date:    Sat May 17 20:11:44 UTC 2008
>Last-Modified:  Sat May 17 20:12:07 UTC 2008
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: rwatson 
State-Changed-When: Sat Mar 8 20:14:51 UTC 2008 
State-Changed-Why:  
Could you confirm whether you are still seeing this problem with more 
recent versions of FreeBSD released since your report (FreeBSD 6.3 or 
7.0 would be best)?  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92292 
State-Changed-From-To: feedback->closed 
State-Changed-By: vwe 
State-Changed-When: Sat May 17 20:10:21 UTC 2008 
State-Changed-Why:  

We're sorry to not see any feedback received for quite some time. 
If you think this is still an issue that should be worked on, 
please provide the requested information and we'll be happy to 
re-open this ticket. 
Thank you for bringing this problem to attention! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92292 
Responsible-Changed-From-To: freebsd-bugs->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sat May 17 20:11:56 UTC 2008 
Responsible-Changed-Why:  

track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92292 
>Unformatted:
