syzbot


DATA RACE in cgroupfs.FilesystemType.GetFilesystem

Status: fixed on 2021/05/15 09:36
Reported-by: syzbot+13f54e77bdf59f0171f0@syzkaller.appspotmail.com
Fix commit: 78ae3db1a39c Fix cgroup hierarchy registration.
First crash: 1309d, last: 1309d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0012a409c by goroutine 358:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.FilesystemType.GetFilesystem()
      pkg/sentry/fsimpl/cgroupfs/cgroupfs.go:224 +0x1bcb
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*FilesystemType).GetFilesystem()
      <autogenerated>:1 +0xe4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountDisconnected()
      pkg/sentry/vfs/mount.go:200 +0x1a1
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt()
      pkg/sentry/vfs/mount.go:273 +0xd4
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount()
      pkg/sentry/syscalls/linux/vfs2/mount.go:113 +0x4f3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:104 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:239 +0xb9
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:199 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:174 +0x1e9
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x12a6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x397

Previous write at 0x00c0012a409c by goroutine 308:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.FilesystemType.GetFilesystem()
      pkg/sentry/fsimpl/cgroupfs/cgroupfs.go:294 +0x127a
  gvisor.dev/gvisor/pkg/sentry/fsimpl/cgroupfs.(*FilesystemType).GetFilesystem()
      <autogenerated>:1 +0xe4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountDisconnected()
      pkg/sentry/vfs/mount.go:200 +0x1a1
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt()
      pkg/sentry/vfs/mount.go:273 +0xd4
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount()
      pkg/sentry/syscalls/linux/vfs2/mount.go:113 +0x4f3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:104 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:239 +0xb9
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:199 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:174 +0x1e9
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x12a6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x397

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/27 06:16 gvisor 5b7b7daa425f 8ee2dea6 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in cgroupfs.FilesystemType.GetFilesystem
* Struck through repros no longer work on HEAD.