WARNING: DATA RACE Write at 0x00c009eceb48 by goroutine 2956: 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/transport/udp.(*endpoint).write() pkg/tcpip/transport/udp/endpoint.go:439 +0x31c gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).Write() pkg/tcpip/transport/udp/endpoint.go:332 +0x84 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).SendMsg() pkg/sentry/socket/netstack/netstack.go:2931 +0x2d3 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).SendMsg() :1 +0x19d gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendSingleMsg() pkg/sentry/syscalls/linux/vfs2/socket.go:1064 +0x594 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendMMsg() pkg/sentry/syscalls/linux/vfs2/socket.go:988 +0x324 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 0x00c009eceb48 by goroutine 2991: 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/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.(*socketOpsCommon).SendMsg() pkg/sentry/socket/netstack/netstack.go:2931 +0x2d3 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).SendMsg() :1 +0x19d gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendSingleMsg() pkg/sentry/syscalls/linux/vfs2/socket.go:1064 +0x594 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendMMsg() pkg/sentry/syscalls/linux/vfs2/socket.go:988 +0x324 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