Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Sep 2004 00:13:27 GMT
From:      Jonas Nagel <fireball@zerouptime.ch>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/72119: Detaching USB Memory Stick w/o umount causes zombie devfs node
Message-ID:  <200409270013.i8R0DR79006871@www.freebsd.org>
Resent-Message-ID: <200409270020.i8R0KJO1007096@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         72119
>Category:       misc
>Synopsis:       Detaching USB Memory Stick w/o umount causes zombie devfs node
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 27 00:20:19 GMT 2004
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409270013.i8R0DR79006871>