syzbot


BUG: soft lockup in perf_event_open

Status: moderation: reported on 2025/06/29 04:38
Subsystems: bpf trace
[Documentation on labels]
Reported-by: syzbot+b6e72792baf33defb09a@syzkaller.appspotmail.com
First crash: 5d20h, last: 5d15h
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: rcu detected stall in sys_perf_event_open (2) origin:lts-only C error 9 21d 538d 0/3 upstream: reported C repro on 2024/01/09 18:19
upstream INFO: rcu detected stall in perf_event_open (2) perf 1 1372d 1372d 0/29 auto-closed as invalid on 2021/11/26 20:49
upstream INFO: rcu detected stall in perf_event_open kernel 1 1468d 1468d 0/29 auto-closed as invalid on 2021/09/21 01:14
android-5-15 BUG: soft lockup in sys_perf_event_open 1 420d 420d 0/2 auto-obsoleted due to no activity on 2024/08/04 07:07
upstream BUG: soft lockup in sys_perf_event_open perf 1 395d 391d 0/29 auto-obsoleted due to no activity on 2024/08/29 01:52
upstream BUG: soft lockup in sys_perf_event_open (2) kvm fs 6 163d 270d 0/29 auto-obsoleted due to no activity on 2025/04/18 04:31
linux-6.1 INFO: rcu detected stall in sys_perf_event_open (2) origin:lts-only syz done 4 122d 280d 0/3 upstream: reported syz repro on 2024/09/23 05:55
linux-6.1 INFO: rcu detected stall in sys_perf_event_open 1 384d 384d 0/3 auto-obsoleted due to no activity on 2024/09/19 01:45
linux-5.15 INFO: rcu detected stall in sys_perf_event_open 1 803d 803d 0/3 auto-obsoleted due to no activity on 2023/08/17 04:33

Sample crash report:
watchdog: BUG: soft lockup - CPU#0 stuck for 143s! [syz.3.258:6650]
Modules linked in:
irq event stamp: 11413829
hardirqs last  enabled at (11413828): [<ffffffff8b665394>] irqentry_exit+0x74/0x90 kernel/entry/common.c:310
hardirqs last disabled at (11413829): [<ffffffff8b663ede>] sysvec_apic_timer_interrupt+0xe/0xc0 arch/x86/kernel/apic/apic.c:1050
softirqs last  enabled at (8318598): [<ffffffff8185ae7a>] __do_softirq kernel/softirq.c:613 [inline]
softirqs last  enabled at (8318598): [<ffffffff8185ae7a>] invoke_softirq kernel/softirq.c:453 [inline]
softirqs last  enabled at (8318598): [<ffffffff8185ae7a>] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
softirqs last disabled at (8318601): [<ffffffff8185ae7a>] __do_softirq kernel/softirq.c:613 [inline]
softirqs last disabled at (8318601): [<ffffffff8185ae7a>] invoke_softirq kernel/softirq.c:453 [inline]
softirqs last disabled at (8318601): [<ffffffff8185ae7a>] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
CPU: 0 UID: 0 PID: 6650 Comm: syz.3.258 Not tainted 6.16.0-rc2-syzkaller-g190113989ae0 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:check_preemption_disabled+0x17/0x120 lib/smp_processor_id.c:14
Code: 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 41 57 41 56 53 48 83 ec 10 65 48 8b 05 7e 8e 36 07 48 89 44 24 08 <65> 8b 05 86 8e 36 07 65 8b 0d 7b 8e 36 07 f7 c1 ff ff ff 7f 74 23
RSP: 0018:ffffc90000007588 EFLAGS: 00000286
RAX: 0cae627616e10700 RBX: ffffffff8e00df80 RCX: 000000008b8bd505
RDX: ffffffff81729af5 RSI: ffffffff8be28b60 RDI: ffffffff8be28b20
RBP: ffffc900000076c0 R08: ffffc9001c06f6e0 R09: 0000000000000000
R10: ffffc90000007858 R11: fffff52000000f0d R12: 1ffff92000000ec0
R13: 000000000000000d R14: ffffffff8e00df20 R15: dffffc0000000000
FS:  00007f19839986c0(0000) GS:ffff888125c51000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30609ff8 CR3: 0000000078fac000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 do_perf_trace_lock include/trace/events/lock.h:50 [inline]
 perf_trace_lock+0xec/0x3b0 include/trace/events/lock.h:50
 __do_trace_lock_release include/trace/events/lock.h:69 [inline]
 trace_lock_release include/trace/events/lock.h:69 [inline]
 lock_release+0x3b2/0x3e0 kernel/locking/lockdep.c:5882
 rcu_lock_release include/linux/rcupdate.h:341 [inline]
 rcu_read_unlock include/linux/rcupdate.h:871 [inline]
 class_rcu_destructor include/linux/rcupdate.h:1155 [inline]
 unwind_next_frame+0x19a9/0x2390 arch/x86/kernel/unwind_orc.c:680
 arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2381 [inline]
 slab_free_after_rcu_debug+0x129/0x2a0 mm/slub.c:4693
 rcu_do_batch kernel/rcu/tree.c:2576 [inline]
 rcu_core+0xca5/0x1710 kernel/rcu/tree.c:2832
 handle_softirqs+0x286/0x870 kernel/softirq.c:579
 __do_softirq kernel/softirq.c:613 [inline]
 invoke_softirq kernel/softirq.c:453 [inline]
 __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:check_preemption_disabled+0x1/0x120 lib/smp_processor_id.c:13
Code: 20 8b e2 8b 48 c7 c6 60 8b e2 8b eb 1c 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 55 <41> 57 41 56 53 48 83 ec 10 65 48 8b 05 7e 8e 36 07 48 89 44 24 08
RSP: 0018:ffffc9001c06f370 EFLAGS: 00000246
RAX: ffff888031488440 RBX: 1ffff11006291088 RCX: dffffc0000000000
RDX: ffff888031488440 RSI: ffffffff8be28b60 RDI: ffffffff8be28b20
RBP: ffffc9001c06f470 R08: ffffc9001c06f50f R09: 0000000000000000
R10: ffffc9001c06f500 R11: ffffffffa0204414 R12: dffffc0000000000
R13: 1ffff9200380de78 R14: ffff888031488000 R15: ffff888031488420
 migrate_enable+0x249/0x3c0 kernel/sched/core.c:2437
 bpf_prog_run_array include/linux/bpf.h:2239 [inline]
 trace_call_bpf+0x4b9/0x850 kernel/trace/bpf_trace.c:146
 perf_trace_run_bpf_submit+0x78/0x170 kernel/events/core.c:10866
 do_perf_trace_lock include/trace/events/lock.h:50 [inline]
 perf_trace_lock+0x2f8/0x3b0 include/trace/events/lock.h:50
 __do_trace_lock_release include/trace/events/lock.h:69 [inline]
 trace_lock_release include/trace/events/lock.h:69 [inline]
 lock_release+0x3b2/0x3e0 kernel/locking/lockdep.c:5882
 rcu_lock_release include/linux/rcupdate.h:341 [inline]
 rcu_read_unlock include/linux/rcupdate.h:871 [inline]
 class_rcu_destructor include/linux/rcupdate.h:1155 [inline]
 unwind_next_frame+0x19a9/0x2390 arch/x86/kernel/unwind_orc.c:680
 __unwind_start+0x5b9/0x760 arch/x86/kernel/unwind_orc.c:758
 unwind_start arch/x86/include/asm/unwind.h:64 [inline]
 arch_stack_walk+0xe4/0x150 arch/x86/kernel/stacktrace.c:24
 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2381 [inline]
 slab_free mm/slub.c:4643 [inline]
 kfree+0x18e/0x440 mm/slub.c:4842
 find_get_pmu_context+0x7cd/0x890 kernel/events/core.c:5076
 __do_sys_perf_event_open kernel/events/core.c:13565 [inline]
 __se_sys_perf_event_open+0xbfd/0x1d70 kernel/events/core.c:13301
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1982b8e929
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:00007f1983998038 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007f1982db5fa0 RCX: 00007f1982b8e929
RDX: ffffffffffffffff RSI: 0000000000000000 RDI: 0000200000001000
RBP: 00007f1982c10b39 R08: 0000000000000009 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f1982db5fa0 R15: 00007ffd6062a578
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 6120 Comm: kworker/u8:18 Not tainted 6.16.0-rc2-syzkaller-g190113989ae0 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:340 [inline]
RIP: 0010:smp_call_function_many_cond+0xf69/0x12d0 kernel/smp.c:885
Code: 00 45 8b 2f 44 89 ee 83 e6 01 31 ff e8 60 78 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 07 e8 0b 74 0b 00 eb 37 f3 90 <43> 0f b6 04 2c 84 c0 75 10 41 f7 07 01 00 00 00 74 1e e8 f0 73 0b
RSP: 0000:ffffc900056676a0 EFLAGS: 00000293
RAX: ffffffff81b4e850 RBX: ffff8880b873cb40 RCX: ffff88802dacbc00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90005667800 R08: ffffffff8fa10df7 R09: 1ffffffff1f421be
R10: dffffc0000000000 R11: fffffbfff1f421bf R12: 1ffff110170c86b5
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880b86435a8
FS:  0000000000000000(0000) GS:ffff888125d51000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f080b04d582 CR3: 000000000df38000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 on_each_cpu_cond_mask+0x3f/0x80 kernel/smp.c:1052
 on_each_cpu include/linux/smp.h:71 [inline]
 smp_text_poke_sync_each_cpu arch/x86/kernel/alternative.c:2691 [inline]
 smp_text_poke_batch_finish+0x5e0/0x1100 arch/x86/kernel/alternative.c:2901
 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x128/0x250 kernel/jump_label.c:210
 static_key_enable+0x1a/0x20 kernel/jump_label.c:223
 toggle_allocation_gate+0xad/0x240 mm/kfence/core.c:850
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
 kthread+0x70e/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/25 09:28 bpf 190113989ae0 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce BUG: soft lockup in perf_event_open
2025/06/25 04:32 bpf-next 3713b584dabb 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce BUG: soft lockup in perf_event_open
* Struck through repros no longer work on HEAD.