syzbot


INFO: task hung in n_tty_poll (2)

Status: upstream: reported C repro on 2022/06/06 01:17
Reported-by: syzbot+fbbcb83fabc313112d43@syzkaller.appspotmail.com
First crash: 779d, last: 689d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in n_tty_poll C error 4 775d 1167d 0/1 upstream: reported C repro on 2021/05/13 07:45
linux-4.14 INFO: task hung in n_tty_poll 1 1207d 1207d 0/1 auto-closed as invalid on 2021/08/01 20:04
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2022/10/13 02:16 0m bisect fix linux-4.14.y error job log
2022/09/04 02:09 21m bisect fix linux-4.14.y OK (0) job log log
2022/08/05 01:37 31m bisect fix linux-4.14.y OK (0) job log log
2022/07/06 01:16 21m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
INFO: task syz-executor391:7978 blocked for more than 140 seconds.
      Not tainted 4.14.281-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor391 D27040  7978   7977 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2811 [inline]
 __schedule+0x88b/0x1de0 kernel/sched/core.c:3387
 schedule+0x8d/0x1b0 kernel/sched/core.c:3431
 schedule_timeout+0x80a/0xe90 kernel/time/timer.c:1724
 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:2894
 n_tty_poll+0x4de/0x7d0 drivers/tty/n_tty.c:2412
 tty_poll+0x129/0x1a0 drivers/tty/tty_io.c:2102
 do_select+0xa83/0x1290 fs/select.c:513
 core_sys_select+0x32f/0x6a0 fs/select.c:656
 do_pselect fs/select.c:733 [inline]
 SYSC_pselect6 fs/select.c:774 [inline]
 SyS_pselect6+0x358/0x3c0 fs/select.c:759
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f4f60f1e3c9
RSP: 002b:00007fffb4b174f8 EFLAGS: 00000246 ORIG_RAX: 000000000000010e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4f60f1e3c9
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000040
RBP: 00007fffb4b17530 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000140 R11: 0000000000000246 R12: 00007f4f60ee1990
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1532:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff87026b7c>] debug_show_all_locks+0x7c/0x21a kernel/locking/lockdep.c:4548
1 lock held by syz-executor391/7978:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff83552522>] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284

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

NMI backtrace for cpu 1
CPU: 1 PID: 1532 Comm: khungtaskd Not tainted 4.14.281-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: 2874 Comm: kworker/u4:4 Not tainted 4.14.281-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound flush_to_ldisc
task: ffff8880ac2ce500 task.stack: ffff8880ac0d8000
RIP: 0010:mark_lock+0xa2/0x1050 kernel/locking/lockdep.c:3168
RSP: 0018:ffff8880ac0df770 EFLAGS: 00000806
RAX: dffffc0000000000 RBX: ffffffff8ba48d30 RCX: 1ffff11015859dce
RDX: 1ffffffff17491ac RSI: ffff8880ac2cee50 RDI: ffffffff8ba48d60
RBP: ffff8880ac2cee50 R08: 0000000000000001 R09: 0000000000040458
R10: ffff8880ac2cee50 R11: ffff8880ac2ce500 R12: 0000000000000100
R13: ffff8880ac2ce500 R14: ffff8880ac2cee70 R15: 0000000000000008
FS:  0000000000000000(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f81c3892000 CR3: 00000000a1231000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __lock_acquire+0x5fc/0x3f20 kernel/locking/lockdep.c:3452
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __mutex_lock_common kernel/locking/mutex.c:756 [inline]
 __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893
 commit_echoes+0x4c/0x1e0 drivers/tty/n_tty.c:778
 n_tty_receive_char_fast drivers/tty/n_tty.c:1449 [inline]
 n_tty_receive_buf_fast drivers/tty/n_tty.c:1609 [inline]
 __receive_buf drivers/tty/n_tty.c:1644 [inline]
 n_tty_receive_buf_common+0x1795/0x25a0 drivers/tty/n_tty.c:1742
 tty_ldisc_receive_buf+0x9e/0x170 drivers/tty/tty_buffer.c:455
 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:475 [inline]
 flush_to_ldisc+0x1e9/0x440 drivers/tty/tty_buffer.c:527
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: 00 48 69 d8 50 01 00 00 48 81 eb 50 01 00 00 48 81 c3 00 db 9e 8b 48 8d 7b 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 07 0c 00 00 4c 89 e0 48 23 43 30 0f 84 9c 00 
----------------
Code disassembly (best guess):
   0:	00 48 69             	add    %cl,0x69(%rax)
   3:	d8 50 01             	fcoms  0x1(%rax)
   6:	00 00                	add    %al,(%rax)
   8:	48 81 eb 50 01 00 00 	sub    $0x150,%rbx
   f:	48 81 c3 00 db 9e 8b 	add    $0xffffffff8b9edb00,%rbx
  16:	48 8d 7b 30          	lea    0x30(%rbx),%rdi
  1a:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  21:	fc ff df
  24:	48 89 fa             	mov    %rdi,%rdx
  27:	48 c1 ea 03          	shr    $0x3,%rdx
* 2b:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2f:	0f 85 07 0c 00 00    	jne    0xc3c
  35:	4c 89 e0             	mov    %r12,%rax
  38:	48 23 43 30          	and    0x30(%rbx),%rax
  3c:	0f                   	.byte 0xf
  3d:	84                   	.byte 0x84
  3e:	9c                   	pushfq

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/06 01:16 linux-4.14.y 501eec4f9e13 c8857892 .config console log report syz C ci2-linux-4-14 INFO: task hung in n_tty_poll
* Struck through repros no longer work on HEAD.