syzbot


DATA RACE in tcp.(*endpoint).windowCrossedACKThreshold

Status: fixed on 2020/03/10 21:06
Fix commit: 33101752501f Fix data-race when reading/writing e.amss.
First crash: 1734d, last: 1733d

Sample crash report:
WARNING: DATA RACE
Read at 0x00c0006e4470 by goroutine 367:
  gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).windowCrossedACKThreshold()
      pkg/tcpip/transport/tcp/endpoint.go:1312 +0x9e
  gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).SetSockOptInt()
      pkg/tcpip/transport/tcp/endpoint.go:1394 +0x408
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.setSockOptSocket()
      pkg/sentry/socket/netstack/netstack.go:1575 +0x84c
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.SetSockOpt()
      pkg/sentry/socket/netstack/netstack.go:1535 +0x1ad
  gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketOperations).SetSockOpt()
      pkg/sentry/socket/netstack/netstack.go:1527 +0x69d
  gvisor.dev/gvisor/pkg/sentry/syscalls/linux.SetSockOpt()
      pkg/sentry/syscalls/linux/sys_socket.go:541 +0x303
  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
DIAGNOSIS:
I0228 08:20:36.350933   56812 main.go:296] ***************************
I0228 08:20:36.351100   56812 main.go:297] 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]
I0228 08:20:36.351281   56812 main.go:298] Version release-20200219.0-52-gabf7ebcd38e8
I0228 08:20:36.351363   56812 main.go:299] PID: 56812
I0228 08:20:36.351439   56812 main.go:300] UID: 0, GID: 0
I0228 08:20:36.351528   56812 main.go:301] Configuration:
I0228 08:20:36.351621   56812 main.go:302] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I0228 08:20:36.351719   56812 main.go:303] 		Platform: ptrace
I0228 08:20:36.351811   56812 main.go:304] 		FileAccess: shared, overlay: false
I0228 08:20:36.351920   56812 main.go:305] 		Network: sandbox, logging: false
I0228 08:20:36.352035   56812 main.go:306] 		Strace: false, max size: 1024, syscalls: []
I0228 08:20:36.352141   56812 main.go:307] ***************************
W0228 08:20:36.352219   56812 main.go:312] Block the TERM signal. This is only safe in tests!
D0228 08:20:36.352392   56812 container.go:158] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.358817   56812 container.go:591] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-2": signal 0
D0228 08:20:36.359011   56812 sandbox.go:788] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.359116   56812 sandbox.go:318] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.359576   56812 urpc.go:534] urpc: successfully marshalled 117 bytes.
I0228 08:20:36.437244   56812 debug.go:122] Found sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2", PID: 44410
I0228 08:20:36.437397   56812 debug.go:131] Retrieving sandbox stacks
D0228 08:20:36.437510   56812 sandbox.go:906] Stacks sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.437628   56812 sandbox.go:318] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
W0228 08:20:36.437900   56812 error.go:48] FATAL ERROR: retrieving stacks: connecting to control server at PID 44410: connection refused
retrieving stacks: connecting to control server at PID 44410: connection refused
W0228 08:20:36.438288   56812 main.go:329] 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
I0228 08:20:36.350933   56812 main.go:296] ***************************
I0228 08:20:36.351100   56812 main.go:297] 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]
I0228 08:20:36.351281   56812 main.go:298] Version release-20200219.0-52-gabf7ebcd38e8
I0228 08:20:36.351363   56812 main.go:299] PID: 56812
I0228 08:20:36.351439   56812 main.go:300] UID: 0, GID: 0
I0228 08:20:36.351528   56812 main.go:301] Configuration:
I0228 08:20:36.351621   56812 main.go:302] 		RootDir: /syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root
I0228 08:20:36.351719   56812 main.go:303] 		Platform: ptrace
I0228 08:20:36.351811   56812 main.go:304] 		FileAccess: shared, overlay: false
I0228 08:20:36.351920   56812 main.go:305] 		Network: sandbox, logging: false
I0228 08:20:36.352035   56812 main.go:306] 		Strace: false, max size: 1024, syscalls: []
I0228 08:20:36.352141   56812 main.go:307] ***************************
W0228 08:20:36.352219   56812 main.go:312] Block the TERM signal. This is only safe in tests!
D0228 08:20:36.352392   56812 container.go:158] Load container "/syzkaller/managers/ptrace-proxy-sandbox-race/workdir/gvisor_root" "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.358817   56812 container.go:591] Signal container "ci-gvisor-ptrace-proxy-sandbox-race-2": signal 0
D0228 08:20:36.359011   56812 sandbox.go:788] Signal sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.359116   56812 sandbox.go:318] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.359576   56812 urpc.go:534] urpc: successfully marshalled 117 bytes.
I0228 08:20:36.437244   56812 debug.go:122] Found sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2", PID: 44410
I0228 08:20:36.437397   56812 debug.go:131] Retrieving sandbox stacks
D0228 08:20:36.437510   56812 sandbox.go:906] Stacks sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
D0228 08:20:36.437628   56812 sandbox.go:318] Connecting to sandbox "ci-gvisor-ptrace-proxy-sandbox-race-2"
W0228 08:20:36.437900   56812 error.go:48] FATAL ERROR: retrieving stacks: connecting to control server at PID 44410: connection refused
retrieving stacks: connecting to control server at PID 44410: connection refused
W0228 08:20:36.438288   56812 main.go:329] Failure to execute command, err: 1
  gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run()
      pkg/sentry/kernel/task_run.go:92 +0x308

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/28 08:22 gvisor abf7ebcd38e8 c88c7b75 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/02/28 08:03 gvisor abf7ebcd38e8 c88c7b75 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 11:40 gvisor de0b2ebf8635 40bcfdd5 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 11:31 gvisor de0b2ebf8635 40bcfdd5 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 11:22 gvisor de0b2ebf8635 40bcfdd5 .config console log report syz ci-gvisor-ptrace-proxy-sandbox-race
2020/02/28 08:12 gvisor abf7ebcd38e8 c88c7b75 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/02/28 07:54 gvisor abf7ebcd38e8 c88c7b75 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 10:52 gvisor de0b2ebf8635 40bcfdd5 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 10:51 gvisor de0b2ebf8635 40bcfdd5 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
2020/02/27 10:38 gvisor de0b2ebf8635 40bcfdd5 .config console log report ci-gvisor-ptrace-proxy-sandbox-race
* Struck through repros no longer work on HEAD.