syzbot


INFO: task hung in io_uring_flush

Status: fixed on 2020/11/16 12:12
Subsystems: io-uring fs
[Documentation on labels]
Reported-by: syzbot+6338dcebf269a590b668@syzkaller.appspotmail.com
Fix commit: b7ddce3cbf01 io_uring: fix cancel of deferred reqs with ->files
First crash: 1354d, last: 1346d
Cause bisection: introduced by (bisect log) :
commit f86cd20c9454847a524ddbdcdec32c0380ed7c9b
Author: Jens Axboe <axboe@kernel.dk>
Date: Wed Jan 29 20:46:44 2020 +0000

  io_uring: fix linked command file table usage

Crash: INFO: task hung in io_uring_flush (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit b7ddce3cbf010edbfac6c6d8cc708560a7bcd7a4
Author: Pavel Begunkov <asml.silence@gmail.com>
Date: Sat Sep 5 21:45:14 2020 +0000

  io_uring: fix cancel of deferred reqs with ->files

  
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
INFO: task can't die in io_uring_flush fs 2 1348d 1353d 0/26 closed as dup on 2020/08/10 20:45
Discussions (1)
Title Replies (including bot) Last reply
INFO: task hung in io_uring_flush 3 (6) 2020/11/11 11:21

Sample crash report:
INFO: task syz-executor184:6851 blocked for more than 143 seconds.
      Not tainted 5.9.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor184 state:D stack:28096 pid: 6851 ppid:  6845 flags:0x80000002
Call Trace:
 context_switch kernel/sched/core.c:3778 [inline]
 __schedule+0x8e5/0x21e0 kernel/sched/core.c:4527
 schedule+0xd0/0x2a0 kernel/sched/core.c:4602
 io_uring_cancel_files fs/io_uring.c:8126 [inline]
 io_uring_flush+0x759/0xe60 fs/io_uring.c:8143
 filp_close+0xb4/0x170 fs/open.c:1276
 close_files fs/file.c:401 [inline]
 put_files_struct fs/file.c:429 [inline]
 put_files_struct+0x1cc/0x350 fs/file.c:426
 exit_files+0x7e/0xa0 fs/file.c:458
 do_exit+0xb43/0x29f0 kernel/exit.c:801
 do_group_exit+0x125/0x310 kernel/exit.c:903
 __do_sys_exit_group kernel/exit.c:914 [inline]
 __se_sys_exit_group kernel/exit.c:912 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:912
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43f298
Code: Bad RIP value.
RSP: 002b:00007fff11096d28 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043f298
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004beaa8 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000400a29 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d01a0 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1169:
 #0: ffffffff89bd6340 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:5825
1 lock held by in:imklog/6536:
 #0: ffff88809a28a430 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:930

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

NMI backtrace for cpu 1
CPU: 1 PID: 1169 Comm: khungtaskd Not tainted 5.9.0-rc1-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+0x18f/0x20d lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x70/0xb1 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1b3/0x223 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:209 [inline]
 watchdog+0xd7d/0x1000 kernel/hung_task.c:295
 kthread+0x3b5/0x4a0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 6536 Comm: in:imklog Not tainted 5.9.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:array_index_mask_nospec arch/x86/include/asm/barrier.h:41 [inline]
RIP: 0010:__fcheck_files include/linux/fdtable.h:88 [inline]
RIP: 0010:fcheck_files include/linux/fdtable.h:99 [inline]
RIP: 0010:__fget_files+0x13a/0x400 fs/file.c:827
Code: 08 3c 03 0f 8e b1 02 00 00 8b 5d 00 44 89 f7 89 de e8 5a 75 ad ff 41 39 de 0f 83 81 01 00 00 e8 4c 79 ad ff 44 89 f0 48 39 d8 <48> 19 db 48 8d 7d 08 44 21 f3 48 89 f8 48 c1 e8 03 42 80 3c 28 00
RSP: 0018:ffffc900093f7e00 EFLAGS: 00000283
RAX: 0000000000000004 RBX: 0000000000000040 RCX: ffffffff81c6c826
RDX: ffff888095b5c1c0 RSI: ffffffff81c6c834 RDI: 0000000000000004
RBP: ffff8880a71f3be0 R08: 0000000000000001 R09: ffffffff8c5f09e7
R10: 0000000000000004 R11: 0000000000000000 R12: ffff8880a71f3b80
R13: dffffc0000000000 R14: 0000000000000004 R15: 0000000000001fa0
FS:  00007fbbc9a1f700(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0e6cf30000 CR3: 00000000a438a000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __fget fs/file.c:846 [inline]
 __fget_light fs/file.c:905 [inline]
 __fget_light+0xd4/0x280 fs/file.c:894
 __fdget fs/file.c:913 [inline]
 __fdget_pos+0x19/0x100 fs/file.c:924
 fdget_pos include/linux/file.h:75 [inline]
 ksys_read+0x6e/0x250 fs/read_write.c:598
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fbbcc06222d
Code: c1 20 00 00 75 10 b8 00 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 4e fc ff ff 48 89 04 24 b8 00 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 97 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007fbbc99fe580 EFLAGS: 00000293 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbbcc06222d
RDX: 0000000000001fa0 RSI: 00007fbbc99feda0 RDI: 0000000000000004
RBP: 000055d20516e9d0 R08: 0000000000000000 R09: 0000000000000000
R10: 2ce33e6c02ce33e7 R11: 0000000000000293 R12: 00007fbbc99feda0
R13: 0000000000001fa0 R14: 0000000000001f9f R15: 00007fbbc99ff0b3

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/17 18:37 upstream 9123e3a74ec7 424dd8e7 .config console log report syz C ci-upstream-kasan-gce
2020/08/14 02:29 upstream 990f227371a4 54ce1ed6 .config console log report syz C ci-upstream-kasan-gce-root
2020/08/13 14:53 upstream fb893de323e2 bc15f7db .config console log report syz C ci-upstream-kasan-gce-root
2020/08/12 11:57 upstream c636eef2ee36 bb3e5fe6 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/12 07:32 upstream c636eef2ee36 bb3e5fe6 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/11 22:54 upstream 00e4db51259a bacaf5fa .config console log report syz C ci-upstream-kasan-gce-root
2020/08/10 09:27 upstream 9420f1ce0186 70301872 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/17 18:35 upstream 9123e3a74ec7 424dd8e7 .config console log report syz C ci-upstream-kasan-gce-386
2020/08/15 21:18 linux-next 4993e4fe12af 424dd8e7 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/08/13 17:16 linux-next bc09acc9f224 bc15f7db .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/08/10 23:23 linux-next f80535b9aa10 7adc7b65 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.