Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

From: Oliver Neukum
Date: Sun Jan 13 2013 - 14:16:00 EST


On Sunday 13 January 2013 18:42:49 Alex Riesen wrote:
> On Sun, Jan 13, 2013 at 5:56 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Sun, 13 Jan 2013, Alex Riesen wrote:
> >>
> >> Yes, almost. What about khubd hanging when machine is shutdown?
> >
> > What about it? I have trouble understanding all the descriptions you
> > have provided so far, because you talk about several different things
> > and change your mind a lot. Can you provide a single, simple scenario
> > that illustrates this problem?
>
> 1. Compile a kernel with deadline elevator as module
> 2. Boot into it, make sure the elevator is selected
> (I used "elevator=deadline" in the kernel command line)
> 3. Insert a FAT formatted mass storage device in an USB2 port
> Observe "io scheduler deadline registered"
> 4. Pull the stick out, wait a moment, and either shutdown or just
> and press alt-sysrq-W:

That makes it clear. The elevator probably has scheduled work
which cannot finish waiting on a lock and scsi_remove_host()
wants to flush work.

This is not a USB problem. You need to involve the SCSI people.
khubd just stops working because disconnects are processed
in its context and the removal deadlocks.

Regards
Oliver


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/