syzbot


DATA RACE in fuse.(*connection).initProcessReply

Status: fixed on 2022/02/03 04:49
Fix commit: a5ce865145c7 fuse: Attempt to fix five data races.
First crash: 1032d, last: 1027d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c000b07ba4 by goroutine 191:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*connection).initProcessReply()
      pkg/sentry/fsimpl/fuse/connection_control.go:128 +0x16e
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*connection).InitRecv()
      pkg/sentry/fsimpl/fuse/connection_control.go:106 +0x1f0
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).asyncCallBack()
      pkg/sentry/fsimpl/fuse/dev.go:453 +0x216
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).sendResponse()
      pkg/sentry/fsimpl/fuse/dev.go:416 +0x27c
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).writeLocked()
      pkg/sentry/fsimpl/fuse/dev.go:341 +0x67b
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).Write()
      pkg/sentry/fsimpl/fuse/dev.go:247 +0x164
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Write()
      pkg/sentry/vfs/file_description.go:657 +0x130
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.write()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:348 +0xed
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Write()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:317 +0x307
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x194
  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:254 +0x1286
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x352

Previous read at 0x00c000b07ba4 by goroutine 184:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).Read()
      pkg/sentry/fsimpl/fuse/dev.go:145 +0x113
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).Read()
      pkg/sentry/vfs/file_description.go:626 +0x16d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.read()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:117 +0x564
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Read()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:63 +0x307
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:103 +0x194
  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:254 +0x1286
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:95 +0x352

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/29 15:20 gvisor 2a3d59997fb9 495e00c5 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/30 15:02 gvisor 2a3d59997fb9 495e00c5 .config console log report syz ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 23:43 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 18:42 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 18:05 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 17:59 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 13:06 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/02 09:15 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).initProcessReply
2022/02/01 23:51 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/30 20:45 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/30 14:36 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/29 11:28 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/29 11:28 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*connection).initProcessReply
2022/01/29 11:26 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).initProcessReply
* Struck through repros no longer work on HEAD.