syzbot


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

Status: auto-closed as invalid on 2022/03/30 13:56
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 321d, last: 282d
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 359d 434d 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 39d 96d 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 (3) 2 224d 241d 0/24 auto-closed as invalid on 2022/05/27 15:32
upstream KCSAN: data-race in __perf_event_read_value / event_sched_out (4) 1 162d 162d 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 0xffff888133709ca8 of 8 bytes by task 15642 on cpu 1:
 perf_event_update_time kernel/events/core.c:647 [inline]
 perf_event_set_state kernel/events/core.c:666 [inline]
 event_sched_out+0x307/0x830 kernel/events/core.c:2364
 group_sched_out+0xf0/0x1f0 kernel/events/core.c:2390
 ctx_sched_out+0x3ab/0x470 kernel/events/core.c:3355
 task_ctx_sched_out kernel/events/core.c:2729 [inline]
 perf_event_context_sched_out kernel/events/core.c:3560 [inline]
 __perf_event_task_sched_out+0x679/0xf10 kernel/events/core.c:3663
 perf_event_task_sched_out include/linux/perf_event.h:1236 [inline]
 prepare_task_switch+0x13b/0x140 kernel/sched/core.c:4805
 context_switch kernel/sched/core.c:4947 [inline]
 __schedule+0x387/0x690 kernel/sched/core.c:6304
 preempt_schedule_common kernel/sched/core.c:6470 [inline]
 __cond_resched+0x3f/0x90 kernel/sched/core.c:8183
 _cond_resched include/linux/sched.h:2024 [inline]
 tctx_task_work+0x7f/0xc90 fs/io_uring.c:2363
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_signal include/linux/tracehook.h:213 [inline]
 handle_signal_work kernel/entry/common.c:146 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x102/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888133709ca8 of 8 bytes by task 15691 on cpu 0:
 __perf_event_read_value+0x84/0x1f0 kernel/events/core.c:5304
 perf_read_one kernel/events/core.c:5433 [inline]
 __perf_read kernel/events/core.c:5484 [inline]
 perf_read+0x2b8/0x5c0 kernel/events/core.c:5501
 loop_rw_iter+0x257/0x350
 io_iter_do_read fs/io_uring.c:3613 [inline]
 io_read fs/io_uring.c:3668 [inline]
 io_issue_sqe+0x72a1/0x9610 fs/io_uring.c:6750
 io_wq_submit_work+0x1c5/0x370 fs/io_uring.c:6915
 io_worker_handle_work+0x51b/0xc10 fs/io-wq.c:588
 io_wqe_worker+0x1bc/0x4f0 fs/io-wq.c:639
 ret_from_fork+0x1f/0x30

value changed: 0x0000000003b6bdeb -> 0x0000000003b71103

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15691 Comm: iou-wrk-15642 Tainted: G S                5.17.0-rc5-syzkaller-00011-g5c1ee569660d-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/23 13:54 upstream 5c1ee569660d 6e821dbf .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
ci2-upstream-kcsan-gce 2022/02/02 20:51 upstream 27bb0b18c208 4ebb2798 .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
ci2-upstream-kcsan-gce 2022/01/15 16:43 upstream a33f5c380c4b 723cfaf0 .config log report info KCSAN: data-race in __perf_event_read_value / event_sched_out
* Struck through repros no longer work on HEAD.