syzbot


DATA RACE in fs.mayDelete

Status: fixed on 2020/02/27 21:02
Reported-by: syzbot+bb249a678f8bd9704e38@syzkaller.appspotmail.com
Fix commit: fba479b3c786 Fix DATA RACE in fs.MayDelete.
First crash: 1763d, last: 1763d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0014b0698 by goroutine 493:
  gvisor.dev/gvisor/pkg/sentry/fs.mayDelete()
      pkg/sentry/fs/dirent.go:248 +0x81
DIAGNOSIS:
I0129 13:53:47.058017   25127 log.go:209] ***************************
I0129 13:53:47.058135   25127 log.go:209] 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-1]
I0129 13:53:47.058338   25127 log.go:209] Version release-20200127.0-27-g4cb55a7a3b09
I0129 13:53:47.058410   25127 log.go:209] PID: 25127
I0129 13:53:47.058467   25127 log.go:209] UID: 0, GID: 0
I0129 13:53:47.058531   25127 log.go:209] Configuration:
I0129 13:53:47.058582   25127 log.go:209] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I0129 13:53:47.058685   25127 log.go:209] 		Platform: ptrace
I0129 13:53:47.058754   25127 log.go:209] 		FileAccess: shared, overlay: false
I0129 13:53:47.058833   25127 log.go:209] 		Network: sandbox, logging: false
I0129 13:53:47.058904   25127 log.go:209] 		Strace: false, max size: 1024, syscalls: []
I0129 13:53:47.058967   25127 log.go:209] ***************************
W0129 13:53:47.059021   25127 log.go:216] Block the TERM signal. This is only safe in tests!
D0129 13:53:47.059264   25127 log.go:202] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.067970   25127 log.go:202] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-1": signal 0
D0129 13:53:47.068228   25127 log.go:202] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.068396   25127 log.go:202] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.069013   25127 log.go:202] urpc: successfully marshalled 117 bytes.
W0129 13:53:47.401735   25127 log.go:216] FATAL ERROR: container sandbox is not running
container sandbox is not running
W0129 13:53:47.402015   25127 log.go:216] 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-1"]: exit status 128
I0129 13:53:47.058017   25127 log.go:209] ***************************
I0129 13:53:47.058135   25127 log.go:209] 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-1]
I0129 13:53:47.058338   25127 log.go:209] Version release-20200127.0-27-g4cb55a7a3b09
I0129 13:53:47.058410   25127 log.go:209] PID: 25127
I0129 13:53:47.058467   25127 log.go:209] UID: 0, GID: 0
I0129 13:53:47.058531   25127 log.go:209] Configuration:
I0129 13:53:47.058582   25127 log.go:209] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I0129 13:53:47.058685   25127 log.go:209] 		Platform: ptrace
I0129 13:53:47.058754   25127 log.go:209] 		FileAccess: shared, overlay: false
I0129 13:53:47.058833   25127 log.go:209] 		Network: sandbox, logging: false
I0129 13:53:47.058904   25127 log.go:209] 		Strace: false, max size: 1024, syscalls: []
I0129 13:53:47.058967   25127 log.go:209] ***************************
W0129 13:53:47.059021   25127 log.go:216] Block the TERM signal. This is only safe in tests!
D0129 13:53:47.059264   25127 log.go:202] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.067970   25127 log.go:202] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-1": signal 0
D0129 13:53:47.068228   25127 log.go:202] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.068396   25127 log.go:202] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-1"
D0129 13:53:47.069013   25127 log.go:202] urpc: successfully marshalled 117 bytes.
W0129 13:53:47.401735   25127 log.go:216] FATAL ERROR: container sandbox is not running
container sandbox is not running
W0129 13:53:47.402015   25127 log.go:216] Failure to execute command, err: 1
  gvisor.dev/gvisor/pkg/sentry/fs.MayDelete()
      pkg/sentry/fs/dirent.go:1483 +0x184
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.unlinkAt.func1()
      pkg/sentry/syscalls/linux/sys_file.go:1494 +0x136
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.fileOpAt()
      pkg/sentry/syscalls/linux/sys_file.go:50 +0x218
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.unlinkAt()
      pkg/sentry/syscalls/linux/sys_file.go:1489 +0xf7
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.Unlink()
      pkg/sentry/syscalls/linux/sys_file.go:1505 +0x4e
  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:232 +0x1aaf
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x308

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/29 13:54 https://gvisor.googlesource.com/gvisor master 4cb55a7a3b09 c8e81ce4 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.