Re: All USB tools hang when one descriptor read fails and needs to timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also managed to get "lsusb -v" to hang in an unkillable way even after
I unplugged the device and hub:

) = 1 ([{fd=5, revents=POLLIN}])
ioctl(8, USBDEVFS_DISCARDURB

Regards Troels

On Tue, 7 Feb 2023 at 09:25, Troels Liebe Bentsen
<troels@xxxxxxxxxxxxxxxx> wrote:
>
> Hi again,
>
> Did a bit more testing and found another lock that would be nice to remove,
> the /dev/bus/usb/$BUS/$DEV file for the hub is also locked:
>
> Bus 003 Device 016: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
>
> strace lsusb -v
> ...
> openat(AT_FDCWD, "/dev/bus/usb/003/016", O_RDWR|O_CLOEXEC...
>
> The openat can not be canceled from userspace and even kill -9 won't stop
> the process until the descriptor read times out.
>
> Regards Troels
>
> On Tue, 31 Jan 2023 at 21:56, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Tue, Jan 31, 2023 at 03:41:08PM -0500, Alan Stern wrote:
> > > On Tue, Jan 31, 2023 at 04:59:36PM +0100, Troels Liebe Bentsen wrote:
> > > > On Fri, 27 Jan 2023 at 17:07, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > > > > Now that I know the config descriptors won't get reallocated after all,
> > > > > I can remove the locking from the descriptors file entirely.  A patch to
> > > > > do this is below.  It ought to fix your problem.  Try it and see.
> > > >
> > > > Thank you very much, I built a new kernel with the patch and can confirm
> > > > that it fixes my issue.
> > > >
> > > > Will the patch make it into any of the LTS kernels as it could seem like a
> > > > bugfix depending on how you look at it or is it only destined mainline, fx. 6.2
> > > > or 6.3?
> > >
> > > I don't know.  I will submit it for the -stable kernels, but the
> > > decision on whether to accept it will be up to Greg KH.
> >
> > I'll backport it, as it can help out with systems as Troels said.  But
> > will wait until 6.3-rc1 is out as this should get some testing.
> >
> > thanks,
> >
> > greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux