syzbot


INFO: task hung in release_tty (2)

Status: auto-closed as invalid on 2022/02/05 17:28
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 468d, last: 390d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in release_tty 2 865d 937d 0/1 auto-closed as invalid on 2020/11/18 01:32
linux-4.14 INFO: task hung in release_tty 6 870d 1069d 0/1 auto-closed as invalid on 2020/11/12 17:59
upstream INFO: task hung in release_tty 3 1005d 1060d 0/24 auto-closed as invalid on 2020/06/30 16:07

Sample crash report:
INFO: task syz-executor.2:2564 blocked for more than 143 seconds.
      Not tainted 5.15.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:26432 pid: 2564 ppid: 30380 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4969 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6250
 schedule+0xd2/0x260 kernel/sched/core.c:6323
 schedule_timeout+0x1db/0x2a0 kernel/time/timer.c:1857
 __down_common+0x2e0/0x420 kernel/locking/semaphore.c:224
 down+0x70/0x90 kernel/locking/semaphore.c:62
 console_lock+0x28/0x80 kernel/printk/printk.c:2524
 con_shutdown+0x3d/0x90 drivers/tty/vt/vt.c:3431
 release_tty+0xcb/0x610 drivers/tty/tty_io.c:1605
 tty_init_dev.part.0+0x12a/0x610 drivers/tty/tty_io.c:1474
 tty_init_dev include/linux/err.h:36 [inline]
 tty_open_by_driver drivers/tty/tty_io.c:2098 [inline]
 tty_open+0xb16/0x1000 drivers/tty/tty_io.c:2146
 chrdev_open+0x266/0x770 fs/char_dev.c:414
 do_dentry_open+0x4c8/0x1250 fs/open.c:822
 do_open fs/namei.c:3426 [inline]
 path_openat+0x1cad/0x2750 fs/namei.c:3559
 do_filp_open+0x1aa/0x400 fs/namei.c:3586
 do_sys_openat2+0x16d/0x4d0 fs/open.c:1212
 do_sys_open fs/open.c:1228 [inline]
 __do_sys_openat fs/open.c:1244 [inline]
 __se_sys_openat fs/open.c:1239 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1239
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb85f92ca04
RSP: 002b:00007fb85cecdcc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fb85fa8d020 RCX: 00007fb85f92ca04
RDX: 0000000000000002 RSI: 00007fb85cecdd60 RDI: 00000000ffffff9c
RBP: 00007fb85cecdd60 R08: 0000000000000000 R09: 000000000000000e
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002
R13: 00007fb85ffc0b2f R14: 00007fb85cece300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8b983a20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6461
1 lock held by in:imklog/6184:
 #0: ffff8880730bf770 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
1 lock held by vhost-25731/25732:
1 lock held by syz-executor.2/2564:
 #0: ffffffff8c393d68 (tty_mutex){+.+.}-{3:3}, at: tty_open_by_driver drivers/tty/tty_io.c:2062 [inline]
 #0: ffffffff8c393d68 (tty_mutex){+.+.}-{3:3}, at: tty_open+0x55e/0x1000 drivers/tty/tty_io.c:2146
5 locks held by syz-executor.2/2578:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 25732 Comm: vhost-25731 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:197
Code: 01 f0 4d 89 03 e9 63 fd ff ff b9 ff ff ff ff ba 08 00 00 00 4d 8b 03 48 0f bd ca 49 8b 45 00 48 63 c9 e9 64 ff ff ff 0f 1f 00 <65> 8b 05 49 ab 8a 7e 89 c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b
RSP: 0018:ffffc900057ffce8 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: ffffc90015f70000
RDX: 1ffff1100751a8ef RSI: ffffffff86c7bd09 RDI: 0000000000000003
RBP: ffff88803a8d01a8 R08: 0000000000000000 R09: ffffffff8fd45b5f
R10: ffffffff86c7bcfb R11: 0000000000000000 R12: ffff88803a8d4778
R13: 0000000000000000 R14: ffff88803a8d01a8 R15: ffff88803a8d01a8
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000002 CR3: 00000000793da000 CR4: 00000000003526e0
Call Trace:
 <TASK>
 vhost_get_avail_idx drivers/vhost/vhost.c:1021 [inline]
 vhost_enable_notify+0x579/0xa00 drivers/vhost/vhost.c:2540
 vhost_transport_do_send_pkt+0xd1d/0xfd0 drivers/vhost/vsock.c:122
 vhost_worker+0x23d/0x3d0 drivers/vhost/vhost.c:372
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
----------------
Code disassembly (best guess):
   0:	01 f0                	add    %esi,%eax
   2:	4d 89 03             	mov    %r8,(%r11)
   5:	e9 63 fd ff ff       	jmpq   0xfffffd6d
   a:	b9 ff ff ff ff       	mov    $0xffffffff,%ecx
   f:	ba 08 00 00 00       	mov    $0x8,%edx
  14:	4d 8b 03             	mov    (%r11),%r8
  17:	48 0f bd ca          	bsr    %rdx,%rcx
  1b:	49 8b 45 00          	mov    0x0(%r13),%rax
  1f:	48 63 c9             	movslq %ecx,%rcx
  22:	e9 64 ff ff ff       	jmpq   0xffffff8b
  27:	0f 1f 00             	nopl   (%rax)
* 2a:	65 8b 05 49 ab 8a 7e 	mov    %gs:0x7e8aab49(%rip),%eax        # 0x7e8aab7a <-- trapping instruction
  31:	89 c1                	mov    %eax,%ecx
  33:	48 8b 34 24          	mov    (%rsp),%rsi
  37:	81 e1 00 01 00 00    	and    $0x100,%ecx
  3d:	65                   	gs
  3e:	48                   	rex.W
  3f:	8b                   	.byte 0x8b

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/11/07 17:23 upstream b5013d084e03 4c1be0be .config log report info INFO: task hung in release_tty
ci-upstream-kasan-gce-smack-root 2021/08/21 22:46 upstream 9ff50bf2f2ff b599f2fc .config log report info INFO: task hung in release_tty
* Struck through repros no longer work on HEAD.