syzbot


DATA RACE in transport.(*connectionedEndpoint).Listen

Status: fixed on 2022/01/05 10:49
Fix commit: 52bee5297caf unix: call Listening under the endpoint lock
First crash: 1071d, last: 1071d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c001286260 by goroutine 942:
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Listen()
      pkg/sentry/socket/unix/transport/connectioned.go:396 +0x384
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*socketOpsCommon).Listen()
      pkg/sentry/socket/unix/unix.go:203 +0x61
  gvisor.dev/gvisor/pkg/sentry/socket/unix.(*SocketVFS2).Listen()
      <autogenerated>:1 +0x5b
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Listen()
      pkg/sentry/syscalls/linux/vfs2/socket.go:407 +0x1af
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:238 +0xb3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:198 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:173 +0x213
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x133a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x352

Previous read at 0x00c001286260 by goroutine 919:
  gvisor.dev/gvisor/pkg/sentry/socket/unix/transport.(*connectionedEndpoint).Listening()
      pkg/sentry/socket/unix/transport/connectioned.go:202 +0x44
  gvisor.dev/gvisor/pkg/sentry/fsimpl/proc.(*netUnixData).Generate()
      pkg/sentry/fsimpl/proc/task_net.go:229 +0x89c
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).preadLocked()
      pkg/sentry/vfs/file_description_impl_util.go:294 +0x135
  gvisor.dev/gvisor/pkg/sentry/vfs.(*DynamicBytesFileDescriptionImpl).Read()
      pkg/sentry/vfs/file_description_impl_util.go:321 +0x139
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*DynamicBytesFD).Read()
      pkg/sentry/fsimpl/kernfs/dynamic_bytes_file.go:115 +0xf0
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Read()
      pkg/sentry/vfs/file_description.go:623 +0x16d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Sendfile()
      pkg/sentry/syscalls/linux/vfs2/splice.go:381 +0x1396
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x452
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:238 +0xb3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:198 +0x10e
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:173 +0x213
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:282 +0x133a
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:97 +0x352

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/21 08:33 gvisor b91cc35b4086 a938f0b8 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in transport.(*connectionedEndpoint).Listen
* Struck through repros no longer work on HEAD.