syzbot


BUG: soft lockup in bpf_map_free_deferred

Status: premoderation: reported on 2024/04/15 01:26
Reported-by: syzbot+968577ee9c89191f0465@syzkaller.appspotmail.com
First crash: 91d, last: 18d

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 143s! [kworker/1:1:39]
Modules linked in:
CPU: 1 PID: 39 Comm: kworker/1:1 Not tainted 5.15.150-syzkaller-00330-g9044d25b8ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: events bpf_map_free_deferred
RIP: 0010:pv_hybrid_queued_unfair_trylock kernel/locking/qspinlock_paravirt.h:90 [inline]
RIP: 0010:__pv_queued_spin_lock_slowpath+0x206/0xc40 kernel/locking/qspinlock.c:443
Code: 89 fd 49 c1 ed 03 4c 89 ff be 04 00 00 00 e8 e1 7b 5d 00 48 b8 00 00 00 00 00 fc ff df 41 0f b6 44 05 00 84 c0 75 47 45 8b 27 <66> 45 85 e4 75 28 4c 89 ff be 01 00 00 00 e8 d7 7b 5d 00 48 ba 00
RSP: 0018:ffffc9000028f900 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffff8881f7138ad4 RCX: ffffffff8154f74f
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88811ab6a018
RBP: ffffc9000028f9f0 R08: dffffc0000000000 R09: ffffed102356d404
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000040003
R13: 1ffff1102356d403 R14: 1ffff1103ee27159 R15: ffff88811ab6a018
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001204dd000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline]
 _raw_spin_lock_bh+0x139/0x1b0 kernel/locking/spinlock.c:178
 sock_hash_delete_elem+0xb1/0x2f0 net/core/sock_map.c:937
 bpf_prog_2c29ac5cdc6b1842+0x3a/0x7d0
 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
 __bpf_prog_run include/linux/filter.h:625 [inline]
 bpf_prog_run include/linux/filter.h:632 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
 bpf_trace_run2+0xec/0x210 kernel/trace/bpf_trace.c:1917
 __bpf_trace_kfree+0x6f/0x90 include/trace/events/kmem.h:118
 trace_kfree include/trace/events/kmem.h:118 [inline]
 kfree+0x1f3/0x220 mm/slub.c:4569
 selinux_bpf_map_free+0x58/0x70 security/selinux/hooks.c:7031
 security_bpf_map_free+0x44/0x80 security/security.c:2635
 bpf_map_free_deferred+0x32/0x1e0 kernel/bpf/syscall.c:478
 process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325
 worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472
 kthread+0x421/0x510 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.150-syzkaller-00330-g9044d25b8ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:native_halt arch/x86/include/asm/irqflags.h:57 [inline]
RIP: 0010:halt arch/x86/include/asm/irqflags.h:98 [inline]
RIP: 0010:kvm_wait+0x117/0x180 arch/x86/kernel/kvm.c:912
Code: 48 c1 e8 03 42 0f b6 04 20 84 c0 44 8b 74 24 1c 75 53 41 0f b6 45 00 44 38 f0 0f 85 63 ff ff ff 66 90 0f 00 2d 7a 02 f3 03 f4 <e9> 54 ff ff ff fa 4c 89 e8 48 c1 e8 03 42 0f b6 04 20 84 c0 44 8b
RSP: 0018:ffffc900000073c0 EFLAGS: 00000046
RAX: 0000000000000003 RBX: 1ffff92000000e7c RCX: ffffffff8154fbbf
RDX: dffffc0000000000 RSI: 0000000000000003 RDI: ffff88811ab6a018
RBP: ffffc90000007470 R08: dffffc0000000000 R09: ffffed102356d404
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88811ab6a018 R14: 0000000000000003 R15: 1ffff92000000e80
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2f51aff8 CR3: 000000011d923000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 pv_wait arch/x86/include/asm/paravirt.h:597 [inline]
 pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:470 [inline]
 __pv_queued_spin_lock_slowpath+0x6bc/0xc40 kernel/locking/qspinlock.c:508
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock include/linux/spinlock.h:187 [inline]
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline]
 _raw_spin_lock_bh+0x139/0x1b0 kernel/locking/spinlock.c:178
 sock_hash_delete_elem+0xb1/0x2f0 net/core/sock_map.c:937
 bpf_prog_2c29ac5cdc6b1842+0x3a/0x7d0
 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
 __bpf_prog_run include/linux/filter.h:625 [inline]
 bpf_prog_run include/linux/filter.h:632 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
 bpf_trace_run2+0xec/0x210 kernel/trace/bpf_trace.c:1917
 __bpf_trace_kfree+0x6f/0x90 include/trace/events/kmem.h:118
 trace_kfree include/trace/events/kmem.h:118 [inline]
 kfree+0x1f3/0x220 mm/slub.c:4569
 sk_psock_free_link include/linux/skmsg.h:420 [inline]
 sock_map_del_link net/core/sock_map.c:160 [inline]
 sock_map_unref+0x352/0x4d0 net/core/sock_map.c:182
 sock_hash_delete_elem+0x274/0x2f0 net/core/sock_map.c:941
 bpf_prog_2c29ac5cdc6b1842+0x3a/0x7d0
 bpf_dispatcher_nop_func include/linux/bpf.h:785 [inline]
 __bpf_prog_run include/linux/filter.h:625 [inline]
 bpf_prog_run include/linux/filter.h:632 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline]
 bpf_trace_run2+0xec/0x210 kernel/trace/bpf_trace.c:1917
 __bpf_trace_kfree+0x6f/0x90 include/trace/events/kmem.h:118
 trace_kfree include/trace/events/kmem.h:118 [inline]
 kfree+0x1f3/0x220 mm/slub.c:4569
 dummy_timer+0x7da/0x2f70 drivers/usb/gadget/udc/dummy_hcd.c:1981
 call_timer_fn+0x3b/0x2d0 kernel/time/timer.c:1427
 expire_timers kernel/time/timer.c:1472 [inline]
 __run_timers+0x72a/0xa10 kernel/time/timer.c:1743
 run_timer_softirq+0x69/0xf0 kernel/time/timer.c:1756
 __do_softirq+0x26d/0x5bf kernel/softirq.c:565
 invoke_softirq kernel/softirq.c:425 [inline]
 __irq_exit_rcu+0x50/0xf0 kernel/softirq.c:648
 irq_exit_rcu+0x9/0x10 kernel/softirq.c:660
 sysvec_apic_timer_interrupt+0x9a/0xc0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:40 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:75 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:110 [inline]
RIP: 0010:acpi_idle_do_entry drivers/acpi/processor_idle.c:570 [inline]
RIP: 0010:acpi_idle_enter+0x416/0x760 drivers/acpi/processor_idle.c:705
Code: 89 de 48 83 e6 08 31 ff e8 37 31 a7 fc 48 83 e3 08 0f 85 b0 00 00 00 0f 1f 44 00 00 e8 e3 2c a7 fc 0f 00 2d dc 50 c0 00 fb f4 <fa> e9 e1 00 00 00 49 83 c7 04 4c 89 f8 48 c1 e8 03 42 0f b6 04 30
RSP: 0018:ffffffff86807bf0 EFLAGS: 000002d3
RAX: ffffffff84c90abd RBX: 0000000000000000 RCX: ffffffff8681d280
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff86807c30 R08: ffffffff84c90aa9 R09: fffffbfff0d03a51
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001
R13: ffff888102fe0804 R14: dffffc0000000000 R15: ffff888105dff864
 cpuidle_enter_state+0x5e1/0x1550 drivers/cpuidle/cpuidle.c:249
 cpuidle_enter+0x5f/0xa0 drivers/cpuidle/cpuidle.c:364
 call_cpuidle kernel/sched/idle.c:158 [inline]
 cpuidle_idle_call kernel/sched/idle.c:239 [inline]
 do_idle+0x36b/0x5d0 kernel/sched/idle.c:306
 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:403
 rest_init+0x10b/0x130 init/main.c:738
 arch_call_rest_init+0xe/0x10 init/main.c:890
 start_kernel+0x462/0x4ce init/main.c:1137
 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:527
 x86_64_start_kernel+0x5b/0x5e arch/x86/kernel/head64.c:508
 secondary_startup_64_no_verify+0xb1/0xbb
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/26 15:42 android13-5.15-lts 9044d25b8ff5 c6d33a01 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/06/02 01:27 android13-5.15-lts 424f92bcbe8f 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/05/30 23:53 android13-5.15-lts 424f92bcbe8f 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/05/11 11:36 android13-5.15-lts 5d96939590c0 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/05/06 03:39 android13-5.15-lts 5d96939590c0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/04/22 13:32 android13-5.15-lts ad06eaf051cd 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15-perf BUG: soft lockup in bpf_map_free_deferred
2024/04/18 06:23 android13-5.15-lts ad06eaf051cd acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
2024/04/15 01:25 android13-5.15-lts 993bed180178 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 BUG: soft lockup in bpf_map_free_deferred
* Struck through repros no longer work on HEAD.