syzbot


DATA RACE in proc.(*mountInfoFile).ReadSeqFileData.func1

Status: fixed on 2018/06/27 00:32
Fix commit: 1a9917d14d66 MountSource.Root() should return a refernce on the dirent.
First crash: 2347d, last: 2347d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c420852178 by goroutine 426:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.(*mountInfoFile).ReadSeqFileData.func1()
      pkg/sentry/fs/proc/mounts.go:91 +0x26a
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.forEachMountSource()
      pkg/sentry/fs/proc/mounts.go:53 +0x397
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.(*mountInfoFile).ReadSeqFileData()
      pkg/sentry/fs/proc/mounts.go:74 +0x103
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc/seqfile.(*SeqFile).updateSourceLocked()
      pkg/sentry/fs/proc/seqfile/seqfile.go:225 +0xec
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc/seqfile.(*SeqFile).DeprecatedPreadv()
      pkg/sentry/fs/proc/seqfile/seqfile.go:158 +0x9a9
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/fsutil.(*Handle).Read()
      pkg/sentry/fs/fsutil/handle.go:90 +0xbd
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Preadv()
      pkg/sentry/fs/file.go:248 +0x13c
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.preadv()
      pkg/sentry/syscalls/linux/sys_read.go:234 +0xae
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Preadv()
      pkg/sentry/syscalls/linux/sys_read.go:185 +0x2f2
  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:278 +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 +0x19c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:217 +0x157c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x264

Previous write at 0x00c420852178 by goroutine 343:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).destroy()
      pkg/sentry/fs/dirent.go:1286 +0x2c8
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).(gvisor.googlesource.com/gvisor/pkg/sentry/fs.destroy)-fm()
      pkg/sentry/fs/dirent.go:1321 +0x41
  gvisor.googlesource.com/gvisor/pkg/refs.(*AtomicRefCount).DecRefWithDestructor()
      pkg/refs/refcounter.go:293 +0x197
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).DecRef()
      pkg/sentry/fs/dirent.go:1321 +0xe0
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpOn()
      pkg/sentry/syscalls/linux/sys_file.go:112 +0x260
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Umount2()
      pkg/sentry/syscalls/linux/sys_mount.go:137 +0x1fc
  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:278 +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 +0x19c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:217 +0x157c
  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/06/24 00:19 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.