From owner-freebsd-stable@FreeBSD.ORG Wed Jul 18 17:06:00 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 101B816A400 for ; Wed, 18 Jul 2007 17:06:00 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id B149013C494 for ; Wed, 18 Jul 2007 17:05:59 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 99ED51CC050; Wed, 18 Jul 2007 10:05:59 -0700 (PDT) Date: Wed, 18 Jul 2007 10:05:59 -0700 From: Jeremy Chadwick To: Momchil Ivanov Message-ID: <20070718170559.GA11915@eos.sc1.parodius.com> Mail-Followup-To: Momchil Ivanov , freebsd-stable@freebsd.org, LoN_Kamikaze@gmx.de, josh@tcbug.org References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <200707181830.48727.idiotbg@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707181830.48727.idiotbg@gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: LoN_Kamikaze@gmx.de, freebsd-stable@freebsd.org, josh@tcbug.org Subject: Re: removing external usb hdd without unmounting causes reboot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 17:06:00 -0000 On Wed, Jul 18, 2007 at 06:30:44PM +0200, Momchil Ivanov wrote: > On Wednesday 18 July 2007 17:41:04 Oliver Fromme wrote: > > As Josh wrote, it's expected. The problem is known > > to exist for a long time already (probably as long > > as FreeBSD itself exists), and if there was an easy > > solution, certainly someone would have fixed it. > > I think this is a critical problem and needs to be addressed, avoiding it > doesn`t solve it. I agree. I also have a hard time believing that the reason it hasn't been fixed is because "there isn't an easy fix". I'm under the impression it hasn't been fixed because either no one cares enough to fix it (using the workaround as a scapegoat excuse), or because the majority of people do not use USB-based storage devices. All of this brings me back a few years when I went on a quest to write a application that interfaced with a Logitech USB webcam for FreeBSD (for a streaming fishtank camera). I found that USB alternative indexes were broken (the code was there, but did not work), which the camera relied upon. When I reported the issue to the FreeBSD USB stack maintainer at the time (who will remain nameless since he enjoyed arguing rather than fixing or working with me), I was told 2 things: "I just ported this from NetBSD, don't blame me", "Alt. indexes aren't commonly used so I don't really care". So, based on my experience as documented above, I would say the reasons I listed are dead on. Bottom line here is that the kernel panics when removing a USB device that has filesystems mounted. This shouldn't happen. Spitting out errors on the console is one thing, but a panic is another. Sometimes things cannot be avoided (re: "unmount and you'll be fine"), such as cats pulling on USB hub AC power cables and other such things. If someone wants to work on this and needs devices/toys (thumb drives, external enclosures + hard disks), let me know, I will be more than happy to buy them the hardware needed. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |