Dec 26 22:55:21 computer containerd[78147]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 26 22:55:21 computer containerd[78147]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5565acf24c24]
Dec 26 22:55:21 computer containerd[78147]: goroutine 23891 [running]:
Dec 26 22:55:21 computer containerd[78147]: github.com/containerd/containerd/v2/internal/cri/server.(*criService).extractContainerSpecMetrics(0xc001b3e300?, {0x5565adcd0ea0?, 0xc003d47270?}, {0xc000edd880?, 0x5565adcd0ea0?}, {0xc001b3e300, 0x4, 0x4}, 0x1884e5e40cc8cfbb)
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/internal/cri/server/list_pod_sandbox_metrics_linux.go:1026 +0x3e4
Dec 26 22:55:21 computer containerd[78147]: github.com/containerd/containerd/v2/internal/cri/server.(*criService).collectContainerMetrics(0xc000b7ed88, {0x5565adcd0ea0, 0xc003d47270}, {{{0xc000edd880, 0x40}, {0xc000a18720, 0x52}, {0xc000edd8c0, 0x40}, 0xc0018486c0, ...}, ...}, ...)
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/internal/cri/server/list_pod_sandbox_metrics_linux.go:306 +0x10dc
Dec 26 22:55:21 computer containerd[78147]: github.com/containerd/containerd/v2/internal/cri/server.(*criService).collectPodSandboxMetrics(0xc000b7ed88, {_, _}, {{{0xc00128f680, 0x40}, {0xc000adecd0, 0x4a}, 0xc000b98990, {0xc00128f6c0, 0x37}, ...}, ...})
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/internal/cri/server/list_pod_sandbox_metrics_linux.go:207 +0xf11
Dec 26 22:55:21 computer containerd[78147]: github.com/containerd/containerd/v2/internal/cri/server.(*criService).ListPodSandboxMetrics.func1()
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/internal/cri/server/list_pod_sandbox_metrics_linux.go:75 +0x98
Dec 26 22:55:21 computer containerd[78147]: golang.org/x/sync/errgroup.(*Group).Go.func1()
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/vendor/golang.org/x/sync/errgroup/errgroup.go:93 +0x50
Dec 26 22:55:21 computer containerd[78147]: created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 23775
Dec 26 22:55:21 computer containerd[78147]: /root/rpmbuild/BUILD/containerd.io-2.2.1-build/vendor/golang.org/x/sync/errgroup/errgroup.go:78 +0x93
Dec 26 22:55:21 computer kubelet[2606]: {"ts":1766789721480.4194,"caller":"internal/log.go:32","msg":"ListPodSandboxMetrics from runtime service failed","err":"rpc error: code = Unavailable desc = error reading from server: EOF"}
Dec 26 22:55:21 computer kubelet[2606]: {"ts":1766789721480.5044,"caller":"collectors/cri_metrics.go:73","msg":"Failed to get pod metrics","err":"rpc error: code = Unavailable desc = error reading from server: EOF"}
Dec 26 22:55:21 computer systemd[1]: containerd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 26 22:55:21 computer systemd[1]: containerd.service: Failed with result 'exit-code'.
Description
On Fedora 43 with containerd 2.2.1, get:
This appears to be the bug fixed in #12492 and needs to be backported
Steps to reproduce the issue
Describe the results you received and expected
No panics
What version of containerd are you using?
v2.2.1
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response