From: Domen Puncer <domen@cba.si>
To: linux-kernel@vger.kernel.org
Subject: ttyS0 stuck in tty_wait_until_sent when sending break (opened with O_NONBLOCK)
Date: Sun, 6 Nov 2011 11:27:20 +0100 [thread overview]
Message-ID: <CAB1b2sjW94L3wm5KPRQDacu9dxoD+1LCoX+4m8O2OSNWp-+n0w@mail.gmail.com> (raw)
Hello!
I'm not able to create a simple program, that would reproduce this
problem, but calling OW_init()
from libowcapi and with nothing plugged into serial seems to always do
the trick.
$ cat /proc/`pidof test`/wchan; echo
tty_wait_until_sent
$ uname -a
Linux river 3.0-ARCH #1 SMP PREEMPT Wed Oct 19 10:27:51 CEST 2011
x86_64 Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz GenuineIntel
GNU/Linux
But I've also seen this on an older mips kernel.
Is there any way I can assist hunting this down?
I'll try harder to make a simple test program, if the strace output
doesn't produce any ideas.
strace output:
open("/dev/ttyS0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
ioctl(3, TCSBRK, 0) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999995})
write(3, "\301", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 4000000}, 0x7fff2d209ba0) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "q", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\17", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\305", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 400000000}, 0x7fff2d209ba0) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999997})
write(3, "q", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\17", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\305", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 4000000}, 0x7fff2d209ba0) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999997})
write(3, "E", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
close(3) = 0
open("/dev/ttyS0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
ioctl(3, TCSBRK, 0) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999996})
write(3, "\301", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 4000000}, 0x7fff2d209ba0) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "q", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\17", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\305", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 400000000}, 0x7fff2d209ba0) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999997})
write(3, "q", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
nanosleep({0, 5000000}, 0x7fff2d209b20) = 0
select(4, [3], NULL, NULL, {0, 1000}) = 0 (Timeout)
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999998})
write(3, "\17", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
ioctl(3, TCFLSH, 0x2) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999997})
write(3, "\305", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
nanosleep({0, 4000000}, 0x7fff2d209ba0) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999995})
write(3, "E", 1) = 1
ioctl(3, TCSBRK, 0x1) = 0
select(4, [3], NULL, NULL, {5, 0}) = 0 (Timeout)
ioctl(3, TCSBRK, 0x1) = 0
close(3) = 0
open("/dev/ttyS0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or
TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF,
{B9600 -opost -isig -icanon -echo ...}) = 0
ioctl(3, TCFLSH, 0x2) = 0
ioctl(3, TCSBRK, 0) = 0
select(4, NULL, [3], NULL, {5, 0}) = 1 (out [3], left {4, 999997})
write(3, "\301", 1) = 1
ioctl(3, TCSBRK <unfinished ...>
next reply other threads:[~2011-11-06 10:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 10:27 Domen Puncer [this message]
2011-11-15 19:02 ` Domen Puncer
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=CAB1b2sjW94L3wm5KPRQDacu9dxoD+1LCoX+4m8O2OSNWp-+n0w@mail.gmail.com \
--to=domen@cba.si \
--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
all inboxes | Powered by JetHome®