syzbot


INFO: task hung in n_tty_read

Status: auto-closed as invalid on 2020/06/25 03:18
Reported-by: syzbot+30e3069f026f890be1b6@syzkaller.appspotmail.com
First crash: 1772d, last: 1732d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 INFO: task hung in n_tty_read 1 1883d 1883d 0/2 auto-closed as invalid on 2020/01/25 18:14
upstream INFO: task hung in n_tty_read (2) usb serial input C error 1 1327d 1323d 0/28 auto-obsoleted due to no activity on 2023/04/25 23:58
upstream INFO: task hung in n_tty_read serial 3 1749d 1803d 0/28 auto-closed as invalid on 2020/05/09 10:39
linux-4.14 INFO: task hung in n_tty_read (2) 1 1307d 1307d 0/1 auto-closed as invalid on 2021/08/24 04:16
linux-4.19 INFO: task hung in n_tty_read (2) 1 787d 787d 0/1 auto-obsoleted due to no activity on 2023/01/25 23:32
linux-4.19 INFO: task hung in n_tty_read 2 1788d 1799d 0/1 auto-closed as invalid on 2020/04/29 17:03

Sample crash report:
audit: type=1400 audit(1582687021.881:103): avc:  denied  { map } for  pid=18450 comm="sh" path="/bin/dash" dev="sda1" ino=1473 scontext=system_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1
INFO: task login:7362 blocked for more than 140 seconds.
      Not tainted 4.14.171-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
login           D25856  7362      1 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1723
 do_wait_for_common kernel/sched/completion.c:91 [inline]
 __wait_for_common kernel/sched/completion.c:112 [inline]
 wait_for_common kernel/sched/completion.c:123 [inline]
 wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
 flush_work+0x3eb/0x730 kernel/workqueue.c:2891
 tty_buffer_flush_work+0x16/0x20 drivers/tty/tty_buffer.c:612
 n_tty_read+0x813/0x17d0 drivers/tty/n_tty.c:2199
 tty_read+0x171/0x270 drivers/tty/tty_io.c:866
 __vfs_read+0x105/0x6a0 fs/read_write.c:411
 vfs_read+0x137/0x350 fs/read_write.c:447
 SYSC_read fs/read_write.c:574 [inline]
 SyS_read+0xfd/0x230 fs/read_write.c:567
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7f6b628ec310
RSP: 002b:00007ffd3b788a68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6b628ec310
RDX: 00000000000001ff RSI: 00007ffd3b788cd0 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00007f6b631cf700 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd3b788cd0
R13: 0000000000000000 R14: 0000000000000001 R15: 000000000060b798
INFO: task kworker/u4:6:13904 blocked for more than 140 seconds.
      Not tainted 4.14.171-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u4:6    D27640 13904      2 0x80000000
Workqueue: events_unbound flush_to_ldisc
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 flush_to_ldisc+0x39/0x400 drivers/tty/tty_buffer.c:499
 process_one_work+0x863/0x1600 kernel/workqueue.c:2114
 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Showing all locks held in the system:
1 lock held by khungtaskd/1057:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff81484048>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
1 lock held by rsyslogd/7240:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff8195e7ab>] __fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by login/7362:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7363:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7364:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7365:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7366:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7367:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
2 locks held by getty/7368:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff8668c3a3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff834bd4a6>] n_tty_read+0x1e6/0x17d0 drivers/tty/n_tty.c:2156
3 locks held by kworker/u4:6/13904:
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] work_static include/linux/workqueue.h:199 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] set_work_data kernel/workqueue.c:619 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline]
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813cd58e>] process_one_work+0x76e/0x1600 kernel/workqueue.c:2085
 #1:  ((&buf->work)){+.+.}, at: [<ffffffff813cd5cb>] process_one_work+0x7ab/0x1600 kernel/workqueue.c:2089
 #2:  (&buf->lock){+.+.}, at: [<ffffffff834cc5a9>] flush_to_ldisc+0x39/0x400 drivers/tty/tty_buffer.c:499

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

NMI backtrace for cpu 1
CPU: 1 PID: 1057 Comm: khungtaskd Not tainted 4.14.171-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+0x142/0x197 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5e7/0xb90 kernel/hung_task.c:274
 kthread+0x319/0x430 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: 18373 Comm: syz-executor.2 Not tainted 4.14.171-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888045c361c0 task.stack: ffff88804aa28000
RIP: 0010:match_held_lock+0xb/0x5f0 kernel/locking/lockdep.c:3554
RSP: 0018:ffff88804aa2f6f0 EFLAGS: 00000002
RAX: dffffc0000000000 RBX: ffff888045c361c0 RCX: ffff888045c36a40
RDX: 0000000000000000 RSI: ffffffff87f83ce0 RDI: ffff888045c36a68
RBP: ffff88804aa2f740 R08: 000000a791547468 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff87f83ce0
R13: ffffed1008b86d47 R14: 0000000000000001 R15: ffff888045c36a68
FS:  00007feb90f01700(0000) GS:ffff8880aec00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faf90f133c0 CR3: 0000000098f4b000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 lock_is_held_type+0x110/0x210 kernel/locking/lockdep.c:4032
 lock_is_held include/linux/lockdep.h:437 [inline]
 rcu_read_lock_sched_held+0x110/0x130 kernel/rcu/update.c:116
 trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 update_curr+0x53c/0x6a0 kernel/sched/fair.c:855
 pick_next_task_fair+0x661/0x1430 kernel/sched/fair.c:6303
 pick_next_task kernel/sched/core.c:3232 [inline]
 __schedule+0x43e/0x1cd0 kernel/sched/core.c:3357
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 paste_selection+0x293/0x3f2 drivers/tty/vt/selection.c:355
 tioclinux+0x10e/0x400 drivers/tty/vt/vt.c:2696
 vt_ioctl+0x180c/0x2170 drivers/tty/vt/vt_ioctl.c:364
 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c449
RSP: 002b:00007feb90f00c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007feb90f016d4 RCX: 000000000045c449
RDX: 0000000020000180 RSI: 000000000000541c RDI: 0000000000000003
RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000575 R14: 00000000004c7c82 R15: 000000000076bf2c
Code: 2c 0f 40 00 e9 2f fe ff ff 48 c7 c7 08 67 f1 87 e8 7b 0e 40 00 e9 58 ff ff ff 66 0f 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 55 <48> 89 e5 41 57 41 56 4c 8d 7d d8 49 89 f6 41 55 4c 8d 6d 98 49 

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/26 03:18 linux-4.14.y 98db2bf27b9e 4f588111 .config console log report ci2-linux-4-14
2020/02/10 16:19 linux-4.14.y e0f8b8a65a47 18847f55 .config console log report ci2-linux-4-14
2020/02/08 06:38 linux-4.14.y e0f8b8a65a47 06150bf1 .config console log report ci2-linux-4-14
2020/02/01 22:50 linux-4.14.y 9fa690a2a016 2274ad39 .config console log report ci2-linux-4-14
2020/01/31 12:17 linux-4.14.y 9fa690a2a016 5ed23f9a .config console log report ci2-linux-4-14
2020/01/16 20:18 linux-4.14.y c04fc6fa5c96 3de7aabb .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.