From nobody@FreeBSD.org  Mon Sep 27 00:13:28 2004
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 34A2D16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Sep 2004 00:13:28 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 28EF843D46
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Sep 2004 00:13:28 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i8R0DR4M006872
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 27 Sep 2004 00:13:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i8R0DR79006871;
	Mon, 27 Sep 2004 00:13:27 GMT
	(envelope-from nobody)
Message-Id: <200409270013.i8R0DR79006871@www.freebsd.org>
Date: Mon, 27 Sep 2004 00:13:27 GMT
From: Jonas Nagel <fireball@zerouptime.ch>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Detaching USB Memory Stick w/o umount causes zombie devfs node
X-Send-Pr-Version: www-2.3

>Number:         72119
>Category:       kern
>Synopsis:       Detaching USB Memory Stick w/o umount causes zombie devfs node
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-usb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 27 00:20:19 GMT 2004
>Closed-Date:    Wed Mar 23 02:54:23 GMT 2005
>Last-Modified:  Thu Mar 24 10:00:12 GMT 2005
>Originator:     Jonas Nagel
>Release:        5.3-BETA4
>Organization:
-
>Environment:
FreeBSD hirtnb03.hirt.ch 5.3-BETA4 FreeBSD 5.3-BETA4 #1: Mon Sep 13 01:33:15 CEST 2004     root@hirtnb03.hirt.ch:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
      Removing the USB Stick without a prior umount of the node, will 
leave the device node, e.g. /dev/da0s1 and /dev/da0 (both affected) 
unusable for any further mounts; i.e. they had to be deleted and recreated
manually using mknod. I discovered this after I prepared a devd.conf piece
of script for devd, which does an automatic mount after umass0 connects 
and a umount -f on the mountpoint after I remove the device.
>How-To-Repeat:
      Attach USB Stick, mount it to a mountpoint e.g. mount -t msdosfs /dev/da0s1 /mnt, remove USB stick, umount -f /mnt, then re-attach usb stick, try to mount -t msdosfs /dev/da0s1 /mnt again -> device not found.
>Fix:
      A recommended workaround, of course, is to umount any device before removing it. 

But as time progresses and other modern operating systems allow removal of
similar devices without problems, I hope FreeBSD goes that way too, sooner
or later. At least it shouldn't be a problem to re-attach the device again.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-usb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Nov 4 07:12:46 GMT 2004 
Responsible-Changed-Why:  
Reassign to appropriate mailing list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72119 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Wed Mar 23 02:53:56 GMT 2005 
State-Changed-Why:  

Duplicate of kern/46176 

http://www.freebsd.org/cgi/query-pr.cgi?pr=72119 

From: Jonas Nagel <fireball@zerouptime.ch>
To: freebsd-gnats-submit@FreeBSD.org
Cc: freebsd-usb@FreeBSD.org, Ian Dowse <iedowse@FreeBSD.org>
Subject: Re: kern/72119: Detaching USB Memory Stick w/o umount causes zombie devfs node
Date: Wed, 23 Mar 2005 23:44:33 +0100

 I don't understand how this is supposed to be a duplicate. The issue
 might be similar but in my case, the OS does NOT crash.
 
 My issue lies within the devfs, where a zombie device node remains,
 which has to be deleted and then recreated, while in the other case it's
 a straight kernel panic.
 
 But you might have deeper insights into the issue within...
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 

From: Julian Elischer <julian@elischer.org>
To: Jonas Nagel <fireball@zerouptime.ch>
Cc: freebsd-gnats-submit@freebsd.org,
	Ian Dowse <iedowse@freebsd.org>, freebsd-usb@freebsd.org,
	Poul-Henning Kamp <phk@phk.freebsd.dk>
Subject: Re: kern/72119: Detaching USB Memory Stick w/o umount causes zombie
 devfs node
Date: Wed, 23 Mar 2005 16:47:18 -0800

 Jonas Nagel wrote:
 
 >I don't understand how this is supposed to be a duplicate. The issue
 >might be similar but in my case, the OS does NOT crash.
 >
 >My issue lies within the devfs, where a zombie device node remains,
 >which has to be deleted and then recreated, while in the other case it's
 >a straight kernel panic.
 >
 >But you might have deeper insights into the issue within...
 >  
 >
 I believe that the device node continues to exist until the dead mount 
 is forcibly unmounted..
 
 probably one for Poul-Henning  (CC'd )
 

From: Fireball <fireball@zerouptime.ch>
To: Julian Elischer <julian@elischer.org>
Cc: freebsd-gnats-submit@freebsd.org,
	Ian Dowse <iedowse@freebsd.org>, freebsd-usb@freebsd.org,
	Poul-Henning Kamp <phk@phk.freebsd.dk>
Subject: Re: kern/72119: Detaching USB Memory Stick w/o umount causes zombie devfs node
Date: Thu, 24 Mar 2005 10:50:44 +0100

 > I believe that the device node continues to exist until the dead mount 
 > is forcibly unmounted..
 
 You believe wrongly. While it is unfortunate that my original problem
 report has no line breaks, I did write that a umount -f on the device
 node after pulling the USB plug did NOT help.
 
 I HAD to delete and manually recreate the device node, before I could
 mount the USB stick again. This is the main issue.
 
 -- 
 Jonas Nagel <fireball@zerouptime.ch>
 
>Unformatted:
