WARNING: DATA RACE Write at 0x00c00c21cfc8 by goroutine 2253: 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/stack.(*nic).DeliverNetworkPacket.func1() pkg/tcpip/stack/nic.go:754 +0x257 gvisor.dev/gvisor/pkg/tcpip/stack.(*packetEndpointList).forEach() pkg/tcpip/stack/nic.go:133 +0xf5 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket() pkg/tcpip/stack/nic.go:781 +0x477 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/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).sendRaw() pkg/tcpip/transport/tcp/connect.go:948 +0x331 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegmentFromView() pkg/tcpip/transport/tcp/snd.go:1668 +0x224 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendAck() pkg/tcpip/transport/tcp/snd.go:340 +0x2bd gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*receiver).consumeSegment() pkg/tcpip/transport/tcp/rcv.go:251 +0x237 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*receiver).handleRcvdSegment() pkg/tcpip/transport/tcp/rcv.go:472 +0x233 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleSegmentLocked() pkg/tcpip/transport/tcp/connect.go:1223 +0x2e9 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleSegmentsLocked() pkg/tcpip/transport/tcp/connect.go:1144 +0xd3 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleWakeup() pkg/tcpip/transport/tcp/connect.go:1351 +0xaa5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).protocolMainLoop() pkg/tcpip/transport/tcp/connect.go:1572 +0x53c Previous read at 0x00c00c21cfc8 by goroutine 2367: gvisor.dev/gvisor/pkg/tcpip/stack.(*PacketBuffer).Clone() pkg/tcpip/stack/packet_buffer.go:327 +0x93 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket.func1() pkg/tcpip/stack/nic.go:765 +0xca gvisor.dev/gvisor/pkg/tcpip/stack.(*packetEndpointList).forEach() pkg/tcpip/stack/nic.go:133 +0xf5 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket() pkg/tcpip/stack/nic.go:781 +0x477 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/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).sendRaw() pkg/tcpip/transport/tcp/connect.go:948 +0x331 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegmentFromView() pkg/tcpip/transport/tcp/snd.go:1668 +0x224 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendAck() pkg/tcpip/transport/tcp/snd.go:340 +0x2bd gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*receiver).consumeSegment() pkg/tcpip/transport/tcp/rcv.go:251 +0x237 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*receiver).handleRcvdSegment() pkg/tcpip/transport/tcp/rcv.go:472 +0x233 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleSegmentLocked() pkg/tcpip/transport/tcp/connect.go:1223 +0x2e9 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleSegmentsLocked() pkg/tcpip/transport/tcp/connect.go:1144 +0xd3 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).handleWakeup() pkg/tcpip/transport/tcp/connect.go:1351 +0xaa5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).protocolMainLoop() pkg/tcpip/transport/tcp/connect.go:1572 +0x53c