syzbot


INFO: rcu detected stall in tty_ioctl

Status: fixed on 2018/02/14 17:52
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+4e86372b8cb60e44613ff63e5dd1dcaffa7a4d29@syzkaller.appspotmail.com
Fix commit: 966031f34018 n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
First crash: 2370d, last: 2354d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in tty_ioctl (3) serial 1 306d 306d 0/28 auto-obsoleted due to no activity on 2023/11/10 16:15
upstream INFO: rcu detected stall in tty_ioctl (2) serial 5 945d 954d 0/28 closed as invalid on 2022/02/08 10:00

Sample crash report:
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

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2017/12/22 23:47 mmots 37759fa6d0fa 8e409090 .config console log report syz C ci-upstream-mmots-kasan-gce
2017/12/28 10:15 upstream 5f520fc31876 7d240098 .config console log report ci-upstream-kasan-gce
2017/12/21 23:37 upstream 9035a8961b50 81fe66b4 .config console log report ci-upstream-kasan-gce
2017/12/28 16:25 upstream 5f520fc31876 7d240098 .config console log report ci-upstream-kasan-gce-386
2018/01/02 01:46 mmots 37759fa6d0fa 00193447 .config console log report ci-upstream-mmots-kasan-gce
2018/01/01 19:05 linux-next 0e08c463db38 00193447 .config console log report ci-upstream-next-kasan-gce
2017/12/31 21:59 mmots 37759fa6d0fa 00193447 .config console log report ci-upstream-mmots-kasan-gce
2017/12/30 17:15 linux-next 0e08c463db38 bb6384b8 .config console log report ci-upstream-next-kasan-gce
2017/12/30 14:17 mmots 37759fa6d0fa bb6384b8 .config console log report ci-upstream-mmots-kasan-gce
2017/12/22 06:14 mmots 37759fa6d0fa 81fe66b4 .config console log report ci-upstream-mmots-kasan-gce
2017/12/22 05:36 linux-next 0e08c463db38 81fe66b4 .config console log report ci-upstream-next-kasan-gce
2017/12/17 12:59 linux-next 6084b576dca2 d5beb42a .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.