From: Greg KH <greg@kroah.com>
To: Andreas Bombe <aeb@debian.org>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: tty_lock held during transmit wait in close: still unresolved
Date: Thu, 26 May 2011 00:11:04 -0700 [thread overview]
Message-ID: <20110526071104.GE29833@kroah.com> (raw)
In-Reply-To: <20110525235920.GA5279@amos.fritz.box>
On Thu, May 26, 2011 at 01:59:22AM +0200, Andreas Bombe wrote:
> Short reminder/summary: Unlike the BKL, the tty_lock mechanism that
> replaced it does not release the lock while sleeping. This causes the
> tty_lock to be held for extended periods of time when uart_close()
> (running with tty_lock held) tries to flush the transmit buffer but is
> unable to do so.
>
> The result is that until the transmit flush completes by the remote end
> finally accepting the data or the driver timing out and giving up,
> pretty much all tty operations freeze. No programs can be started
> and for some reason X freezes for me. From a user viewpoint, the
> computer effectively locks up for that time.
>
> After I tracked the issue down to the tty_lock mechanism, I found some
> discussion on LKML about that from last November (thread starting here:
> http://lkml.kernel.org/r/4CCBCD8E.1020601@billauer.co.il ). However
> nothing has come of it, it appears, at least not in the official kernel.
>
> A minimalist way to trigger this issue is with a serial port that has
> nothing attached:
>
> stty -F /dev/ttyS0 crtscts
> echo >/dev/ttyS0
>
> The echo triggers a 30 second timeout on close while the driver is
> trying to flush the newline. Another way is developing an USB device
> with a virtual serial port and having it stop (by debugger or
> crash/lockup)...
>
> Any ideas on how to progress?
Can you try Linus's tree right now? A number of changes went in during
this merge window that might help out here I think.
thanks,
greg k-h
next prev parent reply other threads:[~2011-05-26 7:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 23:59 tty_lock held during transmit wait in close: still unresolved Andreas Bombe
2011-05-26 7:11 ` Greg KH [this message]
2011-05-27 0:29 ` Andreas Bombe
2011-05-26 8:17 ` Alan Cox
2011-05-27 0:41 ` Andreas Bombe
2011-05-27 11:38 ` Arnd Bergmann
2011-05-27 12:11 ` Jiri Slaby
2011-05-27 13:53 ` Arnd Bergmann
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=20110526071104.GE29833@kroah.com \
--to=greg@kroah.com \
--cc=aeb@debian.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
/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