Subject: Re: panic on USB detachment
To: Jonathan A. Kollasch <email@example.com>
From: Steven M. Bellovin <firstname.lastname@example.org>
Date: 06/10/2006 10:18:49
On Sat, 10 Jun 2006 02:12:51 -0500, "Jonathan A. Kollasch"
> On Fri, Jun 09, 2006 at 11:33:52PM -0400, Chris Tribo wrote:
> > I booted the system with the flash drive connected and it probed as
> > sd0, then when I went to unplug it, nothing happened. I plugged it
> > back in, it came up as sd1, and unplugging that made the system
> > panic. I also have another panic from a normal sd0 detachment.
> > umass1 at uhub0 port 2 configuration1 interface 0
> > umass1: LEXAR MEDIA JUMPDRIVE, rev 2.00/30.00, addr 3
> > umass1: using SCSI over Bulk-Only
> > scsibus1 at umass1: 2 targets, 1 lun per target
> > sd1 at scsibus1 target 0 lun 0: <LEXAR, JUMPDRIVE, 10000> disk removable
> > : at uhub0 port 2 (addr 3) disconnected
> > panic: config_detach: forced detach of failed (45)
> > Stopped in pid 5.1 (usb0) at netbsd:cpu_Debugger+0x4: leave
> > panic+0x11d
> > config_activate
> > usb_disconnect_port+0x9c
> > uhub_explore+0x21d
> > usb_discover+0x36
> > usb_event_thread+0x5d
> I had a similar panic unplugging a uhiddev(4) that had been attached
> after boot. This with an autobuild from the 5th or 6th, on i386.
I used to get crashes about 1 time in 10 when I removed my EVDO card
(ucom on umodem on uhub on usb on ohci on cardbus....). I modified my
script to use drvctl and haven't had a similar crash since.
It would be nice if the underlying bug were fixed, but it's a hard one
(more likely, hard ones) to track down, I suspect. Until then, things
like drvctl are the right idea.
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb