syzbot


INFO: task hung in sys_io_uring_register

Status: auto-closed as invalid on 2022/03/23 08:02
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+9aeafc1a0605c445cbaa@syzkaller.appspotmail.com
First crash: 855d, last: 855d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in sys_io_uring_register (2) io-uring syz error error 2 425d 421d 0/26 auto-obsoleted due to no activity on 2023/06/25 22:43
linux-5.15 INFO: task hung in sys_io_uring_register 1 26d 26d 0/3 upstream: reported on 2024/03/31 12:11

Sample crash report:
INFO: task syz-executor.1:11882 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc6-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:26768 pid:11882 ppid:  7424 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:680
 __mutex_lock kernel/locking/mutex.c:740 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:792
 __do_sys_io_uring_register fs/io_uring.c:11089 [inline]
 __se_sys_io_uring_register+0x146/0x1670 fs/io_uring.c:11070
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f1a2877ae99
RSP: 002b:00007f1a270cf168 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 00007f1a2888e030 RCX: 00007f1a2877ae99
RDX: 0000000000000000 RSI: 000000000000000a RDI: 0000000000000003
RBP: 00007f1a287d4ff1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe691aaebf R14: 00007f1a270cf300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/26:
 #0: ffffffff8cb1de00 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by klogd/2963:
2 locks held by getty/3283:
 #0: ffff88814ab4b098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002b962e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6c5/0x1c60 drivers/tty/n_tty.c:2113
2 locks held by kworker/u4:54/26108:
 #0: ffff8880b9b395d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x25/0x110 kernel/sched/core.c:478
 #1: ffff8880b9b27888 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x4c1/0x780 kernel/sched/psi.c:880
1 lock held by syz-executor.1/11877:
 #0: ffff8880307180a8 (&ctx->uring_lock){+.+.}-{3:3}, at: tctx_task_work+0x2e5/0x560 fs/io_uring.c:2242
1 lock held by syz-executor.1/11882:
 #0: ffff8880307180a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_register fs/io_uring.c:11089 [inline]
 #0: ffff8880307180a8 (&ctx->uring_lock){+.+.}-{3:3}, at: __se_sys_io_uring_register+0x146/0x1670 fs/io_uring.c:11070

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

NMI backtrace for cpu 1
CPU: 1 PID: 26 Comm: khungtaskd Not tainted 5.16.0-rc6-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+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 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+0xc82/0xcd0 kernel/hung_task.c:295
 kthread+0x468/0x490 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2956 Comm: syslogd Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ns_of_pid include/linux/pid.h:155 [inline]
RIP: 0010:task_active_pid_ns kernel/pid.c:509 [inline]
RIP: 0010:pid_vnr+0x84/0x1c0 kernel/pid.c:488
Code: c1 e8 03 42 8a 04 20 84 c0 0f 85 e9 00 00 00 8b 43 04 48 c1 e0 04 48 8d 9c 03 d8 00 00 00 48 89 d8 48 c1 e8 03 42 80 3c 20 00 <74> 08 48 89 df e8 92 42 79 00 4c 8b 2b 4d 85 f6 74 5b 49 8d 9d 80
RSP: 0018:ffffc90001a2f990 EFLAGS: 00000246
RAX: 1ffff1100fdb4443 RBX: ffff88807eda2218 RCX: ffff88807edf5700
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88807eda2144
RBP: ffffc90001a2fb50 R08: dffffc0000000000 R09: ffffc90001a2fa60
R10: fffff52000345f50 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff8880335c3000 R14: 0000000000000000 R15: 1ffff92000345f48
FS:  00007f385a8df800(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055d55f2909e8 CR3: 000000007f11f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 scm_set_cred include/net/scm.h:60 [inline]
 __unix_dgram_recvmsg+0x9b2/0x1220 net/unix/af_unix.c:2351
 sock_recvmsg_nosec net/socket.c:944 [inline]
 sock_recvmsg net/socket.c:962 [inline]
 sock_read_iter+0x3a7/0x4d0 net/socket.c:1035
 call_read_iter include/linux/fs.h:2156 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0xaf9/0xe60 fs/read_write.c:481
 ksys_read+0x18f/0x2c0 fs/read_write.c:619
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f385aa6b8fe
Code: c0 e9 e6 fe ff ff 50 48 8d 3d 0e c7 09 00 e8 c9 cf 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28
RSP: 002b:00007ffc3fda47d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f385aa6b8fe
RDX: 00000000000000ff RSI: 000055b728930950 RDI: 0000000000000000
RBP: 000055b728930910 R08: 00007f385aafb040 R09: 00007f385aafb0c0
R10: 00007f385aafafc0 R11: 0000000000000246 R12: 000055b72893099a
R13: 000055b728930950 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
----------------
Code disassembly (best guess):
   0:	c1 e8 03             	shr    $0x3,%eax
   3:	42 8a 04 20          	mov    (%rax,%r12,1),%al
   7:	84 c0                	test   %al,%al
   9:	0f 85 e9 00 00 00    	jne    0xf8
   f:	8b 43 04             	mov    0x4(%rbx),%eax
  12:	48 c1 e0 04          	shl    $0x4,%rax
  16:	48 8d 9c 03 d8 00 00 	lea    0xd8(%rbx,%rax,1),%rbx
  1d:	00
  1e:	48 89 d8             	mov    %rbx,%rax
  21:	48 c1 e8 03          	shr    $0x3,%rax
  25:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1)
* 2a:	74 08                	je     0x34 <-- trapping instruction
  2c:	48 89 df             	mov    %rbx,%rdi
  2f:	e8 92 42 79 00       	callq  0x7942c6
  34:	4c 8b 2b             	mov    (%rbx),%r13
  37:	4d 85 f6             	test   %r14,%r14
  3a:	74 5b                	je     0x97
  3c:	49                   	rex.WB
  3d:	8d                   	.byte 0x8d
  3e:	9d                   	popfq
  3f:	80                   	.byte 0x80

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/23 08:01 upstream 3f066e882bf1 6caa12e4 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in sys_io_uring_register
* Struck through repros no longer work on HEAD.