syzbot


KCSAN: data-race in calc_timer_values / perf_event_update_time

Status: auto-closed as invalid on 2020/05/11 16:30
Subsystems: perf
[Documentation on labels]
First crash: 2118d, last: 2006d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in calc_timer_values / perf_event_update_time

write to 0xffff888096c878c8 of 8 bytes by task 8206 on cpu 0:
 __perf_update_times kernel/events/core.c:631 [inline]
 perf_event_update_time+0x170/0x1f0 kernel/events/core.c:638
 perf_event_set_state.part.0+0x46/0x100 kernel/events/core.c:657
 perf_event_set_state kernel/events/core.c:654 [inline]
 event_sched_out kernel/events/core.c:2117 [inline]
 event_sched_out.isra.0+0x220/0x530 kernel/events/core.c:2089
 group_sched_out.part.0+0x52/0x120 kernel/events/core.c:2143
 group_sched_out kernel/events/core.c:2138 [inline]
 ctx_sched_out+0x52f/0x560 kernel/events/core.c:3094
 task_ctx_sched_out+0x53/0x80 kernel/events/core.c:2516
 perf_event_context_sched_out kernel/events/core.c:3280 [inline]
 __perf_event_task_sched_out+0x538/0xaa0 kernel/events/core.c:3371
 perf_event_task_sched_out include/linux/perf_event.h:1196 [inline]
 prepare_task_switch kernel/sched/core.c:3159 [inline]
 context_switch kernel/sched/core.c:3338 [inline]
 __schedule+0x3f3/0x690 kernel/sched/core.c:4082
 schedule+0x41/0xe0 kernel/sched/core.c:4156
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue_me+0x18b/0x290 kernel/futex.c:2705
 futex_wait+0x17e/0x400 kernel/futex.c:2811
 do_futex+0xe2/0x1820 kernel/futex.c:3882
 __do_sys_futex kernel/futex.c:3943 [inline]
 __se_sys_futex kernel/futex.c:3911 [inline]
 __x64_sys_futex+0x2dc/0x410 kernel/futex.c:3911
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888096c878c8 of 8 bytes by task 8205 on cpu 1:
 __perf_update_times kernel/events/core.c:629 [inline]
 calc_timer_values+0xfc/0x1b0 kernel/events/core.c:5430
 perf_event_update_userpage+0x7f/0x340 kernel/events/core.c:5485
 perf_mmap+0xe0f/0xf10 kernel/events/core.c:5971
 call_mmap include/linux/fs.h:1906 [inline]
 mmap_region+0x834/0xdd0 mm/mmap.c:1774
 do_mmap+0x717/0xc20 mm/mmap.c:1545
 do_mmap_pgoff include/linux/mm.h:2334 [inline]
 vm_mmap_pgoff+0x12f/0x190 mm/util.c:506
 ksys_mmap_pgoff+0x2db/0x420 mm/mmap.c:1597
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8205 Comm: syz-executor.2 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/02 16:24 https://github.com/google/ktsan.git kcsan 766d004d1b85 4a4e0509 .config console log report ci2-upstream-kcsan-gce
2020/02/13 15:18 https://github.com/google/ktsan.git kcsan 55121bc1808a e6247653 .config console log report ci2-upstream-kcsan-gce
2019/12/06 12:59 https://github.com/google/ktsan.git kcsan ef798c30ba4e 12c3b6cd .config console log report ci2-upstream-kcsan-gce
2019/11/28 11:37 https://github.com/google/ktsan.git kcsan ef798c30ba4e 97264cb1 .config console log report ci2-upstream-kcsan-gce
2019/11/23 20:12 https://github.com/google/ktsan.git kcsan 5863cc791e4c 598ca6c8 .config console log report ci2-upstream-kcsan-gce
2019/11/18 19:37 https://github.com/google/ktsan.git kcsan 5863cc791e4c d5696d51 .config console log report ci2-upstream-kcsan-gce
2019/11/13 04:59 https://github.com/google/ktsan.git kcsan 7f2955e0d056 048f2d49 .config console log report ci2-upstream-kcsan-gce
2019/11/11 07:22 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.