syzbot


DATA RACE in fs.(*Dirent).getDotAttrs

Status: fixed on 2018/12/12 09:36
Fix commit: 54dd0d0dc5ee Fix data race caused by unlocked call of Dirent.descendantOf.
First crash: 2289d, last: 2289d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c42139def0 by goroutine 494:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).getDotAttrs()
      pkg/sentry/fs/dirent.go:246 +0xd0
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.direntReaddir()
      pkg/sentry/fs/dirent.go:982 +0x133
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.DirentReaddir()
      pkg/sentry/fs/dirent.go:955 +0x97
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*Handle).Readdir()
      pkg/sentry/fs/fsutil/handle.go:76 +0x205
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Readdir()
      pkg/sentry/fs/file.go:218 +0x12b
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.getdents()
      pkg/sentry/syscalls/linux/sys_getdents.go:82 +0x263
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Getdents()
      pkg/sentry/syscalls/linux/sys_getdents.go:43 +0x154
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:162 +0x14e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:280 +0x7d
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:241 +0xc3
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:216 +0x19e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1501
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Previous write at 0x00c42139def0 by goroutine 508:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.Rename()
      pkg/sentry/fs/dirent.go:1597 +0x46f
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt.func1.1()
      pkg/sentry/syscalls/linux/sys_file.go:1831 +0x18d
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpAt()
      pkg/sentry/syscalls/linux/sys_file.go:51 +0x271
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt.func1()
      pkg/sentry/syscalls/linux/sys_file.go:1820 +0x20a
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpAt()
      pkg/sentry/syscalls/linux/sys_file.go:51 +0x271
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt()
      pkg/sentry/syscalls/linux/sys_file.go:1805 +0x1ef
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Rename()
      pkg/sentry/syscalls/linux/sys_file.go:1840 +0x60
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:162 +0x14e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:280 +0x7d
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:241 +0xc3
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:216 +0x19e
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1501
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/08/21 02:59 https://github.com/dvyukov/gvisor.git race d4d5ed1d9def 95b5c82b .config console log report ci-gvisor-kvm-direct-overlay-host-race
* Struck through repros no longer work on HEAD.