syzbot


KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked

Status: auto-closed as invalid on 2020/01/27 12:36
Subsystems: cgroups
[Documentation on labels]
First crash: 1641d, last: 1621d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (3) cgroups 1 1060d 1060d 0/26 auto-closed as invalid on 2021/07/05 21:29
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (6) cgroups 12 714d 718d 0/26 auto-closed as invalid on 2022/06/16 16:40
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (2) cgroups 2 1317d 1348d 0/26 auto-closed as invalid on 2020/10/22 00:22
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (7) cgroups 234 317d 415d 0/26 auto-obsoleted due to no activity on 2023/07/19 10:43
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (4) cgroups 2 984d 1007d 0/26 auto-closed as invalid on 2021/09/20 09:16
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (5) cgroups 6 812d 814d 0/26 auto-closed as invalid on 2022/03/10 20:48

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked

write to 0xffffe8ffffc938f0 of 8 bytes by task 7740 on cpu 0:
 __cgroup_account_cputime+0x73/0x90 kernel/cgroup/rstat.c:370
 cgroup_account_cputime include/linux/cgroup.h:783 [inline]
 update_curr+0x104/0x1d0 kernel/sched/fair.c:861
 dequeue_entity+0x1e/0x3e0 kernel/sched/fair.c:4066
 dequeue_task_fair+0x50/0x1f0 kernel/sched/fair.c:5299
 dequeue_task kernel/sched/core.c:1314 [inline]
 deactivate_task+0x99/0x100 kernel/sched/core.c:1334
 __schedule+0x107/0x690 kernel/sched/core.c:4038
 schedule+0x47/0xd0 kernel/sched/core.c:4145
 freezable_schedule include/linux/freezer.h:172 [inline]
 do_nanosleep+0x138/0x320 kernel/time/hrtimer.c:1871
 hrtimer_nanosleep+0x191/0x320 kernel/time/hrtimer.c:1924
 __do_sys_nanosleep kernel/time/hrtimer.c:1958 [inline]
 __se_sys_nanosleep kernel/time/hrtimer.c:1945 [inline]
 __x64_sys_nanosleep+0x106/0x150 kernel/time/hrtimer.c:1945
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffe8ffffc938f0 of 8 bytes by task 16394 on cpu 1:
 cgroup_base_stat_flush kernel/cgroup/rstat.c:327 [inline]
 cgroup_rstat_flush_locked+0x2da/0x6b0 kernel/cgroup/rstat.c:168
 cgroup_rstat_flush_hold kernel/cgroup/rstat.c:240 [inline]
 cgroup_base_stat_cputime_show+0x93/0x180 kernel/cgroup/rstat.c:406
 cpu_stat_show+0x5e/0x3d0 kernel/cgroup/cgroup.c:3593
 cgroup_seqfile_show+0x78/0x130 kernel/cgroup/cgroup.c:3815
 kernfs_seq_show+0xaa/0xe0 fs/kernfs/file.c:167
 seq_read+0x350/0x960 fs/seq_file.c:229
 kernfs_fop_read+0xa2/0x320 fs/kernfs/file.c:251
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_loop_readv_writev fs/read_write.c:701 [inline]
 do_iter_read+0x357/0x3d0 fs/read_write.c:935
 vfs_readv+0x9c/0xf0 fs/read_write.c:997
 do_readv+0xe3/0x250 fs/read_write.c:1034
 __do_sys_readv fs/read_write.c:1125 [inline]
 __se_sys_readv fs/read_write.c:1122 [inline]
 __x64_sys_readv+0x4e/0x60 fs/read_write.c:1122
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16394 Comm: syz-executor.3 Not tainted 5.4.0-rc7+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/18 12:33 https://github.com/google/ktsan.git kcsan 5863cc791e4c d5696d51 .config console log report ci2-upstream-kcsan-gce
2019/11/07 20:15 https://github.com/google/ktsan.git kcsan 94c006602e13 f39aff9e .config console log report ci2-upstream-kcsan-gce
2019/10/29 06:05 https://github.com/google/ktsan.git kcsan 05f2236801fe 5ea87a66 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.