syzbot


DATA RACE in fuse.(*DeviceFD).writeLocked

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
Read at 0x00c00090a0f0 by goroutine 261:
  gvisor.dev/gvisor/pkg/sentry/fsimpl/fuse.(*DeviceFD).writeLocked()
      pkg/sentry/fsimpl/fuse/dev.go:253 +0x66
  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 write at 0x00c00090a0f0 by goroutine 302:
  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 (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/30 13:35 gvisor 2a3d59997fb9 495e00c5 .config console log report syz C ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/03 00:04 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 22:26 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 20:59 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 20:54 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 20:30 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 20:23 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 19:07 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 15:05 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 14:34 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 14:31 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 13:00 gvisor bcba5136d0d0 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 09:42 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 08:51 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 01:19 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/02 00:27 gvisor 5a642df6b326 4ebb2798 .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 20:06 gvisor 0f8db423e270 c1c1631d .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 18:26 gvisor 0f8db423e270 c1c1631d .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 15:32 gvisor 0f8db423e270 c1c1631d .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 06:36 gvisor 5ef032d4df28 6b7c57fe .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 03:07 gvisor 5ef032d4df28 6b7c57fe .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/02/01 02:56 gvisor 5ef032d4df28 6b7c57fe .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 23:01 gvisor 5ef032d4df28 6b7c57fe .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 22:22 gvisor 5ef032d4df28 6b7c57fe .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 18:41 gvisor 2a3d59997fb9 a491ad2d .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 16:03 gvisor 2a3d59997fb9 a491ad2d .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 15:44 gvisor 2a3d59997fb9 a491ad2d .config console log report info ci-gvisor-ptrace-2-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 09:13 gvisor 2a3d59997fb9 a491ad2d .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/31 03:46 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/30 12:45 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/30 05:21 gvisor 2a3d59997fb9 495e00c5 .config console log report info ci-gvisor-ptrace-3-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/29 05:26 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
2022/01/29 00:34 gvisor e98016263b1e 495e00c5 .config console log report info ci-gvisor-ptrace-1-race DATA RACE in fuse.(*DeviceFD).writeLocked
* Struck through repros no longer work on HEAD.