syzbot


DATA RACE in cgroupfs.(*cpusData).Generate

Status: fixed on 2021/10/28 11:39
Fix commit: 6078d26588c0 Sychronize access to cpuset controller bitmaps.
First crash: 1130d, last: 1125d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c091b2c470 by goroutine 473:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*cpusData).Generate()
      pkg/sentry/fsimpl/cgroupfs/cpuset.go:74 +0x5a
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).preadLocked()
      pkg/sentry/vfs/file_description_impl_util.go:293 +0x135
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).Read()
      pkg/sentry/vfs/file_description_impl_util.go:320 +0x139
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).Read()
      pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:115 +0xf0
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Read()
      pkg/sentry/vfs/file_description.go:626 +0x16d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.read()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:94 +0xed
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Read()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:63 +0x307
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:238 +0xb3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:198 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:173 +0x213
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x12c6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x392

Previous write at 0x00c091b2c470 by goroutine 491:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*cpusData).Write()
      pkg/sentry/fsimpl/cgroupfs/cpuset.go:104 +0x86e
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).pwriteLocked()
      pkg/sentry/vfs/file_description_impl_util.go:373 +0x32a
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).Write()
      pkg/sentry/vfs/file_description_impl_util.go:394 +0x137
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).Write()
      pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:125 +0xf0
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Write()
      pkg/sentry/vfs/file_description.go:657 +0x130
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.write()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:345 +0xed
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Write()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:314 +0x307
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:238 +0xb3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:198 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:173 +0x213
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x12c6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x392

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/27 19:24 gvisor 22a6a37079c6 719a0d78 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in cgroupfs.(*cpusData).Generate
2021/10/23 04:33 gvisor 14f4113924c8 282f03fb .config console log report info ci-gvisor-ptrace-1-race DATA RACE in cgroupfs.(*cpusData).Generate
* Struck through repros no longer work on HEAD.