panic: interface conversion: stack.TransportEndpoint is nil, not *tcp.endpoint goroutine 490161 [running]: panic(0x10ce620, 0xc00140f2f0) GOROOT/src/runtime/panic.go:1065 +0x565 fp=0xc08b64a290 sp=0xc08b64a1c8 pc=0x437c65 runtime.panicdottypeE(...) GOROOT/src/runtime/iface.go:261 runtime.panicdottypeI(0x0, 0x1264e80, 0x1104d80) GOROOT/src/runtime/iface.go:271 +0xcc fp=0xc08b64a2b8 sp=0xc08b64a290 pc=0x40b2ec gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*dispatcher).queuePacket(0xc0093e30c0, 0x0, 0x0, 0x0, 0xc0089c281c, 0x4, 0x0, 0x0, 0x4, 0x13e8758, ...) pkg/tcpip/transport/tcp/dispatcher.go:178 +0x3aa fp=0xc08b64ca20 sp=0xc08b64a2b8 pc=0xac49ea gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*protocol).QueuePacket(0x0, 0x0, 0xc003c1f800, 0x848d, 0xc0089c281c, 0x4, 0x2, 0xc0089c2818, 0x4, 0xc00b5ae200) pkg/tcpip/transport/tcp/protocol.go:138 +0x9b fp=0xc08b64ca90 sp=0xc08b64ca20 pc=0xad159b gvisor.dev/gvisor/pkg/tcpip/stack.(*endpointsByNIC).handlePacket(0xc0033c4d50, 0x848d, 0xc0089c281c, 0x4, 0x2, 0xc0089c2818, 0x4, 0xc00b5ae200, 0xc00ad7ab98) pkg/tcpip/stack/transport_demuxer.go:176 +0x20b fp=0xc08b64cb10 sp=0xc08b64ca90 pc=0x94a8ab gvisor.dev/gvisor/pkg/tcpip/stack.(*transportDemuxer).deliverPacket(0xc0043c55f0, 0xc000000006, 0xc00b5ae200, 0x848d, 0xc0089c281c, 0x4, 0x2, 0xc0089c2818, 0x4, 0xc0089c2814) pkg/tcpip/stack/transport_demuxer.go:581 +0x430 fp=0xc08b64cba8 sp=0xc08b64cb10 pc=0x94d2b0 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc000c3f880, 0x6, 0xc00b5ae200, 0x0) pkg/tcpip/stack/nic.go:820 +0x2e5 fp=0xc08b64ccb0 sp=0xc08b64cba8 pc=0x937525 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc0068e2e00, 0xc008a542d6, 0x14, 0x34, 0xc00b5ae200, 0x1266c5a, 0x2) pkg/tcpip/network/ipv4/ipv4.go:1046 +0x8ec fp=0xc08b64d478 sp=0xc08b64ccb0 pc=0xb03b2c gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc0068e2e00, 0xc00b5ae200) pkg/tcpip/network/ipv4/ipv4.go:836 +0x166 fp=0xc08b64d710 sp=0xc08b64d478 pc=0xb02c46 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc000c3f880, 0xc0089c27e8, 0x6, 0xc0089c27f0, 0x6, 0x3f1500000800, 0xc00b5ae200) pkg/tcpip/stack/nic.go:749 +0x288 fp=0xc08b64d7a0 sp=0xc08b64d710 pc=0x936f68 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc006c66380, 0xc0089c27e8, 0x6, 0xc0089c27f0, 0x6, 0x800, 0xc00b5ae200) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc08b64d7f8 sp=0xc08b64d7a0 pc=0xb9eabe gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).DeliverNetworkPacket(0xc006c66380, 0xc0089c27e8, 0x6, 0xc0089c27f0, 0x6, 0xc000000800, 0xc00b5ae200) pkg/tcpip/link/sniffer/sniffer.go:140 +0x94 fp=0xc08b64d840 sp=0xc08b64d7f8 pc=0xb9f894 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).DeliverNetworkPacket(0xc005a0f5e0, 0xc0089c27e8, 0x6, 0xc0089c27f0, 0x6, 0x800, 0xc00b5ae200) pkg/tcpip/link/nested/nested.go:59 +0xbe fp=0xc08b64d898 sp=0xc08b64d840 pc=0xb9eabe gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).DeliverNetworkPacket(0xc005a0f5e0, 0x0, 0x0, 0x0, 0x0, 0x800, 0xc00b5ae200) pkg/tcpip/link/ethernet/ethernet.go:63 +0x15f fp=0xc08b64d908 sp=0xc08b64d898 pc=0xe2707f gvisor.dev/gvisor/pkg/tcpip/link/loopback.(*endpoint).WritePacket(0xc0074413c0, 0xc005f27500, 0x4, 0xc005f27504, 0x4, 0x13b5798, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/loopback/loopback.go:89 +0xca fp=0xc08b64d960 sp=0xc08b64d908 pc=0xe27aaa gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket(...) pkg/tcpip/link/nested/nested.go:117 gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePacket(0xc005a0f5e0, 0xc005f27500, 0x4, 0xc005f27504, 0x4, 0x13b5798, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/ethernet/ethernet.go:78 +0x139 fp=0xc08b64da48 sp=0xc08b64d960 pc=0xe27299 gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePacket(...) pkg/tcpip/link/nested/nested.go:117 gvisor.dev/gvisor/pkg/tcpip/link/sniffer.(*endpoint).WritePacket(0xc006c66380, 0xc005f27500, 0x4, 0xc005f27504, 0x4, 0x13b5798, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/link/sniffer/sniffer.go:174 +0x10d fp=0xc08b64db30 sp=0xc08b64da48 pc=0xb9fc0d gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0xc000c3f880, 0xc005f27500, 0x4, 0xc005f27504, 0x4, 0x13b5798, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:368 +0xfe fp=0xc08b64dbc8 sp=0xc08b64db30 pc=0x934f5e gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacketBuffer(0xc000c3f880, 0xc005f27500, 0x4, 0xc005f27504, 0x4, 0x13b5798, 0x6, 0x0, 0x0, 0x100000800, ...) pkg/tcpip/stack/nic.go:314 +0xd0 fp=0xc08b64dc78 sp=0xc08b64dbc8 pc=0x934890 gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).enqueuePacketBuffer(0xc000c3f880, 0xc0043b4280, 0x800, 0x13cf640, 0xc00b5ae100, 0xc008a542ea, 0x20, 0x20) pkg/tcpip/stack/nic.go:329 +0x25d fp=0xc08b64ddc8 sp=0xc08b64dc78 pc=0x934cdd gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacket(0xc000c3f880, 0xc0043b4280, 0xc000000800, 0xc00b5ae100, 0x34, 0x0) pkg/tcpip/stack/nic.go:307 +0x53 fp=0xc08b64de18 sp=0xc08b64ddc8 pc=0x934793 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).writePacket(0xc0068e2e00, 0xc0043b4280, 0xc00b5ae100, 0xc0043b4200, 0x0, 0x0) pkg/tcpip/network/ipv4/ipv4.go:495 +0x375 fp=0xc08b64e050 sp=0xc08b64de18 pc=0xb00b95 gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).WritePacket(0xc0068e2e00, 0xc0043b4280, 0x848d004000000006, 0xc00b5ae100, 0xffff1120, 0xc008a542ea) pkg/tcpip/network/ipv4/ipv4.go:445 +0x179 fp=0xc08b64e0c0 sp=0xc08b64e050 pc=0xb006b9 gvisor.dev/gvisor/pkg/tcpip/stack.(*Route).WritePacket(0xc0043b4280, 0x4000000006, 0xc00b5ae100, 0xc007ab2bd8, 0x848d) pkg/tcpip/stack/route.go:462 +0xad fp=0xc08b64e100 sp=0xc08b64e0c0 pc=0x93e88d gvisor.dev/gvisor/pkg/tcpip/transport/tcp.sendTCP(0xc0043b4280, 0x2, 0xc005f274fc, 0x4, 0x848d, 0xc005f274f8, 0x4, 0xffae653500110040, 0xffffc02769c4, 0xc005c155f0, ...) pkg/tcpip/transport/tcp/connect.go:844 +0x285 fp=0xc08b64ff50 sp=0xc08b64e100 pc=0xabffe5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendTCP(0xc00ad56700, 0xc0043b4280, 0x2, 0xc005f274fc, 0x4, 0x848d, 0xc005f274f8, 0x4, 0xffae653500110000, 0xffffc02769c4, ...) pkg/tcpip/transport/tcp/connect.go:736 +0xea fp=0xc08b650020 sp=0xc08b64ff50 pc=0xabf3aa gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendRaw(0xc00ad56700, 0x0, 0x0, 0x0, 0x0, 0xffae653500000011, 0xffffc02769c4, 0xc00003cc60, 0xc00003cc68) pkg/tcpip/transport/tcp/connect.go:901 +0x23c fp=0xc08b6501a0 sp=0xc08b650020 pc=0xac079c gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegmentFromView(0xc009b74e00, 0x0, 0x0, 0x0, 0x0, 0xffae65350003cc11, 0xc00003ccb0, 0xc00003ccb8) pkg/tcpip/transport/tcp/snd.go:1547 +0xef fp=0xc08b6501f8 sp=0xc08b6501a0 pc=0xadc22f gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendSegment(0xc009b74e00, 0xc00b5ac600, 0x309d8000, 0xe7791f990) pkg/tcpip/transport/tcp/snd.go:1515 +0x1c5 fp=0xc08b6515d8 sp=0xc08b6501f8 pc=0xadc045 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).maybeSendSegment(0xc009b74e00, 0xc00b5ac600, 0x5a8, 0xc0ffaf6534, 0xad6d1e) pkg/tcpip/transport/tcp/snd.go:843 +0x35c fp=0xc08b651668 sp=0xc08b6515d8 pc=0xad9d9c gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*sender).sendData(0xc009b74e00) pkg/tcpip/transport/tcp/snd.go:946 +0x129 fp=0xc08b6516c0 sp=0xc08b651668 pc=0xada3e9 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).sendData(...) pkg/tcpip/transport/tcp/connect.go:926 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).shutdownLocked(0xc00ad56700, 0x3, 0x0, 0xc00ad7f7b0) pkg/tcpip/transport/tcp/endpoint.go:2431 +0x265 fp=0xc08b651778 sp=0xc08b6516c0 pc=0xacbfc5 gvisor.dev/gvisor/pkg/tcpip/transport/tcp.(*endpoint).Close(0xc00ad56700) pkg/tcpip/transport/tcp/endpoint.go:1026 +0x16d fp=0xc08b6517c0 sp=0xc08b651778 pc=0xac614d gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*socketOpsCommon).Release(0xc007e89320, 0x13f8fa0, 0xc00b156a80) pkg/sentry/socket/netstack/netstack.go:432 +0x1a2 fp=0xc08b651890 sp=0xc08b6517c0 pc=0xb2d5e2 gvisor.dev/gvisor/pkg/sentry/socket/netstack.(*SocketVFS2).Release(0xc007e892b0, 0x13f8fa0, 0xc00b156a80) pkg/sentry/socket/netstack/netstack_vfs2.go:84 +0xab fp=0xc08b6518c8 sp=0xc08b651890 pc=0xb3e5ab gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef.func1() pkg/sentry/vfs/file_description.go:194 +0x231 fp=0xc08b6519a8 sp=0xc08b6518c8 pc=0x761bd1 gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescriptionRefs).DecRef(0xc007e892b0, 0xc00ad7fa30) bazel-out/k8-fastbuild-ST-4c64f0b3d5c7/bin/pkg/sentry/vfs/file_description_refs.go:131 +0x5a fp=0xc08b651a20 sp=0xc08b6519a8 pc=0x7427fa gvisor.dev/gvisor/pkg/sentry/vfs.(*FileDescription).DecRef(0xc007e892b0, 0x13f8fa0, 0xc00b156a80) pkg/sentry/vfs/file_description.go:163 +0x69 fp=0xc08b651a60 sp=0xc08b651a20 pc=0x73c5a9 gvisor.dev/gvisor/pkg/sentry/syscalls/linux/vfs2.Close(0xc00b156a80, 0x7, 0x1, 0x570b38, 0x7fdc54efb4f0, 0x0, 0x1b2e120230, 0x0, 0x0, 0x0, ...) pkg/sentry/syscalls/linux/vfs2/fd.go:44 +0x1ba fp=0xc08b651b00 sp=0xc08b651a60 pc=0xde793a gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).executeSyscall(0xc00b156a80, 0x3, 0x7, 0x1, 0x570b38, 0x7fdc54efb4f0, 0x0, 0x1b2e120230, 0xe40e90, 0x12657e0, ...) pkg/sentry/kernel/task_syscall.go:103 +0x13c fp=0xc08b651c60 sp=0xc08b651b00 pc=0x9c397c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke(0xc00b156a80, 0x3, 0x7, 0x1, 0x570b38, 0x7fdc54efb4f0, 0x0, 0x1b2e120230, 0x0, 0x1b2e120230) pkg/sentry/kernel/task_syscall.go:238 +0x66 fp=0xc08b651ce8 sp=0xc08b651c60 pc=0x9c4b06 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter(0xc00b156a80, 0x3, 0x7, 0x1, 0x570b38, 0x7fdc54efb4f0, 0x0, 0x1b2e120230, 0x0, 0x0) pkg/sentry/kernel/task_syscall.go:198 +0x98 fp=0xc08b651d48 sp=0xc08b651ce8 pc=0x9c46f8 gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).doSyscall(0xc00b156a80, 0x2, 0xc00b156a80) pkg/sentry/kernel/task_syscall.go:173 +0x15c fp=0xc08b651e18 sp=0xc08b651d48 pc=0x9c409c gvisor.dev/gvisor/pkg/sentry/kernel.(*runApp).execute(0x0, 0xc00b156a80, 0x13ce520, 0x0) pkg/sentry/kernel/task_run.go:282 +0xc8c fp=0xc08b651f60 sp=0xc08b651e18 pc=0x9b8d2c gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).run(0xc00b156a80, 0x3fc2) pkg/sentry/kernel/task_run.go:97 +0x1af fp=0xc08b651fd0 sp=0xc08b651f60 pc=0x9b79af runtime.goexit() src/runtime/asm_amd64.s:1371 +0x1 fp=0xc08b651fd8 sp=0xc08b651fd0 pc=0x472821 created by gvisor.dev/gvisor/pkg/sentry/kernel.(*Task).Start pkg/sentry/kernel/task_start.go:327 +0xfe