syzbot


DATA RACE in fuse.(*connection).callFutureLocked

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 0x00c0004fe788 by goroutine 225:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*connection).callFutureLocked()
      pkg/sentry/fsimpl/fuse/connection.go:316 +0x2b6
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*connection).callFuture()
      pkg/sentry/fsimpl/fuse/connection.go:298 +0x4cf
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*connection).Call()
      pkg/sentry/fsimpl/fuse/connection.go:262 +0xb9
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*inode).setAttr()
      pkg/sentry/fsimpl/fuse/fusefs.go:860 +0x3ce
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*inode).SetStat()
      pkg/sentry/fsimpl/fuse/fusefs.go:828 +0x10b
  gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs.(*Filesystem).SetStatAt()
      pkg/sentry/fsimpl/kernfs/filesystem.go:816 +0x299
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*filesystem).SetStatAt()
      <autogenerated>:1 +0xf7
  gvisor.dev/gvisor/pkg/sentry/vfs.(*VirtualFilesystem).SetStatAt()
      pkg/sentry/vfs/vfs.go:583 +0x1bc
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.setstatat()
      pkg/sentry/syscalls/linux/vfs2/setstat.go:458 +0x299
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.fchownat()
      pkg/sentry/syscalls/linux/vfs2/setstat.go:120 +0x1ed
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Lchown()
      pkg/sentry/syscalls/linux/vfs2/setstat.go:92 +0x68
  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 0x00c0004fe788 by goroutine 171:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.newFUSEConnection()
      pkg/sentry/fsimpl/fuse/connection.go:205 +0xfc
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.newFUSEFilesystem()
      pkg/sentry/fsimpl/fuse/fusefs.go:258 +0x7c
  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 (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/28 10:41 gvisor 2083e858ad8d 495e00c5 .config console log report syz C ci-gvisor-ptrace-3-race DATA RACE in fuse.(*connection).callFutureLocked
2022/01/31 05:26 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*connection).callFutureLocked
* Struck through repros no longer work on HEAD.