INFO: rcu detected stall in tty_ioctl

31 views
Skip to first unread message

syzbot

unread,
Dec 20, 2017, 11:42:05 AM12/20/17
to Alexey....@synopsys.com, andriy.s...@linux.intel.com, ard.bie...@linaro.org, da...@lechnology.com, er...@anholt.net, gre...@linuxfoundation.org, jan.k...@siemens.com, jsl...@suse.com, linux-...@vger.kernel.org, linux-...@vger.kernel.org, ph...@raspberrypi.org, rafae...@gmail.com, sean...@mediatek.com, syzkall...@googlegroups.com
Hello,

syzkaller hit the following crash on
6084b576dca2e898f5c101baef151f7bfdbb606d
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.

Unfortunately, I don't have any reproducer for this bug yet.


INFO: rcu_sched self-detected stall on CPU
INFO: rcu_sched detected stalls on CPUs/tasks:
0-....: (124948 ticks this GP) idle=9b6/1/4611686018427387906
softirq=9470/9470 fqs=31230
(detected by 1, t=125002 jiffies, g=3946, c=3945, q=1637)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5197 Comm: syz-executor1 Not tainted 4.15.0-rc3-next-20171214+
#67
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:inb arch/x86/include/asm/io.h:348 [inline]
RIP: 0010:io_serial_in+0x24/0x30 drivers/tty/serial/8250/8250_port.c:434
RSP: 0018:ffff88021fc03b78 EFLAGS: 00000002
RAX: ffff8801e4112000 RBX: 0000000000000005 RCX: 0000000000000000
RDX: 00000000000003fd RSI: 0000000000000005 RDI: ffffffff83fde540
RBP: ffff88021fc03b88 R08: 0000000000000001 R09: 000000000000000c
R10: ffff88021fc03b80 R11: 000000000000000c R12: ffffffff83fde540
R13: 0000000000000020 R14: ffffffff818a4790 R15: ffffffff83f6b75a
FS: 00007f17a074d700(0000) GS:ffff88021fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020fd8000 CR3: 00000001e40b4003 CR4: 00000000001626f0
DR0: 0000000020001000 DR1: 0000000020001000 DR2: 0000000020001000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
<IRQ>
serial_in drivers/tty/serial/8250/8250.h:111 [inline]
wait_for_xmitr+0x50/0xd0 drivers/tty/serial/8250/8250_port.c:2033
serial8250_console_putchar+0x1f/0x30
drivers/tty/serial/8250/8250_port.c:3170
uart_console_write+0x5f/0x80 drivers/tty/serial/serial_core.c:1858
serial8250_console_write+0x22e/0x350
drivers/tty/serial/8250/8250_port.c:3236
univ8250_console_write+0x35/0x40 drivers/tty/serial/8250/8250_core.c:590
call_console_drivers kernel/printk/printk.c:1574 [inline]
console_unlock+0x505/0x790 kernel/printk/printk.c:2233
vprintk_emit+0x38c/0x430 kernel/printk/printk.c:1757
vprintk_default+0x28/0x30 kernel/printk/printk.c:1796
vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379
printk+0x4f/0x5a kernel/printk/printk.c:1829
print_cpu_stall_info_begin kernel/rcu/tree_plugin.h:1685 [inline]
print_cpu_stall kernel/rcu/tree.c:1510 [inline]
check_cpu_stall kernel/rcu/tree.c:1592 [inline]
__rcu_pending kernel/rcu/tree.c:3362 [inline]
rcu_pending kernel/rcu/tree.c:3424 [inline]
rcu_check_callbacks+0x506/0xa10 kernel/rcu/tree.c:2764
update_process_times+0x30/0x60 kernel/time/timer.c:1630
tick_sched_handle+0x32/0x80 kernel/time/tick-sched.c:162
tick_sched_timer+0x3e/0xa0 kernel/time/tick-sched.c:1148
__run_hrtimer kernel/time/hrtimer.c:1210 [inline]
__hrtimer_run_queues+0x10a/0x5e0 kernel/time/hrtimer.c:1274
hrtimer_interrupt+0xcd/0x260 kernel/time/hrtimer.c:1308
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
smp_apic_timer_interrupt+0x6d/0x2a0 arch/x86/kernel/apic/apic.c:1050
apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
</IRQ>
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50
RSP: 0018:ffffc900010ffda0 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff11
RAX: 00000000000008fc RBX: ffffc90000d9e060 RCX: ffffffff81878cde
RDX: 0000000000010000 RSI: ffffc9000354f000 RDI: 0000000000000286
RBP: ffffc900010ffde8 R08: 0000000000000001 R09: 0000000000000004
R10: ffffc900010ffd18 R11: 0000000000000004 R12: 00000004353378fc
R13: 0000000020f76fff R14: ffffc90000d9d000 R15: ffff8801e416ca38
tty_ioctl+0x83e/0xb90 drivers/tty/tty_io.c:2638
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0xaf/0x840 fs/ioctl.c:686
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a09
RSP: 002b:00007f17a074cc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f17a074c9a0 RCX: 0000000000452a09
RDX: 0000000020f76fff RSI: 000000000000541b RDI: 0000000000000015
RBP: 00007f17a074c990 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b7206
R13: 00007f17a074cac8 R14: 00000000004b720f R15: 0000000000000000
Code: 5d c3 0f 1f 44 00 00 55 48 89 e5 41 54 53 49 89 fc 89 f3 e8 bf 66 a1
ff 41 0f b6 8c 24 d1 00 00 00 41 8b 54 24 38 d3 e3 01 da ec <5b> 0f b6 c0
41 5c 5d c3 0f 1f 40 00 55 48 89 e5 41 55 41 54 53
0-....: (124948 ticks this GP) idle=9b6/1/4611686018427387906
softirq=9470/9470 fqs=31331
(t=125407 jiffies g=3946 c=3945 q=1637)
NMI backtrace for cpu 0
CPU: 0 PID: 5197 Comm: syz-executor1 Not tainted 4.15.0-rc3-next-20171214+
#67
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0xe9/0x14b lib/dump_stack.c:53
nmi_cpu_backtrace+0x149/0x150 lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x101/0x150 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_single_cpu_backtrace include/linux/nmi.h:156 [inline]
rcu_dump_cpu_stacks+0xa7/0xe8 kernel/rcu/tree.c:1375
print_cpu_stall kernel/rcu/tree.c:1524 [inline]
check_cpu_stall kernel/rcu/tree.c:1592 [inline]
__rcu_pending kernel/rcu/tree.c:3362 [inline]
rcu_pending kernel/rcu/tree.c:3424 [inline]
rcu_check_callbacks+0x7d9/0xa10 kernel/rcu/tree.c:2764
update_process_times+0x30/0x60 kernel/time/timer.c:1630
tick_sched_handle+0x32/0x80 kernel/time/tick-sched.c:162
tick_sched_timer+0x3e/0xa0 kernel/time/tick-sched.c:1148
__run_hrtimer kernel/time/hrtimer.c:1210 [inline]
__hrtimer_run_queues+0x10a/0x5e0 kernel/time/hrtimer.c:1274
hrtimer_interrupt+0xcd/0x260 kernel/time/hrtimer.c:1308
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
smp_apic_timer_interrupt+0x6d/0x2a0 arch/x86/kernel/apic/apic.c:1050
apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
</IRQ>
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x50
RSP: 0018:ffffc900010ffda0 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff11
RAX: 00000000000008fc RBX: ffffc90000d9e060 RCX: ffffffff81878cde
RDX: 0000000000010000 RSI: ffffc9000354f000 RDI: 0000000000000286
RBP: ffffc900010ffde8 R08: 0000000000000001 R09: 0000000000000004
R10: ffffc900010ffd18 R11: 0000000000000004 R12: 00000004353378fc
R13: 0000000020f76fff R14: ffffc90000d9d000 R15: ffff8801e416ca38
tty_ioctl+0x83e/0xb90 drivers/tty/tty_io.c:2638
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0xaf/0x840 fs/ioctl.c:686
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x452a09
RSP: 002b:00007f17a074cc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f17a074c9a0 RCX: 0000000000452a09
RDX: 0000000020f76fff RSI: 000000000000541b RDI: 0000000000000015
RBP: 00007f17a074c990 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b7206
R13: 00007f17a074cac8 R14: 00000000004b720f R15: 0000000000000000


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.
Please credit me with: Reported-by: syzbot <syzk...@googlegroups.com>

syzbot will keep track of this bug report.
Once a fix for this bug is merged into any tree, reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
config.txt
raw.log

syzbot

unread,
Dec 22, 2017, 6:48:01 PM12/22/17
to Alexey....@synopsys.com, andriy.s...@linux.intel.com, ard.bie...@linaro.org, babu....@oracle.com, da...@lechnology.com, dzi...@redhat.com, er...@anholt.net, gre...@linuxfoundation.org, h...@zytor.com, jan.k...@siemens.com, jsl...@suse.com, linux-...@vger.kernel.org, linux-...@vger.kernel.org, mi...@redhat.com, npi...@gmail.com, ph...@raspberrypi.org, rafae...@gmail.com, sean...@mediatek.com, syzkall...@googlegroups.com, tg...@linutronix.de, x...@kernel.org
syzkaller has found reproducer for the following crash on
37759fa6d0fa9e4d6036d19ac12f555bfc0aeafd
git://git.cmpxchg.org/linux-mmots.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
C reproducer is attached
syzkaller reproducer is attached. See https://goo.gl/kgGztJ
for information about syzkaller reproducers


INFO: rcu_sched self-detected stall on CPU
1-...!: (124998 ticks this GP) idle=1aa/1/4611686018427387906
softirq=6401/6401 fqs=178
(t=125000 jiffies g=3233 c=3232 q=384)
rcu_sched kthread starved for 124263 jiffies! g3233 c3232 f0x0
RCU_GP_WAIT_FQS(3) ->state=0x0 ->cpu=0
rcu_sched R running task 23272 8 2 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2800 [inline]
__schedule+0x8eb/0x2060 kernel/sched/core.c:3376
schedule+0xf5/0x430 kernel/sched/core.c:3435
schedule_timeout+0x13e/0x6f0 kernel/time/timer.c:1818
rcu_gp_kthread+0x9dd/0x18e0 kernel/rcu/tree.c:2231
kthread+0x33c/0x400 kernel/kthread.c:238
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:524
NMI backtrace for cpu 1
CPU: 1 PID: 3169 Comm: syzkaller626814 Not tainted 4.15.0-rc4-mm1+ #49
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x122/0x180 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_single_cpu_backtrace include/linux/nmi.h:156 [inline]
rcu_dump_cpu_stacks+0x186/0x1de kernel/rcu/tree.c:1375
print_cpu_stall kernel/rcu/tree.c:1524 [inline]
check_cpu_stall.isra.62+0xbb8/0x15b0 kernel/rcu/tree.c:1592
__rcu_pending kernel/rcu/tree.c:3362 [inline]
rcu_pending kernel/rcu/tree.c:3424 [inline]
rcu_check_callbacks+0x238/0xd20 kernel/rcu/tree.c:2764
update_process_times+0x30/0x60 kernel/time/timer.c:1630
tick_sched_handle+0x85/0x160 kernel/time/tick-sched.c:162
tick_sched_timer+0x42/0x120 kernel/time/tick-sched.c:1148
__run_hrtimer kernel/time/hrtimer.c:1210 [inline]
__hrtimer_run_queues+0x358/0xe20 kernel/time/hrtimer.c:1274
hrtimer_interrupt+0x1c2/0x5e0 kernel/time/hrtimer.c:1308
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
smp_apic_timer_interrupt+0x14a/0x700 arch/x86/kernel/apic/apic.c:1050
apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
</IRQ>
RIP: 0010:variable_test_bit arch/x86/include/asm/bitops.h:332 [inline]
RIP: 0010:inq_canon drivers/tty/n_tty.c:2409 [inline]
RIP: 0010:n_tty_ioctl+0x218/0x2d0 drivers/tty/n_tty.c:2429
RSP: 0018:ffff8801c914fb48 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff11
RAX: 0000000000000643 RBX: ffffc900018c3060 RCX: ffffffff8293be5c
RDX: 0000000000000000 RSI: 00000000749d30db RDI: ffffc900018c4260
RBP: ffff8801c914fb88 R08: 1ffff10039229e99 R09: 0000000000000004
R10: ffff8801c914f988 R11: 0000000000000003 R12: ffffc900018c2000
R13: 00000002e0efd643 R14: 0000000020a6bffc R15: ffff8801c8493938
tty_ioctl+0x336/0x1610 drivers/tty/tty_io.c:2640
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
entry_SYSCALL_64_fastpath+0x1f/0x96
RIP: 0033:0x445b39
RSP: 002b:00007f6ed1479d18 EFLAGS: 00000293 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dac3c RCX: 0000000000445b39
RDX: 0000000020a6bffc RSI: 000000000000541b RDI: 0000000000000013
RBP: 00000000006dac38 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 6d74702f7665642f
R13: 00007ffe16e1657f R14: 00007f6ed147a9c0 R15: 0000000000000008

config.txt
raw.log
repro.txt
repro.c

Dmitry Vyukov

unread,
Feb 14, 2018, 9:58:51 AM2/14/18
to syzbot, Alexey....@synopsys.com, Andy Shevchenko, Ard Biesheuvel, babu....@oracle.com, da...@lechnology.com, dzi...@redhat.com, er...@anholt.net, Greg Kroah-Hartman, H. Peter Anvin, jan.k...@siemens.com, Jiri Slaby, LKML, linux-serial, Ingo Molnar, npi...@gmail.com, ph...@raspberrypi.org, rafae...@gmail.com, sean...@mediatek.com, syzkall...@googlegroups.com, Thomas Gleixner, the arch/x86 maintainers
On Sat, Dec 23, 2017 at 12:48 AM, syzbot
<bot+4e86372b8cb60e4461...@syzkaller.appspotmail.com>
wrote:
> syzkaller has found reproducer for the following crash on
> 37759fa6d0fa9e4d6036d19ac12f555bfc0aeafd
> git://git.cmpxchg.org/linux-mmots.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
> C reproducer is attached
> syzkaller reproducer is attached. See https://goo.gl/kgGztJ
> for information about syzkaller reproducers


I think this is fixed with:

#syz fix: n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/089e082bdf106667a50560f672cc%40google.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages