syzbot


DATA RACE in proc.forEachMountSource

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

Sample crash report:
WARNING: DATA RACE
Read at 0x00c42046e270 by goroutine 126:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc.forEachMountSource()
      pkg/sentry/kernel/task_resources.go:103 +0x5a
  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:190 +0x616
  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 0x00c42046e270 by goroutine 121:
  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 (24):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/06/25 10:05 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report syz C ci-gvisor-ptrace-proxy-sandbox-race
2018/06/28 23:56 https://github.com/dvyukov/gvisor.git race 35a840ad3ceb dba0b50e .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/28 15:35 https://github.com/dvyukov/gvisor.git race 35a840ad3ceb dba0b50e .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/28 10:51 https://github.com/dvyukov/gvisor.git race 35a840ad3ceb dba0b50e .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/28 06:04 https://github.com/dvyukov/gvisor.git race 53efb512bdf7 43e60f7e .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/27 00:25 https://github.com/dvyukov/gvisor.git race fb36f579ec12 b0294c53 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 18:56 https://github.com/dvyukov/gvisor.git race fb36f579ec12 089f1181 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 16:27 https://github.com/dvyukov/gvisor.git race fb36f579ec12 089f1181 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 15:31 https://github.com/dvyukov/gvisor.git race fb36f579ec12 089f1181 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 05:21 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 02:30 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/26 02:28 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/25 10:00 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/25 09:58 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/24 03:28 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 2064fc5c .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 18:25 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 17:44 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 16:08 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 09:28 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 09:11 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 09:05 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 08:49 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 08:29 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2018/06/23 08:07 https://github.com/dvyukov/gvisor.git race 60dbbdc2d54b 665947c7 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.