syzbot


INFO: task hung in tty_set_termios (3)

Status: auto-obsoleted due to no activity on 2024/04/06 00:03
Subsystems: serial
[Documentation on labels]
First crash: 116d, last: 116d
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 694d 804d 0/1 auto-obsoleted due to no activity on 2022/10/05 22:41
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 2138d 2138d 0/3 auto-closed as invalid on 2019/02/22 14:59
linux-4.19 INFO: task hung in tty_set_termios 1 1260d 1260d 0/1 auto-closed as invalid on 2021/03/18 18:50
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 syz-executor.0:3155 blocked for more than 143 seconds.
      Not tainted 6.7.0-rc8-syzkaller-00177-g52b1853b080a #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:28912 pid:3155  tgid:3152  ppid:3096   flags:0x20000006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5376 [inline]
 __schedule+0xedb/0x5af0 kernel/sched/core.c:6688
 __schedule_loop kernel/sched/core.c:6763 [inline]
 schedule+0xe9/0x270 kernel/sched/core.c:6778
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6835
 rwsem_down_write_slowpath kernel/locking/rwsem.c:1178 [inline]
 __down_write_common+0x948/0x1400 kernel/locking/rwsem.c:1306
 tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
 set_termios+0x5ab/0x7e0 drivers/tty/tty_ioctl.c:520
 tty_mode_ioctl+0x56f/0xcf0 drivers/tty/tty_ioctl.c:807
 n_tty_ioctl_helper+0x4b/0x2b0 drivers/tty/tty_ioctl.c:986
 n_tty_ioctl+0x7f/0x370 drivers/tty/n_tty.c:2511
 tty_ioctl+0x6fd/0x1580 drivers/tty/tty_io.c:2789
 tty_compat_ioctl+0x258/0x4e0 drivers/tty/tty_io.c:2930
 __do_compat_sys_ioctl+0x2bf/0x330 fs/ioctl.c:972
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0x62/0xe0 arch/x86/entry/common.c:321
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:346
 entry_SYSENTER_compat_after_hwframe+0x70/0x7a
RIP: 0023:0xf7f64579
RSP: 002b:00000000f7f3e5ac EFLAGS: 00000292 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 000000000000000a RCX: 0000000000005402
RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8cfab760 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline]
 #0: ffffffff8cfab760 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
 #0: ffffffff8cfab760 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x75/0x340 kernel/locking/lockdep.c:6614
2 locks held by kworker/u4:11/2449:
2 locks held by getty/4824:
 #0: ffff88814b5fd0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xfc6/0x1490 drivers/tty/n_tty.c:2201
4 locks held by syz-executor.0/3046:
 #0: ffff88807b0250a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88807b025130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline]
 #1: ffff88807b025130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline]
 #1: ffff88807b025130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1092
 #2: ffff88807b0252e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1c8/0x1130 drivers/tty/n_tty.c:2362
 #3: ffffc90009a2d380 (&ldata->output_lock){+.+.}-{3:3}, at: process_output_block drivers/tty/n_tty.c:529 [inline]
 #3: ffffc90009a2d380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x539/0x1130 drivers/tty/n_tty.c:2379
6 locks held by syz-executor.5/3052:
4 locks held by syz-executor.4/3048:
 #0: ffff8880535100a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff888053510130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline]
 #1: ffff888053510130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline]
 #1: ffff888053510130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1092
 #2: ffff8880535102e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1c8/0x1130 drivers/tty/n_tty.c:2362
 #3: ffffc90009a9b380 (&ldata->output_lock){+.+.}-{3:3}, at: process_output_block drivers/tty/n_tty.c:529 [inline]
 #3: ffffc90009a9b380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x539/0x1130 drivers/tty/n_tty.c:2379
4 locks held by syz-executor.3/3064:
 #0: ffff88809024b0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88809024b130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline]
 #1: ffff88809024b130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline]
 #1: ffff88809024b130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1092
 #2: ffff88809024b2e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1c8/0x1130 drivers/tty/n_tty.c:2362
 #3: ffffc90009da3380 (&ldata->output_lock){+.+.}-{3:3}, at: process_output_block drivers/tty/n_tty.c:529 [inline]
 #3: ffffc90009da3380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x539/0x1130 drivers/tty/n_tty.c:2379
4 locks held by syz-executor.1/3071:
 #0: ffff88809024f0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88809024f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline]
 #1: ffff88809024f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline]
 #1: ffff88809024f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1092
 #2: ffff88809024f2e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1c8/0x1130 drivers/tty/n_tty.c:2362
 #3: ffffc90009e03380 (&ldata->output_lock){+.+.}-{3:3}, at: process_output_block drivers/tty/n_tty.c:529 [inline]
 #3: ffffc90009e03380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x539/0x1130 drivers/tty/n_tty.c:2379
4 locks held by syz-executor.2/3082:
 #0: ffff888088c780a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff888088c78130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline]
 #1: ffff888088c78130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline]
 #1: ffff888088c78130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1092
 #2: ffff888088c782e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1c8/0x1130 drivers/tty/n_tty.c:2362
 #3: ffffc90009ee9380 (&ldata->output_lock){+.+.}-{3:3}, at: process_output_block drivers/tty/n_tty.c:529 [inline]
 #3: ffffc90009ee9380 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0x539/0x1130 drivers/tty/n_tty.c:2379
2 locks held by syz-executor.0/3155:
 #0: ffff88807b0250a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88807b0252e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.4/3161:
 #0: ffff8880535100a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff8880535102e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.5/3165:
 #0: ffff88807b0230a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88807b0232e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.1/3171:
 #0: ffff88809024f0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88809024f2e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.3/3176:
 #0: ffff88809024b0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88809024b2e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.2/3181:
 #0: ffff888088c780a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff888088c782e8 (&tty->termios_rwsem){++++}-{3:3}, at: tty_set_termios+0x117/0x9a0 drivers/tty/tty_ioctl.c:337
2 locks held by syz-executor.0/3255:
 #0: ffff88807b0250a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88807b0252e8 (&tty->termios_rwsem){++++}-{3:3}, at: set_termios+0x122/0x7e0 drivers/tty/tty_ioctl.c:457
2 locks held by syz-executor.4/3260:
 #0: ffff8880535100a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff8880535102e8 (&tty->termios_rwsem){++++}-{3:3}, at: set_termios+0x122/0x7e0 drivers/tty/tty_ioctl.c:457
2 locks held by syz-executor.5/3271:
 #0: ffff88807b0230a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88807b0232e8 (&tty->termios_rwsem){++++}-{3:3}, at: set_termios+0x122/0x7e0 drivers/tty/tty_ioctl.c:457
2 locks held by syz-executor.1/3267:
 #0: ffff88809024f0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff88809024f2e8 (&tty->termios_rwsem){++++}-{3:3}, at: set_termios+0x122/0x7e0 drivers/tty/tty_ioctl.c:457
2 locks held by syz-executor.2/3282:
 #0: ffff888088c780a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffff888088c782e8 (&tty->termios_rwsem){++++}-{3:3}, at: set_termios+0x122/0x7e0 drivers/tty/tty_ioctl.c:457
2 locks held by syz-executor.3/3324:

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

NMI backtrace for cpu 0
CPU: 0 PID: 29 Comm: khungtaskd Not tainted 6.7.0-rc8-syzkaller-00177-g52b1853b080a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x277/0x390 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x299/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xf87/0x1210 kernel/hung_task.c:379
 kthread+0x2c6/0x3a0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 30837 Comm: syz-executor.5 Not tainted 6.7.0-rc8-syzkaller-00177-g52b1853b080a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:write_comp_data+0x0/0x80 kernel/kcov.c:230
Code: 65 8b 15 2b 50 7c 7e 81 e2 00 01 ff 00 75 10 65 48 8b 04 25 c0 bc 03 00 48 8b 80 f0 15 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 <49> 89 d2 49 89 f8 49 89 f1 65 48 8b 14 25 c0 bc 03 00 65 8b 05 ef
RSP: 0018:ffffc900001f0bb0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000002af31dc RCX: ffffffff88a1604d
RDX: 00000000000186a0 RSI: 00000000000f4240 RDI: 0000000000000005
RBP: 000000a7c5ac471b R08: 0000000000000006 R09: 0000000000000000
R10: 000000a7c5ac471b R11: 0000000000000003 R12: 00000000000186a0
R13: 0000000000000003 R14: 000000000044b82f R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9900000(0063) knlGS:00000000f7f2fb40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 000000c00166e000 CR3: 0000000049c43000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 pie_calculate_probability+0x2ad/0x850 net/sched/sch_pie.c:345
 fq_pie_timer+0x215/0x5a0 net/sched/sch_fq_pie.c:391
 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x764/0xb20 kernel/time/timer.c:2022
 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
 __do_softirq+0x21a/0x8de kernel/softirq.c:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644
 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_acquire+0x1ef/0x520 kernel/locking/lockdep.c:5722
Code: c1 05 fd 83 9a 7e 83 f8 01 0f 85 b4 02 00 00 9c 58 f6 c4 02 0f 85 9f 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0018:ffffc9001f047bf0 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff92003e08f80 RCX: ffffffff816714ce
RDX: 0000000000000001 RSI: ffffffff8accb1c0 RDI: ffffffff8b2f0220
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff23e39f4
R10: ffffffff91f1cfa7 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: ffff888039562498 R15: 0000000000000000
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 io_cq_lock io_uring/io_uring.c:660 [inline]
 __io_cqring_overflow_flush+0x14c/0x570 io_uring/io_uring.c:713
 io_cqring_do_overflow_flush io_uring/io_uring.c:739 [inline]
 io_cqring_wait io_uring/io_uring.c:2651 [inline]
 __do_sys_io_uring_enter+0x1fcc/0x2690 io_uring/io_uring.c:3757
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0x62/0xe0 arch/x86/entry/common.c:321
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:346
 entry_SYSENTER_compat_after_hwframe+0x70/0x7a
RIP: 0023:0xf7f34579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f7f2f5ac EFLAGS: 00000292 ORIG_RAX: 00000000000001aa
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000000001
RDX: 0000000000000004 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/07 00:01 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 INFO: task hung in tty_set_termios
* Struck through repros no longer work on HEAD.