syzbot


INFO: task hung in tty_set_termios (2)

Status: auto-obsoleted due to no activity on 2022/10/05 22:41
Reported-by: syzbot+755bda9c740805ece0dc@syzkaller.appspotmail.com
First crash: 1008d, last: 897d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in tty_set_termios (3) serial 1 319d 319d 0/28 auto-obsoleted due to no activity on 2024/04/06 00:03
upstream INFO: task hung in tty_set_termios serial 1 2428d 2427d 8/28 fixed on 2018/07/09 18:05
android-49 INFO: task hung in tty_set_termios 1 2341d 2341d 0/3 auto-closed as invalid on 2019/02/22 14:59
linux-4.19 INFO: task hung in tty_set_termios 1 1464d 1464d 0/1 auto-closed as invalid on 2021/03/18 18:50
upstream INFO: task hung in tty_set_termios (2) serial 2 1152d 1190d 0/28 auto-closed as invalid on 2021/12/25 14:45

Sample crash report:
wlan1: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
wlan1: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
INFO: task syz-executor.5:15646 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5  D28600 15646   8134 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
 __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+0x34c/0xb60 drivers/tty/tty_ioctl.c:772
 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/0x1630 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:0x7eff04778109
Code: Bad RIP value.
RSP: 002b:00007eff030ed168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007eff0488af60 RCX: 00007eff04778109
RDX: 00000000200003c0 RSI: 00000000402c542b RDI: 0000000000000004
RBP: 00007eff047d20ad R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd8a49ea6f R14: 00007eff030ed300 R15: 0000000000022000
INFO: task syz-executor.5:15647 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5  D29240 15647   8134 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 paste_selection+0x125/0x470 drivers/tty/vt/selection.c:372
 tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3072
 vt_ioctl+0x163e/0x2380 drivers/tty/vt/vt_ioctl.c:372
 tty_ioctl+0x5b0/0x1630 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:0x7eff04778109
Code: Bad RIP value.
RSP: 002b:00007eff030cc168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007eff0488b030 RCX: 00007eff04778109
RDX: 0000000020000100 RSI: 000000000000541c RDI: 0000000000000004
RBP: 00007eff047d20ad R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd8a49ea6f R14: 00007eff030cc300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1571:
 #0: 000000001fd5fed7 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7810:
 #0: 00000000d0f5c3f7 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
8 locks held by syz-executor.3/15572:
2 locks held by syz-executor.5/15646:
 #0: 00000000e25b4d6e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 00000000759c1544 (&tty->termios_rwsem){++++}, at: tty_set_termios+0xec/0x830 drivers/tty/tty_ioctl.c:328
2 locks held by syz-executor.5/15647:
 #0: 00000000e25b4d6e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000037dc66cd (&buf->lock){+.+.}, at: paste_selection+0x125/0x470 drivers/tty/vt/selection.c:372

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

NMI backtrace for cpu 0
CPU: 0 PID: 1571 Comm: khungtaskd Not tainted 4.19.211-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/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 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: 15572 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:lock_is_held_type+0x30/0x210 kernel/locking/lockdep.c:3939
Code: 00 fc ff df 41 54 55 48 89 fd 53 65 48 8b 1c 25 c0 df 01 00 48 8d bb 84 08 00 00 48 83 ec 08 48 89 fa 48 c1 ea 03 0f b6 14 02 <48> 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 5e 01 00 00 8b
RSP: 0018:ffff8880ba107f88 EFLAGS: 00000807
RAX: dffffc0000000000 RBX: ffff888055d461c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff888055d46a44
RBP: ffffffff89f85f20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66505b R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f4c58c85700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4eb9e14010 CR3: 00000000b4fcc000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 lock_is_held include/linux/lockdep.h:344 [inline]
 rcu_read_lock_sched_held+0x16c/0x1d0 kernel/rcu/update.c:118
 trace_local_timer_exit arch/x86/include/asm/trace/irq_vectors.h:56 [inline]
 smp_apic_timer_interrupt+0x3ca/0x550 arch/x86/kernel/apic/apic.c:1097
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:slow_down_io arch/x86/include/asm/paravirt.h:268 [inline]
RIP: 0010:outb_p arch/x86/include/asm/io.h:333 [inline]
RIP: 0010:vga_io_w include/video/vga.h:209 [inline]
RIP: 0010:setop drivers/video/fbdev/vga16fb.c:150 [inline]
RIP: 0010:vga_imageblit_expand drivers/video/fbdev/vga16fb.c:1162 [inline]
RIP: 0010:vga16fb_imageblit+0x855/0x2260 drivers/video/fbdev/vga16fb.c:1260
Code: 10 82 f1 89 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 47 19 00 00 ff 15 73 07 53 06 31 c0 ba cf 03 00 00 ee <48> c7 c2 10 82 f1 89 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80
RSP: 0018:ffff8880543bf188 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: ffffffff8128f470 RCX: ffffffff839e79cc
RDX: 00000000000003cf RSI: ffffffff839e79da RDI: 0000000000000005
RBP: ffff8880b06a8e84 R08: ffff8880b0759f1f R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b0799b08
R13: ffff8880b0759f10 R14: ffff8880b06a8ea0 R15: 0000000000000001
 soft_cursor+0x514/0xa30 drivers/video/fbdev/core/softcursor.c:74
 bit_cursor+0x1126/0x1740 drivers/video/fbdev/core/bitblit.c:377
 fbcon_cursor+0x531/0x710 drivers/video/fbdev/core/fbcon.c:1312
 hide_cursor+0x85/0x2c0 drivers/tty/vt/vt.c:902
 do_con_write+0x13d3/0x1d90 drivers/tty/vt/vt.c:2622
 con_put_char+0x96/0xe0 drivers/tty/vt/vt.c:3173
 tty_put_char+0xb7/0x150 drivers/tty/tty_io.c:2892
 do_output_char+0x155/0x850 drivers/tty/n_tty.c:486
 __process_echoes+0x38e/0x9f0 drivers/tty/n_tty.c:737
 flush_echoes drivers/tty/n_tty.c:827 [inline]
 __receive_buf drivers/tty/n_tty.c:1646 [inline]
 n_tty_receive_buf_common+0xc0c/0x2a90 drivers/tty/n_tty.c:1740
 tty_ldisc_receive_buf+0xa9/0x190 drivers/tty/tty_buffer.c:456
 paste_selection+0x1e5/0x470 drivers/tty/vt/selection.c:390
 tioclinux+0x122/0x510 drivers/tty/vt/vt.c:3072
 vt_ioctl+0x163e/0x2380 drivers/tty/vt/vt_ioctl.c:372
 tty_ioctl+0x5b0/0x1630 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:0x7f4c5a310109
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4c58c85168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4c5a422f60 RCX: 00007f4c5a310109
RDX: 0000000020000100 RSI: 000000000000541c RDI: 0000000000000004
RBP: 00007f4c5a36a0ad R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcddc85eaf R14: 00007f4c58c85300 R15: 0000000000022000
----------------
Code disassembly (best guess), 3 bytes skipped:
   0:	df 41 54             	filds  0x54(%rcx)
   3:	55                   	push   %rbp
   4:	48 89 fd             	mov    %rdi,%rbp
   7:	53                   	push   %rbx
   8:	65 48 8b 1c 25 c0 df 	mov    %gs:0x1dfc0,%rbx
   f:	01 00
  11:	48 8d bb 84 08 00 00 	lea    0x884(%rbx),%rdi
  18:	48 83 ec 08          	sub    $0x8,%rsp
  1c:	48 89 fa             	mov    %rdi,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
  23:	0f b6 14 02          	movzbl (%rdx,%rax,1),%edx
* 27:	48 89 f8             	mov    %rdi,%rax <-- trapping instruction
  2a:	83 e0 07             	and    $0x7,%eax
  2d:	83 c0 03             	add    $0x3,%eax
  30:	38 d0                	cmp    %dl,%al
  32:	7c 08                	jl     0x3c
  34:	84 d2                	test   %dl,%dl
  36:	0f 85 5e 01 00 00    	jne    0x19a
  3c:	8b                   	.byte 0x8b

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/07 22:41 linux-4.19.y 3f8a27f9e27b b2706118 .config console log report info ci2-linux-4-19 INFO: task hung in tty_set_termios
2022/03/18 02:03 linux-4.19.y 3f8a27f9e27b e2d91b1d .config console log report info ci2-linux-4-19 INFO: task hung in tty_set_termios
2022/02/17 21:03 linux-4.19.y 3f8a27f9e27b 3cd800e4 .config console log report info ci2-linux-4-19 INFO: task hung in tty_set_termios
* Struck through repros no longer work on HEAD.