syzbot


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

Status: auto-closed as invalid on 2021/07/05 21:29
Subsystems: cgroups
[Documentation on labels]
First crash: 1059d, last: 1059d
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 cgroups 3 1619d 1639d 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 713d 717d 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 1316d 1346d 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 315d 414d 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 982d 1005d 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 811d 813d 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 0xffffe8ffffc22cc0 of 8 bytes by task 8301 on cpu 1:
 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:445
 cpu_stat_show+0xab/0x350 kernel/cgroup/cgroup.c:3545
 cgroup_seqfile_show+0xbe/0x150 kernel/cgroup/cgroup.c:3772
 kernfs_seq_show+0x74/0x80 fs/kernfs/file.c:168
 traverse+0x145/0x380 fs/seq_file.c:108
 seq_read_iter+0x859/0x910 fs/seq_file.c:192
 kernfs_fop_read_iter+0xd9/0x320 fs/kernfs/file.c:241
 call_read_iter include/linux/fs.h:2108 [inline]
 do_iter_readv_writev+0x2e8/0x360 fs/read_write.c:738
 do_iter_read+0x109/0x4b0 fs/read_write.c:801
 vfs_readv fs/read_write.c:921 [inline]
 do_preadv+0x13b/0x230 fs/read_write.c:1013
 __do_sys_preadv fs/read_write.c:1063 [inline]
 __se_sys_preadv fs/read_write.c:1058 [inline]
 __x64_sys_preadv+0x54/0x60 fs/read_write.c:1058
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffe8ffffc22cc0 of 8 bytes by task 8300 on cpu 0:
 cgroup_rstat_updated kernel/cgroup/rstat.c:38 [inline]
 cgroup_base_stat_cputime_account_end kernel/cgroup/rstat.c:363 [inline]
 __cgroup_account_cputime+0x8e/0x1e0 kernel/cgroup/rstat.c:373
 cgroup_account_cputime include/linux/cgroup.h:784 [inline]
 update_curr+0xf4/0x240 kernel/sched/fair.c:867
 enqueue_entity+0x38/0x650 kernel/sched/fair.c:4234
 enqueue_task_fair+0xcd/0x510 kernel/sched/fair.c:5539
 enqueue_task kernel/sched/core.c:1604 [inline]
 activate_task+0xb7/0xe0 kernel/sched/core.c:1623
 ttwu_do_activate+0x7c/0x90 kernel/sched/core.c:3008
 ttwu_queue kernel/sched/core.c:3205 [inline]
 try_to_wake_up+0x35a/0x480 kernel/sched/core.c:3483
 wake_up_process kernel/sched/core.c:3552 [inline]
 wake_up_q+0x46/0x80 kernel/sched/core.c:597
 futex_wake+0x392/0x3f0 kernel/futex.c:1634
 do_futex+0x99a/0x1ee0 kernel/futex.c:3737
 __do_sys_futex kernel/futex.c:3805 [inline]
 __se_sys_futex+0x21c/0x380 kernel/futex.c:3786
 __x64_sys_futex+0x74/0x80 kernel/futex.c:3786
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff88812e5d4000 -> 0x0000000000000000

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/31 21:21 upstream c2131f7e73c9 032639db .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.