rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 1-...!: (1 GPs behind) idle=8a2c/1/0x4000000000000000 softirq=16565/16566 fqs=1 (detected by 0, t=10502 jiffies, g=22409, q=29 ncpus=2) Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 6755 Comm: syz.1.870 Tainted: G W 6.1.121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 RIP: 0010:match_held_lock+0x0/0xb0 kernel/locking/lockdep.c:5107 Code: ad ef e8 03 00 75 cf 48 c7 c7 e0 01 0c 8b 48 c7 c6 20 02 0c 8b e8 20 6c a0 f6 0f 0b eb b6 e8 e7 fa ff ff 0f 1f 80 00 00 00 00 <55> 53 bd 01 00 00 00 48 39 77 10 74 67 48 89 fb 81 7f 20 00 00 10 RSP: 0018:ffffc900001e0c70 EFLAGS: 00000087 RAX: 000000000000000b RBX: 0000000000000009 RCX: ffff888074515940 RDX: ffff888074515940 RSI: ffff888056450300 RDI: ffff888074516588 RBP: ffff888074516588 R08: ffffffff88dae8eb R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000000000046 R13: ffff888074515940 R14: 00000000ffffffff R15: ffff888056450300 FS: 00007fdddbff56c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000440 CR3: 000000007b0a6000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __lock_is_held kernel/locking/lockdep.c:5403 [inline] lock_is_held_type+0xa4/0x180 kernel/locking/lockdep.c:5705 lock_is_held include/linux/lockdep.h:283 [inline] advance_sched+0x13d/0x970 net/sched/sch_taprio.c:705 __run_hrtimer kernel/time/hrtimer.c:1689 [inline] __hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1753 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1815 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1107 [inline] __sysvec_apic_timer_interrupt+0x158/0x5b0 arch/x86/kernel/apic/apic.c:1124 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 92 78 25 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 e7 e0 a1 f6 65 8b 05 a8 c0 45 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc9000c3f6720 EFLAGS: 00000206 RAX: 1cdb0fa4367caa00 RBX: 1ffff9200187ece8 RCX: ffffffff816b123a RDX: dffffc0000000000 RSI: ffffffff8b0c0340 RDI: 0000000000000001 RBP: ffffc9000c3f67a8 R08: dffffc0000000000 R09: fffffbfff2249c84 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 1ffff9200187ece4 R14: ffffc9000c3f6740 R15: 0000000000000246 __stack_depot_save+0x3f5/0x470 lib/stackdepot.c:502 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 alloc_extent_state+0x25/0x350 fs/btrfs/extent-io-tree.c:146 __set_extent_bit+0x1af/0x18c0 fs/btrfs/extent-io-tree.c:979 set_extent_bit+0x3c/0x50 fs/btrfs/extent-io-tree.c:1171 btrfs_alloc_tree_block+0xae9/0x1800 fs/btrfs/extent-tree.c:5022 __btrfs_cow_block+0x461/0x1970 fs/btrfs/ctree.c:443 btrfs_cow_block+0x355/0xa90 fs/btrfs/ctree.c:615 btrfs_search_slot+0xc06/0x2f10 fs/btrfs/ctree.c:2083 btrfs_insert_empty_items+0x98/0x180 fs/btrfs/ctree.c:4181 btrfs_insert_empty_item fs/btrfs/ctree.h:3130 [inline] btrfs_uuid_tree_add+0x6b6/0xc70 fs/btrfs/uuid-tree.c:112 create_pending_snapshot+0x1259/0x2940 fs/btrfs/transaction.c:1858 create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1904 btrfs_commit_transaction+0x13bb/0x3c70 fs/btrfs/transaction.c:2372 create_snapshot+0x57c/0x950 fs/btrfs/ioctl.c:856 btrfs_mksubvol+0x71a/0x8a0 fs/btrfs/ioctl.c:1008 btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1054 __btrfs_ioctl_snap_create+0x377/0x4a0 fs/btrfs/ioctl.c:2218 btrfs_ioctl_snap_create_v2+0x1c4/0x400 fs/btrfs/ioctl.c:2305 btrfs_ioctl+0xaa0/0xc10 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fdddb185d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdddbff5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fdddb375fa0 RCX: 00007fdddb185d29 RDX: 0000000020001480 RSI: 0000000050009417 RDI: 0000000000000004 RBP: 00007fdddb201aa8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fdddb375fa0 R15: 00007ffccdb41958 rcu: rcu_preempt kthread timer wakeup didn't happen for 10499 jiffies! g22409 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 rcu: Possible timer handling issue on cpu=0 timer-softirq=9189 rcu: rcu_preempt kthread starved for 10500 jiffies! g22409 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0 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:I stack:25528 pid:16 ppid:2 flags:0x00004000 Call Trace: context_switch kernel/sched/core.c:5241 [inline] __schedule+0x143f/0x4570 kernel/sched/core.c:6558 schedule+0xbf/0x180 kernel/sched/core.c:6634 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1965 rcu_gp_fqs_loop+0x2d2/0x1150 kernel/rcu/tree.c:1706 rcu_gp_kthread+0xa3/0x3b0 kernel/rcu/tree.c:1905 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 rcu: Stack dump where RCU GP kthread last ran: CPU: 0 PID: 56 Comm: kworker/u4:4 Tainted: G W 6.1.121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 Workqueue: events_unbound toggle_allocation_gate RIP: 0010:csd_lock_wait kernel/smp.c:424 [inline] RIP: 0010:smp_call_function_many_cond+0x1fae/0x3460 kernel/smp.c:998 Code: 2f 44 89 ee 83 e6 01 31 ff e8 0e 44 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 99 40 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff RSP: 0018:ffffc900015775a0 EFLAGS: 00000293 RAX: ffffffff817f5bf9 RBX: 1ffff110171e81b1 RCX: ffff88801e6b9dc0 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90001577980 R08: ffffffff817f5bc2 R09: fffffbfff2249c4d R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000 R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b8f40d88 FS: 0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c39e3c1 CR3: 000000000d08e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1166 on_each_cpu include/linux/smp.h:71 [inline] text_poke_sync arch/x86/kernel/alternative.c:1334 [inline] text_poke_bp_batch+0x2bb/0x940 arch/x86/kernel/alternative.c:1534 text_poke_flush arch/x86/kernel/alternative.c:1725 [inline] text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:207 static_key_enable+0x16/0x20 kernel/jump_label.c:220 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295