syzbot


KCSAN: data-race in __perf_event_read_value / event_sched_out (7)

Status: moderation: reported on 2026/02/05 22:55
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+3eba56c406a6345e4c08@syzkaller.appspotmail.com
First crash: 21h10m, last: 21h10m
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out perf 6 6 1520d 1595d 0/29 auto-closed as invalid on 2022/01/12 21:04
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (5) perf 6 5 1200d 1257d 0/29 auto-obsoleted due to no activity on 2022/11/29 10:56
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (2) perf 6 3 1444d 1483d 0/29 auto-closed as invalid on 2022/03/30 13:56
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (3) perf 6 2 1386d 1403d 0/29 auto-closed as invalid on 2022/05/27 15:32
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (4) perf 6 1 1323d 1323d 0/29 auto-closed as invalid on 2022/07/28 22:06
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (6) perf 6 1 1162d 1162d 0/29 auto-obsoleted due to no activity on 2023/01/16 16:53

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __perf_event_read_value / event_sched_out

write to 0xffff888154b55288 of 8 bytes by task 5751 on cpu 1:
 __perf_update_times kernel/events/core.c:-1 [inline]
 perf_event_update_time kernel/events/core.c:735 [inline]
 perf_event_set_state kernel/events/core.c:754 [inline]
 event_sched_out+0x47e/0x8f0 kernel/events/core.c:2391
 group_sched_out kernel/events/core.c:2415 [inline]
 __pmu_ctx_sched_out+0x3e7/0x530 kernel/events/core.c:3458
 ctx_sched_out+0x273/0x2d0 kernel/events/core.c:3539
 task_ctx_sched_out+0x4d/0x70 kernel/events/core.c:2859
 perf_event_context_sched_out kernel/events/core.c:3746 [inline]
 __perf_event_task_sched_out+0x474/0x710 kernel/events/core.c:3846
 perf_event_task_sched_out include/linux/perf_event.h:1654 [inline]
 prepare_task_switch kernel/sched/core.c:5049 [inline]
 context_switch kernel/sched/core.c:5205 [inline]
 __schedule+0xbaa/0xc90 kernel/sched/core.c:6867
 preempt_schedule_common kernel/sched/core.c:7051 [inline]
 __cond_resched+0x31/0x60 kernel/sched/core.c:7378
 might_resched include/linux/kernel.h:61 [inline]
 mutex_lock+0x22/0x90 kernel/locking/mutex.c:287
 perf_poll+0x180/0x1f0 kernel/events/core.c:6150
 vfs_poll include/linux/poll.h:82 [inline]
 io_file_supports_nowait io_uring/rw.c:47 [inline]
 __io_read+0x312/0xc50 io_uring/rw.c:936
 io_read+0x4a/0x190 io_uring/rw.c:1030
 __io_issue_sqe+0xfd/0x2d0 io_uring/io_uring.c:1793
 io_issue_sqe+0x20b/0xc20 io_uring/io_uring.c:1816
 io_queue_sqe io_uring/io_uring.c:2043 [inline]
 io_req_task_submit+0x46/0xa0 io_uring/io_uring.c:1435
 __io_run_local_work_loop io_uring/io_uring.c:1345 [inline]
 __io_run_local_work+0x1f8/0x580 io_uring/io_uring.c:1370
 io_run_local_work io_uring/io_uring.c:1411 [inline]
 io_cqring_wait io_uring/io_uring.c:2718 [inline]
 __do_sys_io_uring_enter io_uring/io_uring.c:3324 [inline]
 __se_sys_io_uring_enter+0x159d/0x1c70 io_uring/io_uring.c:3224
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3224
 x64_sys_call+0x27e4/0x3000 arch/x86/include/generated/asm/syscalls_64.h:427
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888154b55288 of 8 bytes by task 5782 on cpu 0:
 __perf_event_read_value+0xb6/0x1d0 kernel/events/core.c:5894
 perf_read_one kernel/events/core.c:6049 [inline]
 __perf_read kernel/events/core.c:6102 [inline]
 perf_read+0x2d6/0x670 kernel/events/core.c:6119
 loop_rw_iter+0x2c6/0x3f0 include/linux/uio.h:-1
 io_iter_do_read io_uring/rw.c:836 [inline]
 __io_read+0xbf6/0xc50 io_uring/rw.c:950
 io_read+0x4a/0x190 io_uring/rw.c:1030
 __io_issue_sqe+0xfd/0x2d0 io_uring/io_uring.c:1793
 io_issue_sqe+0x20b/0xc20 io_uring/io_uring.c:1816
 io_wq_submit_work+0x574/0x770 io_uring/io_uring.c:1928
 io_worker_handle_work+0x41e/0x950 io_uring/io-wq.c:650
 io_wq_worker+0x233/0x910 io_uring/io-wq.c:704
 ret_from_fork+0x148/0x280 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

value changed: 0x0000000015954eb2 -> 0x000000001595939d

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5782 Comm: iou-wrk-5751 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/05 22:55 upstream 8fdb05de0e2d f03c4191 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __perf_event_read_value / event_sched_out
* Struck through repros no longer work on HEAD.