Linux USB
 help / color / mirror / Atom feed
From: Jookia <contact@jookia.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: acm_port_shutdown hangs for 30 seconds
Date: Thu, 30 Jun 2022 22:31:10 +1000	[thread overview]
Message-ID: <Yr2Xjf8tsKEeZXYe@novena-choice-citizen> (raw)
In-Reply-To: <78bf969a-2936-1eee-9d07-9c1694b25761@suse.com>

On Wed, Jun 29, 2022 at 02:01:18PM +0200, Oliver Neukum wrote:
> You have something in the buffer, which the tty layer will try to send.
> 
> > In userspace the hang happens at a call to close() on the TTY, and using
> 
> The tty layer is supposed to wait a defined amount of time
> if a tty needs to drain.
> This amount (among many other things) is traditionally
> set with the TIOCSSERIAL ioctl()
> 
> > perf and ftrace it looks to be spending a lot of time poisoning urbs in
> > acm_port_shutdown.
> 
> That is a bit odd.
> 
> > - Is this a bug?
> 
> Maybe, but unlikely. If and only it takes much more time than the
> termios say.
> 
> > - Can I reduce the timeout somehow?
> 
> ioctl() TIOCSSERIAL. If that does not work,
> it's a bug.

This sounds like exactly what's happening. Next time I hit this issue
I'll see if changing closing_wait fixes this.

> 	HTH
> 		Oliver

      reply	other threads:[~2022-06-30 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12 13:58 acm_port_shutdown hangs for 30 seconds Jookia
2022-06-27 12:57 ` Greg KH
2022-06-28  9:21   ` Jookia
2022-06-29  8:37     ` Greg KH
2022-06-29 10:20       ` Jookia
2022-06-29 12:01 ` Oliver Neukum
2022-06-30 12:31   ` Jookia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yr2Xjf8tsKEeZXYe@novena-choice-citizen \
    --to=contact@jookia.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox