syzbot


INFO: task hung in flush_to_ldisc (2)

Status: auto-closed as invalid on 2020/11/11 17:44
Reported-by: syzbot+eac95076422e1628d181@syzkaller.appspotmail.com
First crash: 1592d, last: 1592d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in flush_to_ldisc (2) serial 1 1323d 1323d 0/28 auto-closed as invalid on 2021/06/09 11:04
linux-4.19 INFO: task hung in flush_to_ldisc 10 1741d 1804d 0/1 auto-closed as invalid on 2020/06/15 14:09
upstream INFO: task hung in flush_to_ldisc serial C inconclusive done 15 1744d 1814d 15/28 fixed on 2020/11/16 12:12
linux-4.14 INFO: task hung in flush_to_ldisc (3) 1 1354d 1354d 0/1 auto-closed as invalid on 2021/07/07 16:40
upstream INFO: task hung in flush_to_ldisc (3) serial C inconclusive 3 1023d 1212d 0/28 closed as invalid on 2022/02/08 10:26
linux-4.14 INFO: task hung in flush_to_ldisc (2) 1 1545d 1545d 0/1 auto-closed as invalid on 2020/12/28 13:53
linux-4.19 INFO: task hung in flush_to_ldisc (3) 1 1306d 1306d 0/1 auto-closed as invalid on 2021/08/25 00:39
linux-4.14 INFO: task hung in flush_to_ldisc 8 1734d 1804d 0/1 auto-closed as invalid on 2020/06/23 11:01

Sample crash report:
INFO: task kworker/u4:3:170 blocked for more than 140 seconds.
      Not tainted 4.19.132-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u4:3    D24672   170      2 0x80000000
Workqueue: events_unbound flush_to_ldisc
Call Trace:
 context_switch kernel/sched/core.c:2826 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3515
 schedule+0x8d/0x1b0 kernel/sched/core.c:3559
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3617
 __mutex_lock_common kernel/locking/mutex.c:1002 [inline]
 __mutex_lock+0x647/0x1260 kernel/locking/mutex.c:1072
 flush_to_ldisc+0x3e/0x390 drivers/tty/tty_buffer.c:500
 process_one_work+0x864/0x1570 kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
 kthread+0x30b/0x410 kernel/kthread.c:246
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
INFO: task agetty:12018 blocked for more than 140 seconds.
      Not tainted 4.19.132-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
agetty          D28088 12018      1 0x80000002
Call Trace:
 context_switch kernel/sched/core.c:2826 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3515
 schedule+0x8d/0x1b0 kernel/sched/core.c:3559
 schedule_timeout+0x90e/0xef0 kernel/time/timer.c:1782
 down_write_failed drivers/tty/tty_ldsem.c:284 [inline]
 __ldsem_down_write_nested+0x379/0x8a0 drivers/tty/tty_ldsem.c:346
 __tty_ldisc_lock drivers/tty/tty_ldisc.c:320 [inline]
 tty_ldisc_lock+0x4d/0x90 drivers/tty/tty_ldisc.c:344
 tty_ldisc_hangup+0x1f5/0x700 drivers/tty/tty_ldisc.c:746
 __tty_hangup.part.0+0x359/0x780 drivers/tty/tty_io.c:623
 __tty_hangup drivers/tty/tty_io.c:573 [inline]
 tty_vhangup_session+0x20/0x30 drivers/tty/tty_io.c:733
 disassociate_ctty.part.0+0xb1/0x6c0 drivers/tty/tty_jobctrl.c:267
 disassociate_ctty+0x7a/0x90 drivers/tty/tty_jobctrl.c:261
 do_exit+0x15ec/0x2b70 kernel/exit.c:885
 do_group_exit+0x125/0x310 kernel/exit.c:990
 __do_sys_exit_group kernel/exit.c:1001 [inline]
 __se_sys_exit_group kernel/exit.c:999 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:999
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fa14cb38618
Code: Bad RIP value.
RSP: 002b:00007ffcd02104e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fa14cb38618
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00007fa14ce158e0 R08: 00000000000000e7 R09: ffffffffffffff98
R10: 00007ffcd0210468 R11: 0000000000000246 R12: 00007fa14ce158e0
R13: 00007fa14ce1ac20 R14: 0000000000000001 R15: 000000000000000a
INFO: task syz-executor.3:31305 blocked for more than 140 seconds.
      Not tainted 4.19.132-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D28184 31305   6731 0x00000000
Call Trace:
 context_switch kernel/sched/core.c:2826 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3515
 schedule+0x8d/0x1b0 kernel/sched/core.c:3559
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3617
 __mutex_lock_common kernel/locking/mutex.c:1002 [inline]
 __mutex_lock+0x647/0x1260 kernel/locking/mutex.c:1072
 paste_selection+0x125/0x46d drivers/tty/vt/selection.c:372
 tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3047
 vt_ioctl+0x1775/0x24d0 drivers/tty/vt/vt_ioctl.c:372
 tty_ioctl+0x5b0/0x15c0 drivers/tty/tty_io.c:2669
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45cba9
Code: Bad RIP value.
RSP: 002b:00007f225afbcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004eff40 RCX: 000000000045cba9
RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000589 R14: 00000000004c856f R15: 00007f225afbd6d4
INFO: task syz-executor.3:31312 blocked for more than 140 seconds.
      Not tainted 4.19.132-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D28184 31312   6731 0x00000000
Call Trace:
 context_switch kernel/sched/core.c:2826 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3515
 schedule+0x8d/0x1b0 kernel/sched/core.c:3559
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3617
 __mutex_lock_common kernel/locking/mutex.c:1002 [inline]
 __mutex_lock+0x647/0x1260 kernel/locking/mutex.c:1072
 paste_selection+0x125/0x46d drivers/tty/vt/selection.c:372
 tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3047
 vt_ioctl+0x1775/0x24d0 drivers/tty/vt/vt_ioctl.c:372
 tty_ioctl+0x5b0/0x15c0 drivers/tty/tty_io.c:2669
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45cba9
Code: Bad RIP value.
RSP: 002b:00007f225afbcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004eff40 RCX: 000000000045cba9
RDX: 0000000020000000 RSI: 000000000000541c RDI: 0000000000000003
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000589 R14: 00000000004c856f R15: 00007f225afbd6d4

Showing all locks held in the system:
3 locks held by kworker/u4:3/170:
 #0: 00000000daf2d8e8 ((wq_completion)"events_unbound"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2126
 #1: 0000000025cf11fb ((work_completion)(&buf->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2130
 #2: 0000000028c33649 (&buf->lock){+.+.}, at: flush_to_ldisc+0x3e/0x390 drivers/tty/tty_buffer.c:500
1 lock held by khungtaskd/1083:
 #0: 00000000f19076f4 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4440
1 lock held by in:imklog/6132:
 #0: 00000000b688ff9d (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by agetty/12018:
 #0: 00000000384e366b (&tty->legacy_mutex){+.+.}, at: tty_lock+0x6a/0xa0 drivers/tty/tty_mutex.c:19
 #1: 0000000092335d3b (&tty->ldisc_sem){++++}, at: __tty_ldisc_lock drivers/tty/tty_ldisc.c:320 [inline]
 #1: 0000000092335d3b (&tty->ldisc_sem){++++}, at: tty_ldisc_lock+0x4d/0x90 drivers/tty/tty_ldisc.c:344
3 locks held by kworker/u4:1/29721:
2 locks held by syz-executor.3/31297:
 #0: 0000000092335d3b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000028c33649 (&buf->lock){+.+.}, at: paste_selection+0x125/0x46d drivers/tty/vt/selection.c:372
2 locks held by syz-executor.3/31305:
 #0: 0000000092335d3b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000028c33649 (&buf->lock){+.+.}, at: paste_selection+0x125/0x46d drivers/tty/vt/selection.c:372
2 locks held by syz-executor.3/31312:
 #0: 0000000092335d3b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000028c33649 (&buf->lock){+.+.}, at: paste_selection+0x125/0x46d drivers/tty/vt/selection.c:372

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

NMI backtrace for cpu 0
CPU: 0 PID: 1083 Comm: khungtaskd Not tainted 4.19.132-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1eb lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x30b/0x410 kernel/kthread.c:246
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3696 Comm: systemd-journal Not tainted 4.19.132-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__x64_sys_open+0x26/0xb0 fs/open.c:1098
Code: 00 00 00 00 53 48 89 fb 48 83 ec 10 e8 f3 7f c0 ff 48 8d 7b 60 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 <75> 57 48 8d 7b 68 48 8b 4b 60 48 b8 00 00 00 00 00 fc ff df 48 89
RSP: 0018:ffff888093ee7f08 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff888093ee7f58 RCX: ffffffff810098b1
RDX: 1ffff110127dcff7 RSI: ffffffff81a9284d RDI: ffff888093ee7fb8
RBP: ffff888093ee7f58 R08: 0000000000000000 R09: 0000000000000223
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000100
R13: ffffffff88d25b58 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f71fa7a78c0(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f71f7d3f000 CR3: 0000000093f27000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f71f9d37840
Code: 73 01 c3 48 8b 0d 68 77 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 bb 20 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24
RSP: 002b:00007ffcd89db1e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007ffcd89db4f0 RCX: 00007f71f9d37840
RDX: 00000000000001a0 RSI: 0000000000080042 RDI: 000055775ad38590
RBP: 000000000000000d R08: 0000000000000000 R09: 00000000ffffffff
R10: 0000000000000069 R11: 0000000000000246 R12: 00000000ffffffff
R13: 000055775ad2c060 R14: 00007ffcd89db4b0 R15: 000055775ad38890

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/14 17:43 linux-4.19.y dce0f88600e4 6f458026 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.