lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB1b2sjW94L3wm5KPRQDacu9dxoD+1LCoX+4m8O2OSNWp-+n0w@mail.gmail.com>
Date:	Sun, 6 Nov 2011 11:27:20 +0100
From:	Domen Puncer <domen@....si>
To:	linux-kernel@...r.kernel.org
Subject: ttyS0 stuck in tty_wait_until_sent when sending break (opened with O_NONBLOCK)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ