Re: [syzbot] [io-uring?] INFO: task hung in io_wq_put_and_exit (4)

syzbot
2025-04-05T12:30:04Z

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: task hung in io_wq_put_and_exit

INFO: task syz.0.15:6739 blocked for more than 143 seconds.
Not tainted 6.14.0-syzkaller-00001-g626e6212aaf6 #0
Blocked by coredump.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.15 state:D stack:23744 pid:6739 tgid:6738 ppid:6553 task_flags:0x400548 flags:0x00024000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5378 [inline]
__schedule+0x18bc/0x4c40 kernel/sched/core.c:6765
__schedule_loop kernel/sched/core.c:6842 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6857
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
io_wq_exit_workers io_uring/io-wq.c:1262 [inline]
io_wq_put_and_exit+0x344/0x720 io_uring/io-wq.c:1290
io_uring_clean_tctx+0x168/0x1e0 io_uring/tctx.c:205
io_uring_cancel_generic+0x751/0x800 io_uring/io_uring.c:3183
io_uring_files_cancel include/linux/io_uring.h:19 [inline]
do_exit+0x6a3/0x2940 kernel/exit.c:894
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
get_signal+0x16b2/0x1750 kernel/signal.c:3036
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2dc697e719
RSP: 002b:00007f2dc77490e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f2dc6b35f88 RCX: 00007f2dc697e719
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f2dc6b35f88
RBP: 00007f2dc6b35f80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2dc6b35f8c
R13: 0000000000000000 R14: 00007ffdb8b1f290 R15: 00007ffdb8b1f378
</TASK>
INFO: task syz.4.19:6783 blocked for more than 146 seconds.
Not tainted 6.14.0-syzkaller-00001-g626e6212aaf6 #0
Blocked by coredump.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.19 state:D stack:25696 pid:6783 tgid:6779 ppid:6564 task_flags:0x400548 flags:0x00024000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5378 [inline]
__schedule+0x18bc/0x4c40 kernel/sched/core.c:6765
__schedule_loop kernel/sched/core.c:6842 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6857
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
io_wq_exit_workers io_uring/io-wq.c:1262 [inline]
io_wq_put_and_exit+0x344/0x720 io_uring/io-wq.c:1290
io_uring_clean_tctx+0x168/0x1e0 io_uring/tctx.c:205
io_uring_cancel_generic+0x751/0x800 io_uring/io_uring.c:3183
io_uring_files_cancel include/linux/io_uring.h:19 [inline]
do_exit+0x6a3/0x2940 kernel/exit.c:894
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
get_signal+0x16b2/0x1750 kernel/signal.c:3036
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6cf337e719
RSP: 002b:00007f6cf40d00e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f6cf3535f88 RCX: 00007f6cf337e719
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f6cf3535f88
RBP: 00007f6cf3535f80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6cf3535f8c
R13: 0000000000000000 R14: 00007ffd41156d10 R15: 00007ffd41156df8
</TASK>
INFO: task syz.2.17:6784 blocked for more than 148 seconds.
Not tainted 6.14.0-syzkaller-00001-g626e6212aaf6 #0
Blocked by coredump.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.17 state:D stack:23744 pid:6784 tgid:6780 ppid:6562 task_flags:0x400548 flags:0x00024000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5378 [inline]
__schedule+0x18bc/0x4c40 kernel/sched/core.c:6765
__schedule_loop kernel/sched/core.c:6842 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6857
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
io_wq_exit_workers io_uring/io-wq.c:1262 [inline]
io_wq_put_and_exit+0x344/0x720 io_uring/io-wq.c:1290
io_uring_clean_tctx+0x168/0x1e0 io_uring/tctx.c:205
io_uring_cancel_generic+0x751/0x800 io_uring/io_uring.c:3183
io_uring_files_cancel include/linux/io_uring.h:19 [inline]
do_exit+0x6a3/0x2940 kernel/exit.c:894
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
get_signal+0x16b2/0x1750 kernel/signal.c:3036
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbb9517e719
RSP: 002b:00007fbb95f3b0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fbb95335f88 RCX: 00007fbb9517e719
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fbb95335f88
RBP: 00007fbb95335f80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbb95335f8c
R13: 0000000000000000 R14: 00007ffc20ba6bf0 R15: 00007ffc20ba6cd8
</TASK>
INFO: task syz.3.18:6820 blocked for more than 151 seconds.
Not tainted 6.14.0-syzkaller-00001-g626e6212aaf6 #0
Blocked by coredump.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.3.18 state:D stack:25184 pid:6820 tgid:6819 ppid:6563 task_flags:0x400548 flags:0x00024000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5378 [inline]
__schedule+0x18bc/0x4c40 kernel/sched/core.c:6765
__schedule_loop kernel/sched/core.c:6842 [inline]
schedule+0x14b/0x320 kernel/sched/core.c:6857
schedule_timeout+0xb0/0x290 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
io_wq_exit_workers io_uring/io-wq.c:1262 [inline]
io_wq_put_and_exit+0x344/0x720 io_uring/io-wq.c:1290
io_uring_clean_tctx+0x168/0x1e0 io_uring/tctx.c:205
io_uring_cancel_generic+0x751/0x800 io_uring/io_uring.c:3183
io_uring_files_cancel include/linux/io_uring.h:19 [inline]
do_exit+0x6a3/0x2940 kernel/exit.c:894

Tested on:

commit: 626e6212 io_uring/kbuf: conditional schedule on buffer..
git tree: git://git.kernel.dk/linux.git syztest
console output: https://syzkaller.appspot.com/x/log.txt?x=105c9b4c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a3f7ddbc4e0c74f1
dashboard link: https://syzkaller.appspot.com/bug?extid=58928048fd1416f1457c
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.