syzbot


DATA RACE in fuse.(*DeviceFD).PWrite

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

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0014e64f0 by goroutine 263:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).PWrite()
      pkg/sentry/fsimpl/fuse/dev.go:236 +0x45
  gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).PWrite()
      pkg/sentry/vfs/file_description.go:645 +0x159
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.pwrite()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:504 +0xfa
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Pwritev()
      pkg/sentry/syscalls/linux/vfs2/read_write.go:452 +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 0x00c0014e64f0 by goroutine 283:
  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 (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/28 13:01 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/28 13:01 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/28 12:29 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/31 10:08 gvisor 2a3d59997fb9 a491ad2d .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/31 06:58 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/29 01:53 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/29 01:39 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/29 01:39 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/29 01:34 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/28 15:10 gvisor 2083e858ad8d 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).PWrite
2022/01/28 12:14 gvisor 2083e858ad8d 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).PWrite
* Struck through repros no longer work on HEAD.