syzbot


DATA RACE in fsutil.(*InodeSimpleAttributes).SetPermissions

Status: fixed on 2019/12/20 13:42
Fix commit: bb00438f36eb Make masterInodeOperations.Truncate take a pointer receiver.
First crash: 1803d, last: 1803d

Sample crash report:
WARNING: DATA RACE
Write at 0x00c000254180 by goroutine 219:
  gvisor.dev/gvisor/pkg/sentry/fs/fsutil.(*InodeSimpleAttributes).SetPermissions()
      pkg/sentry/fs/attr.go:266 +0x74
  gvisor.dev/gvisor/pkg/sentry/fs/tty.(*masterInodeOperations).SetPermissions()
      <autogenerated>:1 +0x90
  gvisor.dev/gvisor/pkg/sentry/fs.(*Inode).SetPermissions()
      pkg/sentry/fs/inode.go:334 +0x15f
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.chmod()
      pkg/sentry/syscalls/linux/sys_file.go:1769 +0x105
DIAGNOSIS:
I1219 21:10:29.037174   20961 x:0] ***************************
I1219 21:10:29.037266   20961 x:0] Args: [/syzkaller/managers/ptrace-proxy-sandbox-race/current/image -root /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root -watchdog-action=panic -network=none -debug -alsologtostderr -platform=ptrace -file-access=shared -network=sandbox -TESTONLY-unsafe-nonroot debug -stacks --ps ci-gvisor-ptrace-proxy-sandbox-race-2]
I1219 21:10:29.037440   20961 x:0] Version release-20191213.0-32-g57ce26c0b465
I1219 21:10:29.037479   20961 x:0] PID: 20961
I1219 21:10:29.037541   20961 x:0] UID: 0, GID: 0
I1219 21:10:29.037581   20961 x:0] Configuration:
I1219 21:10:29.037633   20961 x:0] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I1219 21:10:29.037661   20961 x:0] 		Platform: ptrace
I1219 21:10:29.037715   20961 x:0] 		FileAccess: shared, overlay: false
I1219 21:10:29.037755   20961 x:0] 		Network: sandbox, logging: false
I1219 21:10:29.037810   20961 x:0] 		Strace: false, max size: 1024, syscalls: []
I1219 21:10:29.037865   20961 x:0] ***************************
W1219 21:10:29.037927   20961 x:0] Block the TERM signal. This is only safe in tests!
D1219 21:10:29.038075   20961 x:0] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.045647   20961 x:0] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-2": signal 0
D1219 21:10:29.045762   20961 x:0] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.045848   20961 x:0] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.046248   20961 x:0] urpc: successfully marshalled 117 bytes.
W1219 21:10:29.144838   20961 x:0] FATAL ERROR: container sandbox is not running
container sandbox is not running
W1219 21:10:29.145140   20961 x:0] Failure to execute command, err: 1


Error collecting stacks: failed to run ["/syzkaller/managers/ptrace-proxy-sandbox-race/current/image" "-root" "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "-watchdog-action=panic" "-network=none" "-debug" "-alsologtostderr" "-platform=ptrace" "-file-access=shared" "-network=sandbox" "-TESTONLY-unsafe-nonroot" "debug" "-stacks" "--ps" "ci-gvisor-ptrace-proxy-sandbox-race-2"]: exit status 128
I1219 21:10:29.037174   20961 x:0] ***************************
I1219 21:10:29.037266   20961 x:0] Args: [/syzkaller/managers/ptrace-proxy-sandbox-race/current/image -root /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root -watchdog-action=panic -network=none -debug -alsologtostderr -platform=ptrace -file-access=shared -network=sandbox -TESTONLY-unsafe-nonroot debug -stacks --ps ci-gvisor-ptrace-proxy-sandbox-race-2]
I1219 21:10:29.037440   20961 x:0] Version release-20191213.0-32-g57ce26c0b465
I1219 21:10:29.037479   20961 x:0] PID: 20961
I1219 21:10:29.037541   20961 x:0] UID: 0, GID: 0
I1219 21:10:29.037581   20961 x:0] Configuration:
I1219 21:10:29.037633   20961 x:0] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I1219 21:10:29.037661   20961 x:0] 		Platform: ptrace
I1219 21:10:29.037715   20961 x:0] 		FileAccess: shared, overlay: false
I1219 21:10:29.037755   20961 x:0] 		Network: sandbox, logging: false
I1219 21:10:29.037810   20961 x:0] 		Strace: false, max size: 1024, syscalls: []
I1219 21:10:29.037865   20961 x:0] ***************************
W1219 21:10:29.037927   20961 x:0] Block the TERM signal. This is only safe in tests!
D1219 21:10:29.038075   20961 x:0] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.045647   20961 x:0] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-2": signal 0
D1219 21:10:29.045762   20961 x:0] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.045848   20961 x:0] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D1219 21:10:29.046248   20961 x:0] urpc: successfully marshalled 117 bytes.
W1219 21:10:29.144838   20961 x:0] FATAL ERROR: container sandbox is not running
container sandbox is not running
W1219 21:10:29.145140   20961 x:0] Failure to execute command, err: 1
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Fchmod()
      pkg/sentry/syscalls/linux/sys_file.go:1809 +0x127
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall()
      pkg/sentry/kernel/task_syscall.go:170 +0x455
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke()
      pkg/sentry/kernel/task_syscall.go:291 +0xb4
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter()
      pkg/sentry/kernel/task_syscall.go:252 +0x109
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall()
      pkg/sentry/kernel/task_syscall.go:227 +0x1b3
  gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute()
      pkg/sentry/kernel/task_run.go:222 +0x1819
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x308

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/19 21:13 https://gvisor.googlesource.com/gvisor master 57ce26c0b465 36650b4b .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2019/12/19 21:03 https://gvisor.googlesource.com/gvisor master 57ce26c0b465 36650b4b .config console log report syz ci-gvisor-ptrace-direct-overlay-host-race
2019/12/19 20:02 https://gvisor.googlesource.com/gvisor master 57ce26c0b465 36650b4b .config console log report ci-gvisor-ptrace-direct-overlay-host-race
* Struck through repros no longer work on HEAD.