syzbot


DATA RACE in kernel.(*Task).Value

Status: fixed on 2018/06/29 15:41
Fix commit: f93bd2cbe668 Hold t.mu while calling t.FSContext().
First crash: 2345d, last: 2345d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c420dd9070 by goroutine 438:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Value()
      pkg/sentry/kernel/task_resources.go:103 +0x5be
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.taskAsyncContext.Value()
      pkg/sentry/kernel/context.go:134 +0x4c
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*taskAsyncContext).Value()
      <autogenerated>:1 +0x73
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.RootFromContext()
      pkg/sentry/fs/context.go:93 +0x5a
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).MappedName()
      pkg/sentry/fs/file.go:370 +0x46
  gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).vmaMapsEntryLocked()
      pkg/sentry/mm/proc_pid_maps.go:94 +0x8a9
  gvisor.googlesource.com/gvisor/pkg/sentry/mm.(*MemoryManager).ReadSeqFileData()
      pkg/sentry/mm/proc_pid_maps.go:52 +0x226
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.(*mapsData).ReadSeqFileData()
      pkg/sentry/fs/proc/task.go:309 +0xda
  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:190 +0x616
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.(*file).DeprecatedPreadv()
      <autogenerated>:1 +0xca
  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).Readv()
      pkg/sentry/fs/file.go:230 +0x15b
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.readv()
      pkg/sentry/syscalls/linux/sys_read.go:191 +0xa1
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Read()
      pkg/sentry/syscalls/linux/sys_read.go:67 +0x295
  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 0x00c420dd9070 by goroutine 400:
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*TaskResources).release()
      pkg/sentry/kernel/task_resources.go:57 +0xb2
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runExitMain).execute()
      pkg/sentry/kernel/task_exit.go:262 +0x167
  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/25 17:56 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.