From nobody@FreeBSD.org  Mon Apr 13 01:06:41 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BF4CA106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Apr 2009 01:06:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id ACA168FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Apr 2009 01:06:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3D16eLl008577
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Apr 2009 01:06:40 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n3D16edr008576;
	Mon, 13 Apr 2009 01:06:40 GMT
	(envelope-from nobody)
Message-Id: <200904130106.n3D16edr008576@www.freebsd.org>
Date: Mon, 13 Apr 2009 01:06:40 GMT
From: Rob Bloom <hadley@foxular.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: umount -f'ing a vnode-based memory disk from off a SMB share caused a reboot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133676
>Category:       kern
>Synopsis:       [smbfs] [panic] umount -f'ing a vnode-based memory disk from off a SMB share caused a reboot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 13 01:10:05 UTC 2009
>Closed-Date:    
>Last-Modified:  Mon Apr 13 17:33:43 UTC 2009
>Originator:     Rob Bloom
>Release:        7.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD goosebox.foxular.net 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #10: Wed Jan  7 23:33:58 EST 2009     root@goosebox.foxular.net:/usr/obj/usr/src/sys/GOOSEBOX  amd64

>Description:
I had at some point used mdconfig to mount an HD image (with the image on an SMB partition) with an msdos partition  on it to /dev/md0.

I came back a few days later, noticed the disk was still showing as mounted in df, but when I saw the directory was empty, I figured I must have detached the disk without unmounting first. (though while trying to reproduce the bug, this may not have been the case)

I did "umount /mnt/dos" first, getting "umount of /mnt/dos failed: Bad file descriptor", and followed that up with "umount -f /mnt/dos", after which my system immediately rebooted.

Here is the output from /var/log/messages:
Apr 12 20:27:35 goosebox kernel: g_vfs_done():md0s1[READ(offset=512, length=4096)]error = 9
Apr 12 20:27:37 goosebox sudo:   hadley : TTY=ttyp1 ; PWD=/mnt ; USER=root ; COMMAND=/sbin/umount dos
Apr 12 20:27:37 goosebox kernel: g_vfs_done():md0s1[READ(offset=512, length=4096)]error = 9
Apr 12 20:27:38 goosebox sudo:   hadley : TTY=ttyp1 ; PWD=/mnt ; USER=root ; COMMAND=/sbin/umount -f dos
Apr 12 20:28:47 goosebox syslogd: kernel boot file is /boot/kernel/kernel

>How-To-Repeat:
Not quite sure...  I know at the very least it involves creating a memory disk based off a disk image mounted over the network.  It seems that maybe leaving the image mounted for a while and probably rebooting the machine the image is on at some point inbetween caused the disk image to no longer be locatable, causing the reboot when I unmounted it.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 13 17:31:51 UTC 2009 
Responsible-Changed-Why:  
Reclassify and reassign. 

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