syzbot


DATA RACE in cgroupfs.(*cpusData).Write

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
Write at 0x00c0009960e0 by goroutine 337:
  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

Previous write at 0x00c0009960e0 by goroutine 301:
  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 (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/28 02:12 gvisor 22a6a37079c6 be531bb4 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in cgroupfs.(*cpusData).Write
2021/10/27 21:58 gvisor 22a6a37079c6 719a0d78 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in cgroupfs.(*cpusData).Write
2021/10/27 20:21 gvisor 22a6a37079c6 719a0d78 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in cgroupfs.(*cpusData).Write
2021/10/23 05:14 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in cgroupfs.(*cpusData).Write
2021/10/23 05:09 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in cgroupfs.(*cpusData).Write
2021/10/23 04:46 gvisor 14f4113924c8 282f03fb .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in cgroupfs.(*cpusData).Write
* Struck through repros no longer work on HEAD.