syzbot


KCSAN: data-race in detach_pid / perf_event_switch_output

Status: auto-closed as invalid on 2021/10/29 19:05
Subsystems: perf
[Documentation on labels]
First crash: 1096d, last: 943d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in detach_pid / perf_event_switch_output (4) perf 1 67d 67d 0/26 auto-obsoleted due to no activity on 2024/03/23 04:37
upstream KCSAN: data-race in detach_pid / perf_event_switch_output (2) perf 1 857d 857d 0/26 auto-closed as invalid on 2022/01/22 22:51
upstream KCSAN: data-race in detach_pid / perf_event_switch_output (3) perf 1 222d 222d 0/26 auto-obsoleted due to no activity on 2023/10/20 14:02

Sample crash report:
==================================================================
BUG: KCSAN: data-race in detach_pid / perf_event_switch_output

write to 0xffff88813cba45e0 of 8 bytes by task 1115 on cpu 1:
 __change_pid kernel/pid.c:347 [inline]
 detach_pid+0xd7/0x160 kernel/pid.c:358
 __unhash_process kernel/exit.c:75 [inline]
 __exit_signal kernel/exit.c:148 [inline]
 release_task+0x6ef/0xbf0 kernel/exit.c:199
 wait_task_zombie kernel/exit.c:1107 [inline]
 wait_consider_task+0x10f9/0x1a10 kernel/exit.c:1334
 do_wait_thread kernel/exit.c:1397 [inline]
 do_wait+0x182/0x640 kernel/exit.c:1514
 kernel_wait4+0x14b/0x1b0 kernel/exit.c:1677
 __do_sys_wait4 kernel/exit.c:1705 [inline]
 __se_sys_wait4 kernel/exit.c:1701 [inline]
 __x64_sys_wait4+0x90/0x120 kernel/exit.c:1701
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813cba45e0 of 8 bytes by task 7839 on cpu 0:
 pid_alive include/linux/sched.h:1559 [inline]
 perf_event_pid_type kernel/events/core.c:1411 [inline]
 perf_event_pid kernel/events/core.c:1418 [inline]
 perf_event_switch_output+0x199/0x350 kernel/events/core.c:8660
 perf_iterate_sb_cpu kernel/events/core.c:7579 [inline]
 perf_iterate_sb+0x37d/0x8f0 kernel/events/core.c:7609
 perf_event_switch kernel/events/core.c:8707 [inline]
 __perf_event_task_sched_in+0x59d/0x850 kernel/events/core.c:3907
 perf_event_task_sched_in include/linux/perf_event.h:1206 [inline]
 finish_task_switch+0x1fd/0x290 kernel/sched/core.c:4809
 schedule_tail+0x6/0x40 kernel/sched/core.c:4876
 ret_from_fork+0x8/0x30

value changed: 0xffff88813cd1c680 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7839 Comm: syz-executor.5 Not tainted 5.15.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/24 19:02 upstream f9e36107ec70 8cac236e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/09/01 20:51 upstream 835d31d319d9 7eb7e152 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/08/18 11:45 upstream 614cb2751d31 a2fe1cb5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/07/24 18:38 upstream f0fddcec6b62 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/07/22 02:23 upstream 7b6ae471e541 29c3f20f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/07/07 11:17 upstream 3dbdb38e2869 4846d5c1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/07/04 04:40 upstream 3dbdb38e2869 55aa55c2 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/06/30 00:05 upstream c54b245d0118 a4fccb01 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/06/20 21:51 upstream cba5e97280f5 aba2b2fb .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/06/07 22:47 upstream 614124bea77e b718257f .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/05/27 18:21 upstream d7c5303fbc8a 858ea628 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/05/19 07:20 upstream 8ac91e6c6033 a343ba6b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/05/05 07:21 upstream d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/05/04 17:06 upstream 5e321ded302d 06c27ff5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/04/26 20:56 upstream 9f4ad9e425a1 805b5003 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
2021/04/24 08:10 upstream 8db5efb83fa9 17f0b706 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_pid / perf_event_switch_output
* Struck through repros no longer work on HEAD.