From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 27 00:20:20 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 280CB16A4CF for ; Mon, 27 Sep 2004 00:20:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1B2943D41 for ; Mon, 27 Sep 2004 00:20:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8R0KJZr007100 for ; Mon, 27 Sep 2004 00:20:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8R0KJO1007096; Mon, 27 Sep 2004 00:20:19 GMT (envelope-from gnats) Resent-Date: Mon, 27 Sep 2004 00:20:19 GMT Resent-Message-Id: <200409270020.i8R0KJO1007096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jonas Nagel Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34A2D16A4CE for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/72119: Detaching USB Memory Stick w/o umount causes zombie devfs node X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 00:20:20 -0000 >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: