syzbot


INFO: task hung in n_tty_poll

Status: auto-closed as invalid on 2021/08/01 20:04
Reported-by: syzbot+cd50182c8bdb5a154a18@syzkaller.appspotmail.com
First crash: 452d, last: 452d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in n_tty_poll C error 4 20d 412d 0/1 upstream: reported C repro on 2021/05/13 07:45
linux-4.14 INFO: task hung in n_tty_poll (2) C 1 23d 23d 0/1 upstream: reported C repro on 2022/06/06 01:17

Sample crash report:
Bluetooth: hci2 command 0x0406 tx timeout
INFO: task syz-executor.1:10267 blocked for more than 140 seconds.
      Not tainted 4.14.228-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D28456 10267   7981 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x88b/0x1de0 kernel/sched/core.c:3384
 schedule+0x8d/0x1b0 kernel/sched/core.c:3428
 schedule_timeout+0x80a/0xe90 kernel/time/timer.c:1724
 do_wait_for_common kernel/sched/completion.c:91 [inline]
 __wait_for_common kernel/sched/completion.c:112 [inline]
 wait_for_common+0x272/0x430 kernel/sched/completion.c:123
 flush_work+0x3fe/0x770 kernel/workqueue.c:2893
 n_tty_poll+0x4de/0x7d0 drivers/tty/n_tty.c:2412
 tty_poll+0x129/0x1a0 drivers/tty/tty_io.c:2102
 do_select+0xa83/0x1290 fs/select.c:513
 core_sys_select+0x32f/0x6a0 fs/select.c:656
 do_pselect fs/select.c:733 [inline]
 SYSC_pselect6 fs/select.c:774 [inline]
 SyS_pselect6+0x358/0x3c0 fs/select.c:759
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x466459
RSP: 002b:00007f5c5f193188 EFLAGS: 00000246 ORIG_RAX: 000000000000010e
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040
RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000140 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffd9ebc125f R14: 00007f5c5f193300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1532:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff87003f47>] debug_show_all_locks+0x7c/0x21a kernel/locking/lockdep.c:4548
1 lock held by in:imklog/7686:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff818d129b>] __fdget_pos+0x1fb/0x2b0 fs/file.c:769
1 lock held by syz-executor.1/10267:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff83547072>] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 1532 Comm: khungtaskd Not tainted 4.14.228-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x93 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x13a/0x180 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5b9/0xb40 kernel/hung_task.c:274
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 22 Comm: kworker/u4:1 Not tainted 4.14.228-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
task: ffff8880b55ec5c0 task.stack: ffff8880b55f8000
RIP: 0010:__lock_release kernel/locking/lockdep.c:3760 [inline]
RIP: 0010:lock_release+0x21e/0x870 kernel/locking/lockdep.c:4017
RSP: 0018:ffff8880b55ff828 EFLAGS: 00000006
RAX: 0000000000000009 RBX: 1ffff11016abff08 RCX: 1ffffffff127a2e4
RDX: 0000000000000004 RSI: 0000000000000002 RDI: ffff8880b55ece44
RBP: ffff8880ba42a318 R08: ffff8880ba42ac30 R09: 0000000000000001
R10: 0000000000000000 R11: ffff8880b55ec5c0 R12: ffffffff8139b8ec
R13: ffffffff8beb9d40 R14: ffff8880b55ec5c0 R15: 0000000000000009
FS:  0000000000000000(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c02160d2a0 CR3: 00000000b0110000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __raw_spin_unlock include/linux/spinlock_api_smp.h:150 [inline]
 _raw_spin_unlock+0x17/0x40 kernel/locking/spinlock.c:184
 rq_unlock kernel/sched/sched.h:1774 [inline]
 ttwu_queue kernel/sched/core.c:1875 [inline]
 try_to_wake_up+0x6ec/0x1100 kernel/sched/core.c:2087
 wake_up_worker kernel/workqueue.c:840 [inline]
 insert_work+0x226/0x2c0 kernel/workqueue.c:1313
 __queue_work+0x4f3/0xf70 kernel/workqueue.c:1465
 queue_work_on+0x159/0x1d0 kernel/workqueue.c:1490
 pty_write+0x172/0x1d0 drivers/tty/pty.c:126
 tty_put_char+0xfe/0x120 drivers/tty/tty_io.c:2885
 __process_echoes+0x48c/0x8c0 drivers/tty/n_tty.c:728
 flush_echoes drivers/tty/n_tty.c:829 [inline]
 __receive_buf drivers/tty/n_tty.c:1648 [inline]
 n_tty_receive_buf_common+0x9a3/0x25a0 drivers/tty/n_tty.c:1742
 tty_ldisc_receive_buf+0x9e/0x170 drivers/tty/tty_buffer.c:455
 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:475 [inline]
 flush_to_ldisc+0x1dd/0x3f0 drivers/tty/tty_buffer.c:527
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: ff df 4c 89 ea 48 c1 ea 03 0f b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 46 05 00 00 44 89 f8 0b 05 92 e6 a9 0a <0f> 84 3e 04 00 00 44 89 fa 48 89 ee 4c 89 f7 48 8d 4c 24 38 e8 

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2021/04/03 20:03 linux-4.14.y bd634aa64163 6a81331a .config log report info INFO: task hung in n_tty_poll