{"record":{"id":"93ae1a10b3aa8d83","repo":"containerd/containerd","slug":"failed-to-checkpoint-container-q-w","errorCode":null,"errorMessage":"failed to checkpoint container %q: %w","messagePattern":"failed to checkpoint container %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cri/server/container_checkpoint_linux.go","lineNumber":149,"sourceCode":"\t\t\t\treturn criuPath\n\t\t\t}\n\t\t}\n\t\treturn \"\"\n\t}\n\tif criuPath, err := exec.LookPath(\"criu\"); err == nil {\n\t\tif absPath, err := filepath.Abs(criuPath); err == nil {\n\t\t\treturn absPath\n\t\t}\n\t\treturn criuPath\n\t}\n\treturn \"\"\n}\n\nfunc (c *criService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (*runtime.CheckpointContainerResponse, error) {\n\tstart := time.Now()\n\tif err := c.checkCriu(); err != nil {\n\t\tlog.G(ctx).WithError(err).Errorf(\"Failed to checkpoint container %q\", r.GetContainerId())\n\t\treturn nil, fmt.Errorf(\"failed to checkpoint container %q: %w\", r.GetContainerId(), err)\n\t}\n\n\tcriContainerStatus, err := c.ContainerStatus(ctx, &runtime.ContainerStatusRequest{\n\t\tContainerId: r.GetContainerId(),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"an error occurred when trying to find container the container status %q: %w\", r.GetContainerId(), err)\n\t}\n\n\tcontainer, err := c.containerStore.Get(r.GetContainerId())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"an error occurred when trying to find container %q: %w\", r.GetContainerId(), err)\n\t}\n\n\tstate := container.Status.Get().State()\n\tif state != runtime.ContainerState_CONTAINER_RUNNING {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"container %q is in %s state. only %s containers can be checkpointed\",","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/containerd/containerd/blob/4246446a2bf7d03837b0244118d858799393bd80/internal/cri/server/container_checkpoint_linux.go#L131-L167","documentation":"Top-level wrapper for CheckpointContainer: the pre-flight CRIU check (checkCriu) failed and the error is logged and wrapped with the container ID. The actual cause (binary missing, version retrieval failure, or too-old version) is in the wrapped chain.","triggerScenarios":"Any CheckpointContainer call where the criu binary is absent from both the shim path and system PATH, GetCriuVersion fails, or the version is below utils.PodCriuVersion.","commonSituations":"CRIU simply not installed on the node; users trying checkpoint on clusters where the feature prerequisite was never set up; after node provisioning without the checkpoint packages; stale shim-local criu.","solutions":["Inspect the wrapped cause in the error chain (`errors.Unwrap` or the log line) to see which check failed","Install/repair CRIU on the node and ensure it is on the PATH used by the shim","Confirm CRIU version meets the minimum required by the runtime","Re-run CheckpointContainer after fixing the CRIU installation"],"exampleFix":"// before (node without criu)\n$ kubectl checkpoint pod/web-0\nerror: failed to checkpoint container \"web\": criu binary not found...\n// after\n$ apt-get install -y criu && criu --version\n$ kubectl checkpoint pod/web-0  # succeeds","handlingStrategy":"try-catch","validationCode":"path, err := exec.LookPath(\"criu\")\nif err != nil {\n    return fmt.Errorf(\"checkpoint unavailable: install criu (>= required version)\")\n}","typeGuard":null,"tryCatchPattern":"_, err := client.CheckpointContainer(ctx, req)\nif err != nil {\n    var wrapped error = err\n    for wrapped != nil {\n        if strings.Contains(wrapped.Error(), \"criu\") {\n            // handle missing/broken/old criu\n            break\n        }\n        wrapped = errors.Unwrap(wrapped)\n    }\n}","preventionTips":["Install and verify CRIU as a node prerequisite before offering checkpoint","Read the wrapped cause in the error chain, not just the wrapper message","Gate the checkpoint feature on a startup health check of CRIU","Keep the log line (Failed to checkpoint container) alongside the RPC error for diagnosis"],"tags":["checkpoint","criu","wrapper","prerequisite"],"backgroundTag":"criu-not-installed","analyzedSha":"4246446a2bf7d03837b0244118d858799393bd80","analyzedAt":"2026-09-02T00:14:43.053Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}