syzbot


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

Status: auto-closed as invalid on 2022/07/28 22:06
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 167d, last: 167d
similar bugs (4):
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 364d 439d 0/24 auto-closed as invalid on 2022/01/12 21:04
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (5) 5 43d 100d 0/24 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) 3 287d 326d 0/24 auto-closed as invalid on 2022/03/30 13:56
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (3) 2 229d 246d 0/24 auto-closed as invalid on 2022/05/27 15:32

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

write to 0xffff8881394308c8 of 8 bytes by task 25159 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+0x4ad/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:4956 [inline]
 context_switch kernel/sched/core.c:5098 [inline]
 __schedule+0x43c/0x6c0 kernel/sched/core.c:6458
 schedule+0x71/0xa0 kernel/sched/core.c:6530
 schedule_timeout+0x51/0x290 kernel/time/timer.c:1911
 do_wait_for_common kernel/sched/completion.c:85 [inline]
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common+0x104/0x1c0 kernel/sched/completion.c:117
 io_wq_exit_workers fs/io-wq.c:1266 [inline]
 io_wq_put_and_exit+0x1f1/0x660 fs/io-wq.c:1301
 io_uring_clean_tctx+0xbe/0xf5 fs/io_uring.c:11599
 io_uring_cancel_generic+0x3f3/0x415 fs/io_uring.c:11669
 __io_uring_cancel+0x11/0x20 fs/io_uring.c:11683
 io_uring_files_cancel include/linux/io_uring.h:44 [inline]
 do_exit+0x2c6/0x1720 kernel/exit.c:750
 do_group_exit+0xa5/0x160 kernel/exit.c:925
 get_signal+0xf54/0x1020 kernel/signal.c:2857
 arch_do_signal_or_restart+0x87/0x2d0 arch/x86/kernel/signal.c:869
 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:166
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff8881394308c8 of 8 bytes by task 25169 on cpu 1:
 __perf_event_read_value+0xba/0x1d0 kernel/events/core.c:5200
 perf_read_one kernel/events/core.c:5327 [inline]
 __perf_read kernel/events/core.c:5378 [inline]
 perf_read+0x2b8/0x5c0 kernel/events/core.c:5395
 loop_rw_iter+0x233/0x360
 io_iter_do_read fs/io_uring.c:4247 [inline]
 io_read fs/io_uring.c:4364 [inline]
 io_issue_sqe+0xa18c/0xaa00 fs/io_uring.c:8325
 io_wq_submit_work+0x41b/0x590 fs/io_uring.c:8514
 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: 0x00000000029968f5 -> 0x000000000299832b

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 25169 Comm: iou-wrk-25159 Not tainted 5.19.0-rc3-syzkaller-00146-g92f20ff72066-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/23 21:59 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
* Struck through repros no longer work on HEAD.