Re: removing certain umass (cd/dvd?) devices appears to lock up the USB bus on 14.2/14.3 (at least)

From: David Cross <david_at_crossfamilyweb.com>
Date: Fri, 15 Aug 2025 21:31:44 UTC
Ok.  Of course since I posted it to the list I can no longer reproduce 
this AT ALL, on anything.


It used to be trivial to do, I only have this DVD drive to image old 
CDs/DVDs, so it would be: dd bs=2k if=/dev/cd0 of=file.iso and then 
after I did that and unplugged the drive nothing would work again on the 
USB stack (otherwise I am plugging and unplugging stuff all the time, 
mostly to charge, and yes they show up as 'real' USB devices, so not 
'just power).

But now I cannot repro this on 14.3 OR 15.0; I will keep trying however.

On 8/13/25 00:48, Warner Losh wrote:
>
>
> On Tue, Aug 12, 2025, 10:33 PM David Cross <david@crossfamilyweb.com> 
> wrote:
>
>     I am upgrading one of my machines to 15.0 now; though the last 2
>     times I tried to repro on 14.3 it failed (after I had posted the
>     initial example of a failure on 14.3).  I will be trying a few
>     more times on 14.3 with different configs, this machine should be
>     on 15.0 by tomorrow AM.)
>
>
> That will tell us if this is a usb stack bug (if it doesn't work) or 
> something we have a patch for :)... I'm hoping for the latter.
>
> Warner
>
>     On 8/12/25 16:12, Warner Losh wrote:
>>     Hey David,
>>
>>     Did you get a chance to try the USB sticks with -current yet?
>>
>>     Warner
>>
>>     On Thu, Aug 7, 2025 at 12:54 PM Warner Losh <imp@bsdimp.com> wrote:
>>
>>         Maybe you could try 15.0. I've done a lot to fix these things
>>         in 15.0.
>>         If it still happens there, we'll talk about changes. I've not
>>         MFC'd
>>         the changes I've made since they are kinda extensive. On the
>>         other
>>         hand, there's been a lot of reports of 'works better for me'
>>         with only
>>         one regression. On the other hand, it's not entirely clear
>>         this is in
>>         the class of problems I solved.
>>
>>         Sadly, I suspect that we'll need to have hardware in the
>>         right hands
>>         to solve this completely, especially since the reproduction
>>         appears to
>>         be hit or miss. Is this a pure DVD drive? Is it portable or
>>         desktop?
>>         If it's the one I found on ebay
>>         (https://www.ebay.com/itm/396752411077
>>         though there's others), looks in budget for me to obtain to
>>         help if
>>         there's a reliable recipe to reproduce and it's not the
>>         "fault" of
>>         your host USB chipset.
>>
>>         Warner
>>
>>         On Thu, Aug 7, 2025 at 12:43 PM David Cross
>>         <david@crossfamilyweb.com> wrote:
>>         >
>>         > I have a USB DVD drive that when I unplug (even when empty and
>>         > unmounted) appears to stop the entire USB stack on
>>         14.2/14.3. There are
>>         > no errors (that I can see) in the dmesg, it *appears* to
>>         detach, but
>>         > then no other USB events happen.
>>         >
>>         >
>>         > I originally thought it was just the port that it was
>>         attached to, but
>>         > in recent experimentation I attached it to a USB hub, then
>>         detached it
>>         > from the hub, and even other ports on the host stopped
>>         responding.
>>         > Currently connected devices appear to continue to work, but
>>         if removed
>>         > nothing will reattach to those ports.
>>         >
>>         >
>>         > This has now happened across a couple of different machines
>>         with this
>>         > device, so I don't think it is host specific behavior
>>         >
>>         >
>>         > When trying to run 'usbconfig -v - l' to get some kind of
>>         diagnostics it
>>         > just hangs; C-t yields the following:
>>         >
>>         >
>>         >  > load: 0.12  cmd: usbconfig 52496 [USB config SX lock]
>>         3.12r 0.00u
>>         > 0.00s 0% 2280k
>>         >
>>         >
>>         > Of course in the interests of a fresh reproduction for this
>>         email, it
>>         > just worked; I am continuing to attempt to reproduce.
>>         Suggestions of
>>         > things I should try when I am successful to diagnose the
>>         issue so we can
>>         > fix it?
>>         >
>>         > The relevant USB attach messages are:
>>         >
>>         > ugen1.10: <Hitachi-LG Data Storage Inc Portable Super Multi
>>         Drive> at usbus1
>>         > umass0 on uhub4
>>         > umass0: <Hitachi-LG Data Storage Inc Portable Super Multi
>>         Drive, class
>>         > 0/0, rev 2.00/0.00, addr 14> on usbus1
>>         > umass0:  8070i (ATAPI) over Bulk-Only; quirks = 0x0000
>>         > umass0:1:0: Attached to scbus1
>>         > cd0 at umass-sim0 bus 0 scbus1 target 0 lun 0
>>         > cd0: <HL-DT-ST DVDRAM SP80NB80 RC00> Removable CD-ROM SCSI
>>         device
>>         > cd0: 40.000MB/s transfers
>>         > cd0: 0MB (1 0 byte sectors)
>>         > cd0: quirks=0x10<10_BYTE_ONLY>
>>         >
>>         > Detach messages are:
>>         >
>>         > ugen1.10: <Hitachi-LG Data Storage Inc Portable Super Multi
>>         Drive> at
>>         > usbus1 (disconnected)
>>         > umass0: at uhub4, port 2, addr 14 (disconnected)
>>         > cd0 at umass-sim0 bus 0 scbus1 target 0 lun 0
>>         > cd0: <HL-DT-ST DVDRAM SP80NB80 RC00> detached
>>         > (cd0:umass-sim0:0:0:0): Periph destroyed
>>         > umass0: detached
>>         >
>>         >
>>