syzbot


KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (4)

Status: auto-closed as invalid on 2021/09/20 09:16
Subsystems: cgroups
[Documentation on labels]
First crash: 996d, last: 974d
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 1050d 1050d 0/26 auto-closed as invalid on 2021/07/05 21:29
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked cgroups 3 1610d 1631d 0/26 auto-closed as invalid on 2020/01/27 12:36
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (6) cgroups 12 704d 708d 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 1307d 1338d 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 307d 405d 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 (5) cgroups 6 802d 804d 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 0xffffe8ffffd24f70 of 8 bytes by task 4876 on cpu 0:
 cgroup_rstat_cpu_pop_updated kernel/cgroup/rstat.c:139 [inline]
 cgroup_rstat_flush_locked+0x282/0x7f0 kernel/cgroup/rstat.c:161
 cgroup_rstat_flush_hold kernel/cgroup/rstat.c:236 [inline]
 cgroup_base_stat_cputime_show+0x7c/0x310 kernel/cgroup/rstat.c:448
 cpu_stat_show+0xab/0x350 kernel/cgroup/cgroup.c:3562
 cgroup_seqfile_show+0xbe/0x150 kernel/cgroup/cgroup.c:3875
 kernfs_seq_show+0x74/0x80 fs/kernfs/file.c:168
 seq_read_iter+0x2e1/0x930 fs/seq_file.c:230
 kernfs_fop_read_iter+0xd9/0x320 fs/kernfs/file.c:241
 call_read_iter include/linux/fs.h:2108 [inline]
 generic_file_splice_read+0x22a/0x310 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffe8ffffd24f70 of 8 bytes by task 1769 on cpu 1:
 cgroup_rstat_updated kernel/cgroup/rstat.c:38 [inline]
 cgroup_base_stat_cputime_account_end kernel/cgroup/rstat.c:364 [inline]
 __cgroup_account_cputime+0x8e/0x1e0 kernel/cgroup/rstat.c:375
 cgroup_account_cputime include/linux/cgroup.h:797 [inline]
 update_curr+0xf4/0x240 kernel/sched/fair.c:821
 dequeue_entity kernel/sched/fair.c:4360 [inline]
 dequeue_task_fair+0xbf/0x8f0 kernel/sched/fair.c:5666
 dequeue_task kernel/sched/core.c:1967 [inline]
 deactivate_task kernel/sched/core.c:1981 [inline]
 __schedule+0x1da/0x670 kernel/sched/core.c:5892
 schedule+0x67/0x90 kernel/sched/core.c:6017
 freezable_schedule include/linux/freezer.h:172 [inline]
 do_nanosleep+0xcc/0x390 kernel/time/hrtimer.c:1896
 hrtimer_nanosleep+0xfa/0x1f0 kernel/time/hrtimer.c:1949
 common_nsleep+0x69/0x80 kernel/time/posix-timers.c:1227
 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline]
 __se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline]
 __x64_sys_clock_nanosleep+0x1ee/0x220 kernel/time/posix-timers.c:1245
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff88810a0bc800 -> 0x0000000000000000

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/08/16 09:07 upstream 7c60610d4767 2489ab88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
2021/07/24 12:26 upstream f0fddcec6b62 4d1b57d4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
* Struck through repros no longer work on HEAD.