syzbot


INFO: task hung in n_tty_read (2)

Status: auto-closed as invalid on 2021/08/24 04:16
Reported-by: syzbot+2b18e062fc8c1d3437d8@syzkaller.appspotmail.com
First crash: 583d, last: 583d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in n_tty_read 6 1008d 1049d 0/1 auto-closed as invalid on 2020/06/25 03:18
android-44 INFO: task hung in n_tty_read 1 1160d 1160d 0/2 auto-closed as invalid on 2020/01/25 18:14
upstream INFO: task hung in n_tty_read (2) C error 1 603d 599d 0/24 upstream: reported C repro on 2021/04/09 23:49
upstream INFO: task hung in n_tty_read 3 1025d 1079d 0/24 auto-closed as invalid on 2020/05/09 10:39
linux-4.19 INFO: task hung in n_tty_read (2) 1 63d 63d 0/1 upstream: reported on 2022/09/27 23:32
linux-4.19 INFO: task hung in n_tty_read 2 1065d 1076d 0/1 auto-closed as invalid on 2020/04/29 17:03

Sample crash report:
Buffer I/O error on dev loop1p3, logical block 3717, async page read
Buffer I/O error on dev loop1p3, logical block 3718, async page read
Buffer I/O error on dev loop1p3, logical block 3719, async page read
Buffer I/O error on dev loop1p2, logical block 0, async page read
INFO: task login:7930 blocked for more than 140 seconds.
      Not tainted 4.14.231-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
login           D25976  7930      1 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
audit: type=1804 audit(1619410549.812:90): pid=13744 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir979551456/syzkaller.FhyVKO/741/bus" dev="sda1" ino=15266 res=1
 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_read+0x943/0x1680 drivers/tty/n_tty.c:2199
EXT4-fs (loop5): mounting ext3 file system using the ext4 subsystem
EXT4-fs (loop5): Can't read superblock on 2nd try
 tty_read+0x16b/0x260 drivers/tty/tty_io.c:866
 __vfs_read+0xe4/0x620 fs/read_write.c:411
 vfs_read+0x139/0x340 fs/read_write.c:447
 SYSC_read fs/read_write.c:574 [inline]
 SyS_read+0xf2/0x210 fs/read_write.c:567
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fc439198910
RSP: 002b:00007fff0462c068 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fc439198910
RDX: 00000000000001ff RSI: 00007fff0462c370 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00007fc439cb34c0 R09: 00007fff0462c0f0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
audit: type=1804 audit(1619410550.162:91): pid=13758 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir979551456/syzkaller.FhyVKO/741/bus" dev="sda1" ino=15266 res=1
R13: 0000000000000002 R14: 00007fff0462c660 R15: 000055cc15f0b628
INFO: task kworker/u4:5:9190 blocked for more than 140 seconds.
      Not tainted 4.14.231-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u4:5    D26616  9190      2 0x80000000
Workqueue: events_unbound flush_to_ldisc
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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x669/0x1310 kernel/locking/mutex.c:893
 flush_to_ldisc+0x35/0x3f0 drivers/tty/tty_buffer.c:499
 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

Showing all locks held in the system:
1 lock held by khungtaskd/1533:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff8700a357>] debug_show_all_locks+0x7c/0x21a kernel/locking/lockdep.c:4548
2 locks held by agetty/7928:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff83549482>] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8353e803>] n_tty_read+0x1e3/0x1680 drivers/tty/n_tty.c:2156
2 locks held by login/7930:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff83549482>] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8353e803>] n_tty_read+0x1e3/0x1680 drivers/tty/n_tty.c:2156
3 locks held by kworker/u4:5/9190:
 #0:  ("events_unbound"){+.+.}, at: [<ffffffff813639b0>] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2087
 #1:  ((&buf->work)){+.+.}, at: [<ffffffff813639e6>] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2091
 #2:  (&buf->lock){+.+.}, at: [<ffffffff8354bd15>] flush_to_ldisc+0x35/0x3f0 drivers/tty/tty_buffer.c:499
2 locks held by syz-executor.4/27280:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff83549482>] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284
 #1:  (&buf->lock){+.+.}, at: [<ffffffff8356e7ae>] paste_selection+0x10e/0x420 drivers/tty/vt/selection.c:373

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

NMI backtrace for cpu 1
CPU: 1 PID: 1533 Comm: khungtaskd Not tainted 4.14.231-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: 13769 Comm: syz-executor.1 Not tainted 4.14.231-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88804775a2c0 task.stack: ffff888051a60000
RIP: 0033:0x41487f
RSP: 002b:00007ffc70470250 EFLAGS: 00000202
RAX: 0000000056ba0c51 RBX: 0000000000000d07 RCX: 00007fa56d94e008
RDX: 0000000056ba0c51 RSI: 0000000008cadba5 RDI: 0000000000000c51
RBP: 0000000056ba0c51 R08: 0000000056ba0c55 R09: 0000001b2df2276c
R10: 00007ffc70470420 R11: 0000000000000246 R12: 000000000056bfe8
R13: 0000000000000001 R14: 0000000000560000 R15: ffffffff816824c6
FS:  00000000033f1400(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2df23000 CR3: 00000000a0ed4000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
netlink: 12 bytes leftover after parsing attributes in process `syz-executor.4'.

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2021/04/26 04:16 linux-4.14.y cf256fbcbe34 2a82f1b3 .config log report info INFO: task hung in n_tty_read
* Struck through repros no longer work on HEAD.