Re: acm_port_shutdown hangs for 30 seconds

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

 



On Sun, Mar 13, 2022 at 12:58:28AM +1100, Jookia wrote:
> Hello there,
> 
> I've been banging my head against this issue over the years but sat down
> and started to debug it today.
> 
> When I try to quit GNU screen, minicom or another serial program it
> sometimes hangs for around 30 seconds.
> 
> To reproduce I do this:
> 
> 1. Connect an Arduino Micro with stock LED blink firmware
> 2. Run 'screen /dev/ttyACM1 9600'
> 3. Type some letters (no response from the board is given)
> 4. Quit in some way
> 
> If I skip step 3 (typing letters), the hang does not happen.
> 
> In userspace the hang happens at a call to close() on the TTY, and using
> perf and ftrace it looks to be spending a lot of time poisoning urbs in
> acm_port_shutdown.
> This kind of makes sense to me as there is some in flight data to be
> sent and there's no acknowledgement coming from the chip.
> 
> I've had this issue with embedded Linux boards too that for some reason
> or another have stopped functioning.
> The current solution I have is to forcefully unplug the board, but
> that's not ideal.
> 
> My questions are:
> 
> - Is this a bug?

It's a bug in your hardware, yes.

> - Can I reduce the timeout somehow?

You could, but then you risk the problem of hardware that needs delays
to not work properly.

What host controller driver is this showing up on?

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