panic: Incrementing non-positive count 0xc0008d2a80 on stack.PacketBuffer goroutine 356 [running]: panic(0x10fc920, 0xc000408e20) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc0002bd3f0 sp=0xc0002bd328 pc=0x437c65 gvisor.dev/gvisor/pkg/tcpip/stack.(*packetBufferRefs).IncRef(0xc0008d2a80) bazel-out/k8-fastbuild-ST-3ea255117c10/bin/pkg/tcpip/stack/packet_buffer_refs.go:80 +0x15f fp=0xc0002bd468 sp=0xc0002bd3f0 pc=0x96a43f gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).HandlePacket(0xc00003ac00, 0x4e21, 0xc000254150, 0x10, 0x4e21, 0xc000254140, 0x10, 0xc0008d2a80) pkg/tcpip/transport/udp/endpoint.go:924 +0x388 fp=0xc0002c0630 sp=0xc0002bd468 pc=0xb6d268 gvisor.dev/gvisor/pkg/tcpip/stack.(*endpointsByNIC).handlePacket(0xc0005e2180, 0x4e21, 0xc000254150, 0x10, 0x4e21, 0xc000254140, 0x10, 0xc0008d2a80, 0xc000254150) pkg/tcpip/stack/transport_demuxer.go:185 +0x273 fp=0xc0002c06b8 sp=0xc0002c0630 pc=0x979b73 gvisor.dev/gvisor/pkg/tcpip/stack.(*transportDemuxer).deliverPacket(0xc000373f08, 0xc000000011, 0xc0008d2a80, 0x4e21, 0xc000254150, 0x10, 0x4e21, 0xc000254140, 0x10, 0xc0002c07c0) pkg/tcpip/stack/transport_demuxer.go:595 +0x450 fp=0xc0002c0758 sp=0xc0002c06b8 pc=0x97c5d0 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc00000a3c0, 0xc000000011, 0xc0008d2a80, 0x0) pkg/tcpip/stack/nic.go:859 +0x288 fp=0xc0002c0860 sp=0xc0002c0758 pc=0x965728 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).processExtensionHeaders(0xc0009b0000, 0xc0001300ce, 0x30, 0x30, 0xc0008d3180, 0x14b5100, 0xc0009b4100, 0x30) pkg/tcpip/network/ipv6/ipv6.go:1483 +0x1942 fp=0xc0002c11e8 sp=0xc0002c0860 pc=0xb55a22 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleValidatedPacket(0xc0009b0000, 0xc0001300ce, 0x30, 0x30, 0xc0008d3180, 0x13150ca, 0x2) pkg/tcpip/network/ipv6/ipv6.go:1115 +0x2f9 fp=0xc0002c1448 sp=0xc0002c11e8 pc=0xb53c59 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).HandlePacket(0xc0009b0000, 0xc0008d3180) pkg/tcpip/network/ipv6/ipv6.go:1030 +0x169 fp=0xc0002c16a8 sp=0xc0002c1448 pc=0xb53269 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc00000a3c0, 0xc0002540b0, 0x6, 0xc0002540b6, 0x6, 0xc0000086dd, 0xc0008d3180) pkg/tcpip/stack/nic.go:775 +0x2d8 fp=0xc0002c1760 sp=0xc0002c16a8 pc=0x9650f8 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc00019a640, 0xc0002540b0, 0x6, 0xc0002540b6, 0x6, 0x86dd, 0xc0008d3180) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc0002c17b8 sp=0xc0002c1760 pc=0xbe845e gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).DeliverNetworkPacket(0xc00019a640, 0x0, 0x0, 0x0, 0x0, 0x86dd, 0xc0008d3180) pkg/tcpip/link/ethernet/ethernet.go:71 +0x15f fp=0xc0002c1828 sp=0xc0002c17b8 pc=0xe98aff gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WriteRawPacket(0xc0001e7560, 0xc0008d2e00, 0x0, 0x0) pkg/tcpip/link/loopback/loopback.go:109 +0xfd fp=0xc0002c1898 sp=0xc0002c1828 pc=0xe9945d gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePackets(0xc0001e7560, 0xc0008d2e00, 0xc0008d2e00, 0x0, 0x0, 0x86dd) pkg/tcpip/link/loopback/loopback.go:81 +0x65 fp=0xc0002c18d8 sp=0xc0002c1898 pc=0xe992c5 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePackets(...) pkg/tcpip/link/nested/nested.go:107 gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePackets(0xc00019a640, 0xc0008d2e00, 0xc0008d2e00, 0x0, 0xc00000a560, 0x1360738) pkg/tcpip/link/ethernet/ethernet.go:91 +0xe2 fp=0xc0002c1938 sp=0xc0002c18d8 pc=0xe98cc2 gvisor.dev/gvisor/pkg/tcpip/stack.(*delegatingQueueingDiscipline).WritePacket(0xc0001e7570, 0xc0008d2e00, 0x0, 0xc0008d2e00) pkg/tcpip/stack/nic.go:152 +0x6c fp=0xc0002c1978 sp=0xc0002c1938 pc=0x961d4c gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc00000a3c0, 0xc0008d2e00, 0xc000254010, 0x10) pkg/tcpip/stack/nic.go:392 +0x94 fp=0xc0002c19b8 sp=0xc0002c1978 pc=0x9633d4 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc00000a3c0, 0xc0002363c0, 0xc0008d2e00, 0x0, 0x0) pkg/tcpip/stack/nic.go:355 +0x209 fp=0xc0002c1af8 sp=0xc0002c19b8 pc=0x9631a9 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).writePacket.func1(0xc0008d2e00, 0xc00013004e, 0x28) pkg/tcpip/network/ipv6/ipv6.go:819 +0x48 fp=0xc0002c1b30 sp=0xc0002c1af8 pc=0xb64a68 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).handleFragments(0xc0009b0000, 0xc0002363c0, 0xc00000ffca, 0xc0008d2380, 0x11, 0xc0002c1cc0, 0x2, 0x1, 0xc000408b60, 0x2) pkg/tcpip/network/ipv6/ipv6.go:733 +0x206 fp=0xc0002c1c68 sp=0xc0002c1b30 pc=0xb51866 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).writePacket(0xc0009b0000, 0xc0002363c0, 0xc0008d2380, 0x11, 0x10, 0x4000000001) pkg/tcpip/network/ipv6/ipv6.go:814 +0x245 fp=0xc0002c1e98 sp=0xc0002c1c68 pc=0xb52005 gvisor.dev/gvisor/pkg/tcpip/network/ipv6.(*endpoint).WritePacket(0xc0009b0000, 0xc0002363c0, 0x4000000011, 0xc0008d2380, 0x9674cd, 0x14a7148) pkg/tcpip/network/ipv6/ipv6.go:777 +0x285 fp=0xc0002c1f38 sp=0xc0002c1e98 pc=0xb51ca5 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc0002363c0, 0x4000000011, 0xc0008d2380, 0xc0008ce068, 0xc0008d2380) pkg/tcpip/stack/route.go:465 +0xad fp=0xc0002c1f78 sp=0xc0002c1f38 pc=0x96dc0d gvisor.dev/gvisor/pkg/tcpip/transport/internal/network.(*WriteContext).WritePacket(0xc0008ce0e0, 0xc0008d2380, 0x0, 0xc0008ce050, 0x8) pkg/tcpip/transport/internal/network/endpoint.go:262 +0xb0 fp=0xc0002c1fb0 sp=0xc0002c1f78 pc=0xaf3850 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).write(0xc00003ac00, 0x1498528, 0xc0006220a0, 0xc00060c040, 0x0, 0x0, 0x0, 0x0) pkg/tcpip/transport/udp/endpoint.go:469 +0x435 fp=0xc0002c3560 sp=0xc0002c1fb0 pc=0xb6aef5 gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).Write(0xc00003ac00, 0x1498528, 0xc0006220a0, 0xc00060c040, 0xc000000000, 0x10, 0x4e21, 0x9f000a) pkg/tcpip/transport/udp/endpoint.go:334 +0x68 fp=0xc0002c35b0 sp=0xc0002c3560 pc=0xb6a008 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).SendMsg(0xc0003e4690, 0xc00044f500, 0x14b2220, 0xc000883000, 0xc0001be000, 0x8, 0x0, 0xfff1, 0x100, 0xc000580440, ...) pkg/sentry/socket/netstack/netstack.go:3051 +0x206 fp=0xc0002c3710 sp=0xc0002c35b0 pc=0xb85606 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.sendSingleMsg(0xc00044f500, 0x7ff16f8c7358, 0xc0003e4620, 0xc0003e4620, 0x20000040, 0x0, 0x0, 0x0, 0x0) pkg/sentry/syscalls/linux/vfs2/socket.go:1112 +0x4d5 fp=0xc0002c3a70 sp=0xc0002c3710 pc=0xe76175 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.SendMsg(0xc00044f500, 0x3, 0x20000040, 0x0, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/socket.go:986 +0x225 fp=0xc0002c3b10 sp=0xc0002c3a70 pc=0xe75465 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc00044f500, 0x2e, 0x3, 0x20000040, 0x0, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40, 0x0, 0x13101c0, ...) pkg/sentry/kernel/task_syscall.go:103 +0x13c fp=0xc0002c3c70 sp=0xc0002c3b10 pc=0x9f181c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc00044f500, 0x2e, 0x3, 0x20000040, 0x0, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40) pkg/sentry/kernel/task_syscall.go:238 +0x66 fp=0xc0002c3cf8 sp=0xc0002c3c70 pc=0x9f29c6 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00044f500, 0x2e, 0x3, 0x20000040, 0x0, 0x563bbce98e40, 0x563bbce98e40, 0x563bbce98e40, 0x14c9008, 0xc00041b200) pkg/sentry/kernel/task_syscall.go:198 +0x98 fp=0xc0002c3d58 sp=0xc0002c3cf8 pc=0x9f25b8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc00044f500, 0x2, 0xc00044f500) pkg/sentry/kernel/task_syscall.go:173 +0x15c fp=0xc0002c3e28 sp=0xc0002c3d58 pc=0x9f1f5c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc00044f500, 0x148a760, 0x0) pkg/sentry/kernel/task_run.go:254 +0xc27 fp=0xc0002c3f68 sp=0xc0002c3e28 pc=0x9e6ce7 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc00044f500, 0x10) pkg/sentry/kernel/task_run.go:95 +0x182 fp=0xc0002c3fd0 sp=0xc0002c3f68 pc=0x9e5c22 runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0002c3fd8 sp=0xc0002c3fd0 pc=0x472861 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:342 +0xfe