WARNING: DATA RACE Write at 0x00c022db39e0 by goroutine 2173: runtime.slicecopy() GOROOT/src/runtime/slice.go:246 +0x0 gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).DeliverNetworkPacket() pkg/tcpip/stack/nic.go:639 +0x3c9 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket() pkg/tcpip/link/nested/nested.go:59 +0xef gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).DeliverNetworkPacket() pkg/tcpip/link/sniffer/sniffer.go:143 +0xae gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket() pkg/tcpip/link/loopback/loopback.go:89 +0x221 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:117 +0xb0 gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket() pkg/tcpip/link/sniffer/sniffer.go:192 +0x65 gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).writePacket() pkg/tcpip/stack/nic.go:292 +0xba gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).WritePacket() pkg/tcpip/stack/nic.go:276 +0x172 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket() pkg/tcpip/network/ipv4/ipv4.go:346 +0x201 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket() pkg/tcpip/network/ipv4/ipv4.go:309 +0x2d0 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket() pkg/tcpip/stack/route.go:389 +0x132 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP() pkg/tcpip/transport/tcp/connect.go:886 +0x4b0 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.replyWithReset() pkg/tcpip/transport/tcp/protocol.go:253 +0x3a4 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).tryDeliverSegmentFromClosedEndpoint() pkg/tcpip/transport/tcp/connect.go:1087 +0x304 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).drainClosingSegmentQueue() pkg/tcpip/transport/tcp/connect.go:1111 +0x3a gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*listenContext).cleanupFailedHandshake() pkg/tcpip/transport/tcp/accept.go:369 +0xcf gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleSynSegment.func1() pkg/tcpip/transport/tcp/accept.go:490 +0x1b8 Previous read at 0x00c022db39e0 by goroutine 1976: gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).DeliverNetworkPacket() pkg/tcpip/stack/nic.go:641 +0x424 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket() pkg/tcpip/link/nested/nested.go:59 +0xef gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).DeliverNetworkPacket() pkg/tcpip/link/sniffer/sniffer.go:143 +0xae gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket() pkg/tcpip/link/loopback/loopback.go:89 +0x221 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:117 +0xb0 gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket() pkg/tcpip/link/sniffer/sniffer.go:192 +0x65 gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).writePacket() pkg/tcpip/stack/nic.go:292 +0xba gvisor.dev/gvisor/pkg/tcpip/stack.(*NIC).WritePacket() pkg/tcpip/stack/nic.go:276 +0x172 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket() pkg/tcpip/network/ipv4/ipv4.go:346 +0x201 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket() pkg/tcpip/network/ipv4/ipv4.go:309 +0x2d0 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket() pkg/tcpip/stack/route.go:389 +0x132 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP() pkg/tcpip/transport/tcp/connect.go:886 +0x4b0 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP() pkg/tcpip/transport/tcp/connect.go:777 +0x14e gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendRaw() pkg/tcpip/transport/tcp/connect.go:943 +0x2f9 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegmentFromView() pkg/tcpip/transport/tcp/snd.go:1508 +0x1d3 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegment() pkg/tcpip/transport/tcp/snd.go:1476 +0x229 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).maybeSendSegment() pkg/tcpip/transport/tcp/snd.go:928 +0x6ac gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendData() pkg/tcpip/transport/tcp/snd.go:1022 +0x327 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleWrite() pkg/tcpip/transport/tcp/connect.go:978 +0xfc gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleClose() pkg/tcpip/transport/tcp/connect.go:988 +0x67 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).shutdownLocked() pkg/tcpip/transport/tcp/endpoint.go:2446 +0x358 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Close() pkg/tcpip/transport/tcp/endpoint.go:1065 +0xe7 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Release() pkg/sentry/socket/netstack/netstack.go:401 +0x269 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).Release() pkg/sentry/socket/netstack/netstack_vfs2.go:86 +0xd3 gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1() pkg/sentry/vfs/file_description.go:187 +0x2c6 gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef() bazel-out/k8-fastbuild-ST-85f86a41aebae9b44e06a227fc2c34bde1094098ba6d32170f99a32414da6482/bin/pkg/sentry/vfs/file_description_refs.go:128 +0x7c gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef() pkg/sentry/vfs/file_description.go:163 +0x76 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect() pkg/sentry/syscalls/linux/vfs2/socket.go:278 +0x2ca gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() pkg/sentry/kernel/task_syscall.go:104 +0x452 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() pkg/sentry/kernel/task_syscall.go:239 +0xb9 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() pkg/sentry/kernel/task_syscall.go:199 +0x10e gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall() pkg/sentry/kernel/task_syscall.go:174 +0x1e9 gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute() pkg/sentry/kernel/task_run.go:282 +0x12a6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run() pkg/sentry/kernel/task_run.go:97 +0x397