misc/72119: Detaching USB Memory Stick w/o umount causes zombie
devfs node
Jonas Nagel
fireball at zerouptime.ch
Sun Sep 26 17:20:20 PDT 2004
>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 at 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:
More information about the freebsd-bugs
mailing list