syzbot


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

Status: auto-closed as invalid on 2022/05/27 15:32
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 236d, last: 219d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out 6 354d 429d 0/24 auto-closed as invalid on 2022/01/12 21:04
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (2) 3 278d 316d 0/24 auto-closed as invalid on 2022/03/30 13:56
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (4) 1 157d 157d 0/24 auto-closed as invalid on 2022/07/28 22:06

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

write to 0xffff888133dbc8c0 of 8 bytes by task 22300 on cpu 0:
 perf_event_update_time kernel/events/core.c:646 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_out+0x479/0x9c0 kernel/events/core.c:2273
 group_sched_out+0xdb/0x1d0 kernel/events/core.c:2299
 ctx_sched_out+0x2b9/0x310 kernel/events/core.c:3262
 task_ctx_sched_out kernel/events/core.c:2637 [inline]
 perf_event_context_sched_out kernel/events/core.c:3467 [inline]
 __perf_event_task_sched_out+0x63e/0xf00 kernel/events/core.c:3570
 prepare_task_switch kernel/sched/core.c:4883 [inline]
 context_switch kernel/sched/core.c:5025 [inline]
 __schedule+0x443/0x6c0 kernel/sched/core.c:6388
 schedule+0x71/0xa0 kernel/sched/core.c:6460
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue+0xc9/0x160 kernel/futex/waitwake.c:355
 futex_wait+0x126/0x350 kernel/futex/waitwake.c:656
 do_futex+0x283/0x2b0 kernel/futex/syscalls.c:106
 __do_sys_futex kernel/futex/syscalls.c:183 [inline]
 __se_sys_futex+0xe8/0x350 kernel/futex/syscalls.c:164
 __x64_sys_futex+0x74/0x80 kernel/futex/syscalls.c:164
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888133dbc8c0 of 8 bytes by task 22324 on cpu 1:
 __perf_event_read_value+0x84/0x1d0 kernel/events/core.c:5199
 perf_read_one kernel/events/core.c:5328 [inline]
 __perf_read kernel/events/core.c:5379 [inline]
 perf_read+0x2b8/0x5c0 kernel/events/core.c:5396
 loop_rw_iter+0x233/0x360
 io_iter_do_read fs/io_uring.c:3745 [inline]
 io_read fs/io_uring.c:3859 [inline]
 io_issue_sqe+0x7ba9/0x8670 fs/io_uring.c:7130
 io_wq_submit_work+0x249/0x2d0 fs/io_uring.c:7305
 io_worker_handle_work+0x517/0xc50 fs/io-wq.c:597
 io_wqe_worker+0x1d1/0x940 fs/io-wq.c:644
 ret_from_fork+0x1f/0x30

value changed: 0x0000000003c7b2e5 -> 0x0000000003c83e21

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22324 Comm: iou-wrk-22300 Not tainted 5.18.0-rc3-syzkaller-00060-g59f0c2447e25-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/04/22 15:31 upstream 59f0c2447e25 2738b391 .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
ci2-upstream-kcsan-gce 2022/04/05 19:18 upstream ce4c854ee868 0127c10f .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
* Struck through repros no longer work on HEAD.