syzbot


INFO: rcu detected stall in tctx_task_work

Status: upstream: reported on 2024/11/27 09:33
Reported-by: syzbot+230e29e35de986480546@syzkaller.appspotmail.com
First crash: 24d, last: 24d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in tctx_task_work (2) fs io-uring syz unreliable 4 1140d 1146d 0/28 closed as invalid on 2021/12/14 20:12
upstream INFO: rcu detected stall in tctx_task_work io-uring fs C done 9 1147d 1146d 0/28 closed as invalid on 2021/10/31 19:40

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P8667/1:b..l
	(detected by 0, t=10502 jiffies, g=34553, q=206)
task:syz.0.772       state:R  running task     stack:24888 pid: 8667 ppid:  7931 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6777
 irqentry_exit+0x53/0x80 kernel/entry/common.c:432
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 fc 8c 67 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc900033c7560 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000678eb8 RCX: 1ffff92000678e58
RDX: dffffc0000000000 RSI: ffffffff8aab3d20 RDI: ffffffff8af9ed00
RBP: ffffc900033c76b0 R08: dffffc0000000000 R09: fffffbfff2131021
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000678eb4
R13: dffffc0000000000 R14: ffffc900033c75c0 R15: 0000000000000246
 rcu_lock_acquire+0x20/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 get_obj_cgroup_from_current+0xd3/0x2f0 mm/memcontrol.c:2919
 memcg_slab_pre_alloc_hook mm/slab.h:283 [inline]
 slab_pre_alloc_hook+0x87/0xc0 mm/slab.h:497
 slab_alloc_node mm/slub.c:3134 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 kmem_cache_alloc+0x3f/0x280 mm/slub.c:3233
 alloc_pid+0x9a/0xab0 kernel/pid.c:180
 copy_process+0x1ca9/0x3ef0 kernel/fork.c:2221
 create_io_thread+0x16c/0x1e0 kernel/fork.c:2551
 create_io_worker+0x236/0x6d0 io_uring/io-wq.c:835
 io_wqe_create_worker io_uring/io-wq.c:313 [inline]
 io_wqe_enqueue+0x85f/0xba0 io_uring/io-wq.c:948
 io_queue_async_work+0x36c/0x5c0 io_uring/io_uring.c:1487
 __io_queue_sqe+0x29b/0x360 io_uring/io_uring.c:7277
 tctx_task_work+0x2fb/0x840 io_uring/io_uring.c:2209
 task_work_run+0x129/0x1a0 kernel/task_work.c:188
 tracehook_notify_signal include/linux/tracehook.h:214 [inline]
 handle_signal_work kernel/entry/common.c:152 [inline]
 exit_to_user_mode_loop+0x86/0x130 kernel/entry/common.c:178
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fb90eddb809
RSP: 002b:00007fb90cc51058 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: 0000000000000003 RBX: 00007fb90efa0fa0 RCX: 00007fb90eddb809
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 00007fb90ee4e93e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fb90efa0fa0 R15: 00007fff270a4028
 </TASK>
rcu: rcu_preempt kthread starved for 10333 jiffies! g34553 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=1
rcu: 	Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt     state:R  running task     stack:26168 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1914
 rcu_gp_fqs_loop+0x2bf/0x1080 kernel/rcu/tree.c:1972
 rcu_gp_kthread+0xa4/0x360 kernel/rcu/tree.c:2145
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
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:108 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/27 09:33 linux-5.15.y 0a51d2d4527b 52b38cc1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in tctx_task_work
* Struck through repros no longer work on HEAD.