syzbot


DATA RACE in atomic.AddInt32

Status: fixed on 2019/07/19 08:11
Fix commit: 542fbd01a7ed Fix race in FDTable.GetFDs().
First crash: 1959d, last: 1959d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c000ccb560 by goroutine 439:
  sync/atomic.AddInt32()
      bazel-out/k8-fastbuild/bin/external/io_bazel_rules_go/linux_amd64_static_race_stripped/stdlib%/src/runtime/race_amd64.s:269 +0xb
  gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).set()
      pkg/sentry/kernel/fd_table_unsafe.go:101 +0x1e8
  gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).Remove()
      pkg/sentry/kernel/fd_table.go:365 +0x11e
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Close()
      pkg/sentry/syscalls/linux/sys_file.go:764 +0xa1
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:165 +0x407
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:283 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:244 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:219 +0x1b6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1523
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:91 +0x2e5

Previous read at 0x00c000ccb560 by goroutine 571:
  gvisor.dev/gvisor/pkg/sentry/kernel.(*FDTable).GetFDs()
      pkg/sentry/kernel/fd_table.go:320 +0x47
  gvisor.dev/gvisor/pkg/sentry/fs/proc.readDescriptors.func1()
      pkg/sentry/fs/proc/fds.go:61 +0x82
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).WithMuLocked()
      pkg/sentry/kernel/task.go:746 +0x59
  gvisor.dev/gvisor/pkg/sentry/fs/proc.readDescriptors()
      pkg/sentry/fs/proc/fds.go:59 +0x92
  gvisor.dev/gvisor/pkg/sentry/fs/proc.(*fdDirFile).Readdir()
      pkg/sentry/fs/proc/fds.go:228 +0x145
  gvisor.dev/gvisor/pkg/sentry/fs.(*File).Readdir()
      pkg/sentry/fs/file.go:250 +0x132
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.getdents()
      pkg/sentry/syscalls/linux/sys_getdents.go:81 +0x335
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Getdents()
      pkg/sentry/syscalls/linux/sys_getdents.go:42 +0x149
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:165 +0x407
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:283 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:244 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:219 +0x1b6
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:219 +0x1523
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:91 +0x2e5

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/17 04:04 https://gvisor.googlesource.com/gvisor master 74dc663bbbc9 4ec4ea48 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.