WARNING: DATA RACE Write at 0x00c1165aca28 by goroutine 2711: gvisor.dev/gvisor/pkg/tcpip/stack.(*PacketBuffer).reset() pkg/tcpip/stack/packet_buffer.go:201 +0x78 gvisor.dev/gvisor/pkg/tcpip/stack.NewPacketBuffer() pkg/tcpip/stack/packet_buffer.go:167 +0x66 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WriteRawPacket() pkg/tcpip/link/loopback/loopback.go:104 +0x132 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket() pkg/tcpip/link/loopback/loopback.go:80 +0x45 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:107 +0x1cc gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePacket() pkg/tcpip/link/ethernet/ethernet.go:78 +0xd6 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:107 +0x16c gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket() pkg/tcpip/link/sniffer/sniffer.go:169 +0x77 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket() pkg/tcpip/stack/nic.go:382 +0x28c gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer() pkg/tcpip/stack/nic.go:326 +0x111 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer() pkg/tcpip/stack/nic.go:341 +0x2dc gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket() pkg/tcpip/stack/nic.go:319 +0x64 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket() pkg/tcpip/network/ipv4/ipv4.go:503 +0x58f gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket() pkg/tcpip/network/ipv4/ipv4.go:453 +0x2bd gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket() pkg/tcpip/stack/route.go:462 +0x11b gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP() pkg/tcpip/transport/tcp/connect.go:891 +0x430 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP() pkg/tcpip/transport/tcp/connect.go:781 +0x17e gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendSynTCP() pkg/tcpip/transport/tcp/connect.go:772 +0x147 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*handshake).start() pkg/tcpip/transport/tcp/connect.go:509 +0x6f4 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).connect() pkg/tcpip/transport/tcp/endpoint.go:2356 +0xe35 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Connect() pkg/tcpip/transport/tcp/endpoint.go:2089 +0x8e gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Connect() pkg/sentry/socket/netstack/netstack.go:622 +0x452 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).Connect() :1 +0x84 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Connect() pkg/sentry/syscalls/linux/vfs2/socket.go:275 +0x258 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() pkg/sentry/kernel/task_syscall.go:103 +0x452 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:282 +0x12c6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run() pkg/sentry/kernel/task_run.go:97 +0x352 Previous read at 0x00c1165aca28 by goroutine 2898: gvisor.dev/gvisor/pkg/tcpip/stack.(*PacketBuffer).Clone() pkg/tcpip/stack/packet_buffer.go:327 +0x93 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).deliverOutboundPacket.func1() pkg/tcpip/stack/nic.go:824 +0xd8 gvisor.dev/gvisor/pkg/tcpip/stack.(*packetEndpointList).forEach() pkg/tcpip/stack/nic.go:133 +0xf5 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).deliverOutboundPacket() pkg/tcpip/stack/nic.go:802 +0x214 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket() pkg/tcpip/stack/nic.go:380 +0x1c6 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer() pkg/tcpip/stack/nic.go:326 +0x111 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer() pkg/tcpip/stack/nic.go:341 +0x2dc gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket() pkg/tcpip/stack/nic.go:319 +0x64 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket() pkg/tcpip/network/ipv4/ipv4.go:503 +0x58f gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket() pkg/tcpip/network/ipv4/ipv4.go:453 +0x2bd gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket() pkg/tcpip/stack/route.go:462 +0x11b gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*protocol).returnError() pkg/tcpip/network/ipv4/icmp.go:681 +0xf87 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket() pkg/tcpip/network/ipv4/ipv4.go:1076 +0x7fe gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket() pkg/tcpip/network/ipv4/ipv4.go:854 +0x1e9 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket() pkg/tcpip/stack/nic.go:784 +0x444 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:140 +0xa4 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket() pkg/tcpip/link/nested/nested.go:59 +0xef gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).DeliverNetworkPacket() pkg/tcpip/link/ethernet/ethernet.go:63 +0x224 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WriteRawPacket() pkg/tcpip/link/loopback/loopback.go:108 +0x1f5 gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket() pkg/tcpip/link/loopback/loopback.go:80 +0x45 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:107 +0x1cc gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePacket() pkg/tcpip/link/ethernet/ethernet.go:78 +0xd6 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket() pkg/tcpip/link/nested/nested.go:107 +0x16c gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket() pkg/tcpip/link/sniffer/sniffer.go:169 +0x77 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket() pkg/tcpip/stack/nic.go:382 +0x28c gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer() pkg/tcpip/stack/nic.go:326 +0x111 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer() pkg/tcpip/stack/nic.go:341 +0x2dc gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket() pkg/tcpip/stack/nic.go:319 +0x64 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket() pkg/tcpip/network/ipv4/ipv4.go:503 +0x58f gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket() pkg/tcpip/network/ipv4/ipv4.go:453 +0x2bd gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket() pkg/tcpip/stack/route.go:462 +0x11b gvisor.dev/gvisor/pkg/tcpip/transport/internal/network.(*WriteContext).WritePacket() pkg/tcpip/transport/internal/network/endpoint.go:248 +0x19a gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).write() pkg/tcpip/transport/udp/endpoint.go:467 +0x544 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).Write() pkg/tcpip/transport/udp/endpoint.go:332 +0x84 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).Write() pkg/sentry/socket/netstack/netstack_vfs2.go:132 +0x19c 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:345 +0xed gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Write() pkg/sentry/syscalls/linux/vfs2/read_write.go:314 +0x307 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() pkg/sentry/kernel/task_syscall.go:103 +0x452 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:282 +0x12c6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run() pkg/sentry/kernel/task_run.go:97 +0x352