syzbot


INFO: task hung in tty_set_termios

Status: auto-closed as invalid on 2021/03/18 18:50
Reported-by: syzbot+b4dffdb60f8af0ad5d8c@syzkaller.appspotmail.com
First crash: 1260d, last: 1260d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in tty_set_termios (2) 3 693d 804d 0/1 auto-obsoleted due to no activity on 2022/10/05 22:41
upstream INFO: task hung in tty_set_termios (3) serial 1 115d 115d 0/26 auto-obsoleted due to no activity on 2024/04/06 00:03
upstream INFO: task hung in tty_set_termios serial 1 2224d 2223d 8/26 fixed on 2018/07/09 18:05
android-49 INFO: task hung in tty_set_termios 1 2137d 2137d 0/3 auto-closed as invalid on 2019/02/22 14:59
upstream INFO: task hung in tty_set_termios (2) serial 2 948d 986d 0/26 auto-closed as invalid on 2021/12/25 14:45

Sample crash report:
INFO: task agetty:7823 blocked for more than 140 seconds.
      Not tainted 4.19.158-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
agetty          D27504  7823      1 0x00000000
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 __rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
 rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
 call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
 __down_write arch/x86/include/asm/rwsem.h:142 [inline]
 down_write+0x4f/0x90 kernel/locking/rwsem.c:72
 tty_set_termios+0xec/0x830 drivers/tty/tty_ioctl.c:328
 set_termios.part.0+0x2b1/0x4c0 drivers/tty/tty_ioctl.c:414
 set_termios drivers/tty/tty_ioctl.c:368 [inline]
 tty_mode_ioctl+0x916/0xb60 drivers/tty/tty_ioctl.c:749
 n_tty_ioctl_helper+0x55/0x3a0 drivers/tty/tty_ioctl.c:940
 n_tty_ioctl+0x56/0x360 drivers/tty/n_tty.c:2464
 tty_ioctl+0x65d/0x15c0 drivers/tty/tty_io.c:2678
 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:0x7f346189b6b8
Code: Bad RIP value.
RSP: 002b:00007fff65d4e960 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 00007f346189b6b8
RDX: 00007fff65d4e900 RSI: 0000000000005402 RDI: 0000000000000000
RBP: 00007fff65d4e900 R08: 0000000000000000 R09: 00007fff65d4e9f0
R10: 0000000000000000 R11: 0000000000000202 R12: 00007fff65d4e994
R13: 00007fff65d4eaf0 R14: 00007fff65d4e9f0 R15: 0000000000000000
INFO: task syz-executor.1:21665 blocked for more than 140 seconds.
      Not tainted 4.19.158-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D27456 21665   8160 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 __down_common kernel/locking/semaphore.c:221 [inline]
 __down+0x183/0x2a0 kernel/locking/semaphore.c:238
 down+0x57/0x80 kernel/locking/semaphore.c:62
 console_lock+0x25/0x80 kernel/printk/printk.c:2275
 set_selection+0x8e/0x12a0 drivers/tty/vt/selection.c:341
 tioclinux+0x110/0x510 drivers/tty/vt/vt.c:3051
 vt_ioctl+0x163e/0x2380 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:0x45deb9
Code: f9 00 48 8d 15 68 7e 61 01 48 89 14 24 e8 cf ce fa ff 0f b6 44 24 2f 3c 00 0f 85 10 01 00 00 e8 7d 7e fd ff 48 8d 05 ba 45 50 <00> 48 89 04 24 48 c7 44 24 08 11 00 00 00 e8 a4 87 fd ff 8b 44 24
RSP: 002b:00007f8a80d6bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000198c0 RCX: 000000000045deb9
RDX: 0000000020000040 RSI: 000000000000541c RDI: 0000000000000005
RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c
R13: 00007ffc3381fc4f R14: 00007f8a80d6c9c0 R15: 000000000118bf2c
INFO: task syz-executor.1:21670 blocked for more than 140 seconds.
      Not tainted 4.19.158-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D28608 21670   8160 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 __down_common kernel/locking/semaphore.c:221 [inline]
 __down+0x183/0x2a0 kernel/locking/semaphore.c:238
 down+0x57/0x80 kernel/locking/semaphore.c:62
 console_lock+0x25/0x80 kernel/printk/printk.c:2275
 paste_selection+0xed/0x46d drivers/tty/vt/selection.c:365
 tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3054
 vt_ioctl+0x163e/0x2380 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:0x45deb9
Code: f9 00 48 8d 15 68 7e 61 01 48 89 14 24 e8 cf ce fa ff 0f b6 44 24 2f 3c 00 0f 85 10 01 00 00 e8 7d 7e fd ff 48 8d 05 ba 45 50 <00> 48 89 04 24 48 c7 44 24 08 11 00 00 00 e8 a4 87 fd ff 8b 44 24
RSP: 002b:00007f8a80d4ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000019800 RCX: 000000000045deb9
RDX: 0000000020000080 RSI: 000000000000541c RDI: 0000000000000006
RBP: 000000000118c008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4
R13: 00007ffc3381fc4f R14: 00007f8a80d4b9c0 R15: 000000000118bfd4

Showing all locks held in the system:
1 lock held by khungtaskd/1567:
 #0: 000000005df44060 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4440
1 lock held by in:imklog/7817:
 #0: 00000000086533b6 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by agetty/7823:
 #0: 00000000274b25df (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 00000000c193235f (&tty->termios_rwsem){++++}, at: tty_set_termios+0xec/0x830 drivers/tty/tty_ioctl.c:328
1 lock held by syz-executor.1/21665:
 #0: 00000000857105ea (sel_lock){+.+.}, at: set_selection+0x89/0x12a0 drivers/tty/vt/selection.c:340
5 locks held by syz-executor.3/21666:

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

NMI backtrace for cpu 0
CPU: 0 PID: 1567 Comm: khungtaskd Not tainted 4.19.158-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+0x33f/0x460 kernel/kthread.c:259
 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: 21666 Comm: syz-executor.3 Not tainted 4.19.158-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:193 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:69 [inline]
RIP: 0010:write_comp_data+0x1d/0x70 kernel/kcov.c:122
Code: d1 48 89 11 c3 0f 1f 84 00 00 00 00 00 49 89 f1 49 89 fa 65 48 8b 34 25 80 df 01 00 65 8b 05 aa 0e 9d 7e a9 00 01 1f 00 75 4f <8b> 86 d8 12 00 00 83 f8 03 75 44 48 8b 86 e0 12 00 00 8b b6 dc 12
RSP: 0018:ffff8880386ff0b0 EFLAGS: 00000246
RAX: 0000000080000000 RBX: 0000000000000050 RCX: ffffffff83a86344
RDX: 0000000000000044 RSI: ffff8880ab4f8600 RDI: 0000000000000004
RBP: 0000000000000044 R08: 0000000000000010 R09: 0000000000000050
R10: 0000000000000004 R11: 0000000000000000 R12: ffff8880000a0044
R13: ffff8880000a0000 R14: 0000000000000000 R15: 00000000ecb55e4f
FS:  00007f8d0b8fc700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c00b655000 CR3: 000000009d80f000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 vga16fb_fillrect+0x9d4/0x1940 drivers/video/fbdev/vga16fb.c:922
 bit_clear+0x382/0x4d0 drivers/video/fbdev/core/bitblit.c:74
 fbcon_clear+0x5d6/0x690 drivers/video/fbdev/core/fbcon.c:1258
 fbcon_scroll+0x42e/0x3440 drivers/video/fbdev/core/fbcon.c:1756
 con_scroll+0x5f8/0x720 drivers/tty/vt/vt.c:637
 lf+0x262/0x2b0 drivers/tty/vt/vt.c:1491
 do_con_write+0x133e/0x1d90 drivers/tty/vt/vt.c:2768
 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
 process_output_block drivers/tty/n_tty.c:593 [inline]
 n_tty_write+0x3c0/0xff0 drivers/tty/n_tty.c:2331
 do_tty_write drivers/tty/tty_io.c:960 [inline]
 tty_write+0x496/0x810 drivers/tty/tty_io.c:1044
 __vfs_write+0xf7/0x770 fs/read_write.c:485
 __kernel_write+0x109/0x370 fs/read_write.c:506
 write_pipe_buf+0x153/0x1f0 fs/splice.c:798
 splice_from_pipe_feed fs/splice.c:503 [inline]
 __splice_from_pipe+0x389/0x800 fs/splice.c:627
 splice_from_pipe fs/splice.c:662 [inline]
 default_file_splice_write+0xd8/0x180 fs/splice.c:810
 do_splice_from fs/splice.c:852 [inline]
 direct_splice_actor+0x115/0x160 fs/splice.c:1025
 splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980
 do_splice_direct+0x1a7/0x270 fs/splice.c:1068
 do_sendfile+0x550/0xc30 fs/read_write.c:1447
 __do_sys_sendfile64 fs/read_write.c:1508 [inline]
 __se_sys_sendfile64+0x147/0x160 fs/read_write.c:1494
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45deb9
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8d0b8fbc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0000000000027f40 RCX: 000000000045deb9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000
R10: 0800000080004103 R11: 0000000000000246 R12: 000000000118bf2c
R13: 00007ffd8ff5530f R14: 00007f8d0b8fc9c0 R15: 000000000118bf2c

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/18 18:49 linux-4.19.y 2c746135a12e 0767f13f .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.