syzbot


INFO: task hung in io_uring_cancel_generic (2)

Status: fixed on 2022/03/08 16:11
Subsystems: io-uring fs
[Documentation on labels]
Reported-by: syzbot+21e6887c0be14181206d@syzkaller.appspotmail.com
Fix commit: 78a780602075 io_uring: ensure task_work gets run as part of cancelations
First crash: 1060d, last: 1025d
Cause bisection: introduced by (bisect log) :
commit 741ec653ab58f5f263f2b6df38157997661c7a50
Author: Qu Wenruo <wqu@suse.com>
Date: Mon Sep 27 07:22:01 2021 +0000

  btrfs: subpage: make end_compressed_bio_writeback() compatible

Crash: INFO: task hung in io_uring_cancel_generic (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.15 000/171] 5.15.8-rc1 review 179 (179) 2021/12/13 22:46
[PATCHSET 0/2] Cancelation fixes 10 (10) 2021/12/10 13:47
[syzbot] INFO: task hung in io_uring_cancel_generic (2) 3 (7) 2021/12/09 16:56
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in io_uring_cancel_generic io-uring fs C unreliable 151 1060d 1181d 20/28 fixed on 2021/11/10 00:50
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/12/09 15:58 17m axboe@kernel.dk git://git.kernel.dk/linux-block io_uring-5.16 OK

Sample crash report:
INFO: task syz-executor186:17736 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc4-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor186 state:D stack:28752 pid:17736 ppid:  3636 flags:0x00024004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6253
 schedule+0xd2/0x260 kernel/sched/core.c:6326
 io_uring_cancel_generic+0x53d/0x690 fs/io_uring.c:9877
 io_uring_files_cancel include/linux/io_uring.h:16 [inline]
 do_exit+0x60c/0x2b40 kernel/exit.c:787
 do_group_exit+0x125/0x310 kernel/exit.c:929
 get_signal+0x47d/0x2220 kernel/signal.c:2852
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f98a616aab9
RSP: 002b:00007f98a611c308 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00007f98a61f2408 RCX: 00007f98a616aab9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f98a61f240c
RBP: 00007f98a61f2400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f98a61f240c
R13: 0000000000000003 R14: 00007f98a611c400 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb811a0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
2 locks held by getty/3289:
 #0: ffff88814af1a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002b8e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2113

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc4-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:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 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 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:109 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:553

Crashes (97):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/10 07:58 upstream c741e49150db 4d4ce9bc .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/12/08 00:02 upstream cd8c917a56f2 0230ba3e .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/12/08 04:21 linux-next 04fe99a8d936 0230ba3e .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/08 13:36 upstream 2a987e65025e a4a2a501 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/12/07 18:09 upstream cd8c917a56f2 0230ba3e .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/12/07 05:08 upstream f80ef9e49fdf 0230ba3e .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/12/06 17:42 upstream 0fcfb00b28c0 579a8754 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/12/05 19:29 upstream 79a72162048e a617004c .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/05 02:46 upstream bbef3c7a63d2 a617004c .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/04 07:20 upstream 12119cfa1052 a617004c .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/12/03 10:18 upstream 5f58da2befa5 61f86278 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/12/01 13:22 upstream 58e1100fdc59 5fa3eacc .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/12/01 12:03 upstream 58e1100fdc59 5fa3eacc .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/12/01 00:35 upstream f080815fdb3e 80270552 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/30 15:46 upstream d58071a8a76d 80270552 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/30 08:22 upstream d58071a8a76d d0830353 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/30 07:14 upstream d58071a8a76d d0830353 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/29 19:42 upstream d58071a8a76d d0830353 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/28 16:07 upstream 3498e7f2bb41 63eeac02 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/28 00:35 upstream 741392771338 63eeac02 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/26 20:20 upstream a4849f6000e2 63eeac02 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/25 16:11 upstream 5f53fa508db0 545ab074 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/25 15:00 upstream 5f53fa508db0 545ab074 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/25 13:31 upstream 5f53fa508db0 545ab074 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/11/25 07:23 upstream 5f53fa508db0 545ab074 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/25 05:16 upstream 5f53fa508db0 545ab074 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/22 15:44 upstream 136057256686 545ab074 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/11/21 09:41 upstream 923dcc5eb0c1 4eb20a4e .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/21 01:36 upstream a90af8f15bdc 4eb20a4e .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/20 15:14 upstream a90af8f15bdc 4eb20a4e .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/20 09:20 upstream 9539ba4308ad 3a9d0024 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/20 01:27 upstream 4c388a8e740d 3a9d0024 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/11/18 22:42 upstream 6fdf886424cf 31a30fc0 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/18 11:27 upstream 42eb8fdac2fc cafff8b6 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/18 03:20 upstream ee1703cda8dc cafff8b6 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/11/17 21:33 upstream ee1703cda8dc cafff8b6 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/16 19:24 upstream 8ab774587903 600426bd .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/16 01:10 upstream 8ab774587903 83f5c9b5 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in io_uring_cancel_generic
2021/11/15 20:03 upstream 8ab774587903 83f5c9b5 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/15 01:17 upstream c8c109546a19 83f5c9b5 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/14 22:48 upstream c8c109546a19 83f5c9b5 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in io_uring_cancel_generic
2021/11/14 19:31 upstream c8c109546a19 83f5c9b5 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/13 20:55 upstream 66f4beaa6c1d 83f5c9b5 .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/11/10 04:40 upstream cb690f5238d7 55fa030c .config console log report info ci-upstream-kasan-gce INFO: task hung in io_uring_cancel_generic
2021/12/04 22:14 upstream bbef3c7a63d2 a617004c .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in io_uring_cancel_generic
2021/11/24 19:48 upstream 5d9f4cf36721 545ab074 .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in io_uring_cancel_generic
2021/11/23 08:23 upstream 136057256686 545ab074 .config console log report info ci-upstream-kasan-gce-386 INFO: task hung in io_uring_cancel_generic
2021/12/14 20:09 linux-next ea922272cbe5 d018dd31 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/12 12:35 linux-next ea922272cbe5 49ca1f59 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/07 09:32 linux-next 04fe99a8d936 0230ba3e .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/05 04:03 linux-next f81e94e91878 a617004c .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/12/04 05:41 linux-next f81e94e91878 a617004c .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/19 16:06 linux-next 5191249f8803 3a9d0024 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/19 00:28 linux-next 5191249f8803 31a30fc0 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
2021/11/15 13:18 linux-next 09bd48c4acfa 83f5c9b5 .config console log report info ci-upstream-linux-next-kasan-gce-root INFO: task hung in io_uring_cancel_generic
* Struck through repros no longer work on HEAD.