syzbot


DATA RACE in atomic.StoreInt64

Status: fixed on 2019/06/26 21:55
Reported-by: syzbot+83593fdf48bdc6807add@syzkaller.appspotmail.com
Fix commit: 8ab0848c70fc gvisor/fs: don't update file.offset for sockets, pipes, etc
First crash: 1998d, last: 1987d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c00053c860 by goroutine 368:
  sync/atomic.StoreInt64()
      bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_static_race_stripped/stdlib%/src/runtime/race_amd64.s:234 +0xb
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*File).Writev()
      pkg/sentry/fs/file.go:334 +0x325
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.writev()
      pkg/sentry/syscalls/linux/sys_write.go:295 +0x5c8
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Write()
      pkg/sentry/syscalls/linux/sys_write.go:71 +0x293
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:165 +0x407
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:283 +0xb4
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:244 +0x109
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:219 +0x1b6
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1523
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:91 +0x2e5

Previous read at 0x00c00053c860 by goroutine 391:
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*lockedReader).Read()
      pkg/sentry/fs/file.go:522 +0x283
  io.(*LimitedReader).Read()
      GOROOT/src/io/io.go:448 +0xc7
  io.copyBuffer()
      GOROOT/src/io/io.go:402 +0x143
  gvisor.googlesource.com/gvisor/pkg/sentry/fs.Splice()
      GOROOT/src/io/io.go:364 +0x60f
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.doSplice()
      pkg/sentry/syscalls/linux/sys_splice.go:38 +0x13c
  gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Splice()
      pkg/sentry/syscalls/linux/sys_splice.go:241 +0x481
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:165 +0x407
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:283 +0xb4
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:244 +0x109
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:219 +0x1b6
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1523
  gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:91 +0x2e5

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/07 18:34 https://gvisor.googlesource.com/gvisor master e5fb3aab122c cf9c3a50 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2019/06/19 10:41 https://gvisor.googlesource.com/gvisor master add40fd6ad4c 34bf9440 .config console log report ci-gvisor-kvm-direct-overlay-host-race
* Struck through repros no longer work on HEAD.