syzbot


DATA RACE in fuse.(*DeviceFD).PRead

Status: fixed on 2022/05/03 06:19
Fix commit: 32c474d82f65 Allow multiple FUSE filesystems to share a connection.
First crash: 1033d, last: 1028d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c00093a4f0 by goroutine 199:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).PRead()
      pkg/sentry/fsimpl/fuse/dev.go:124 +0x45
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PRead()
      pkg/sentry/vfs/file_description.go:611 +0x199
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.pread()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:251 +0xfa
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Preadv()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:199 +0x331
  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 write at 0x00c00093a4f0 by goroutine 215:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.newFUSEFilesystem()
      pkg/sentry/fsimpl/fuse/fusefs.go:277 +0x331
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.FilesystemType.GetFilesystem()
      pkg/sentry/fsimpl/fuse/fusefs.go:236 +0x144a
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*FilesystemType).GetFilesystem()
      <autogenerated>:1 +0xe4
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountDisconnected()
      pkg/sentry/vfs/mount.go:200 +0x191
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).MountAt()
      pkg/sentry/vfs/mount.go:272 +0xd4
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Mount()
      pkg/sentry/syscalls/linux/vfs2/mount.go:112 +0x5d6
  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 (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/28 10:55 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/28 10:54 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PRead
2022/02/01 16:10 gvisor 0f8db423e270 c1c1631d .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/30 02:07 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/29 23:50 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/28 23:23 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/28 23:01 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/28 11:42 gvisor 2083e858ad8d 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PRead
2022/01/28 08:28 gvisor 2083e858ad8d 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PRead
* Struck through repros no longer work on HEAD.