{"record":{"id":"ed632f2f4d9dbfd4","repo":"containerd/containerd","slug":"failed-to-get-bootstrap-params-of-sandbox-s-w","errorCode":null,"errorMessage":"failed to get bootstrap params of sandbox %s: %w","messagePattern":"failed to get bootstrap params of sandbox (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/runtime/v2/shim_manager.go","lineNumber":254,"sourceCode":"\t\t\t\t}\n\n\t\t\t\t// The sandbox controller only returns connection details, not\n\t\t\t\t// what its shim advertised at startup. Recover that from the\n\t\t\t\t// shim instance containerd already has in memory for this\n\t\t\t\t// sandbox, so a container joining it is not treated as if the\n\t\t\t\t// shim advertised nothing.\n\t\t\t\tif process, err := m.Get(ctx, opts.SandboxID); err == nil {\n\t\t\t\t\tparams.Extensions = sandboxShimExtensions(process)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tprocess, err := m.Get(ctx, opts.SandboxID)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"can't find shim for sandbox %s: %w\", opts.SandboxID, err)\n\t\t\t\t}\n\n\t\t\t\tp, err := restoreBootstrapParams(process.Bundle())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"failed to get bootstrap \"+\n\t\t\t\t\t\t\"params of sandbox %s: %w\", opts.SandboxID, err)\n\t\t\t\t}\n\t\t\t\tparams = p\n\t\t\t}\n\t\t}\n\t}\n\t// Even though one shim can be able to group multiple containers,\n\t// it doesn't mean it supports sandbox API. The old shim implementation\n\t// still requires containerd to invoke `shim delete` to cleanup\n\t// container's resource when each container exits. So, if the\n\t// shim version is not higher than 3, we should fallback to invoke\n\t// shim binary.\n\t//\n\t// NOTE: The shim version indicates that the shim supports streaming I/O.\n\t// It's rolled out together with the sandbox API and can be used\n\t// to determine whether we should invoke the shim binary.\n\tconst supportSandboxAPIVersion = 3\n\tif params.Version < supportSandboxAPIVersion {","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/containerd/containerd/blob/4246446a2bf7d03837b0244118d858799393bd80/core/runtime/v2/shim_manager.go#L236-L272","documentation":"After locating the shim process, Start reads the bootstrap.json file persisted in the shim's bundle directory via restoreBootstrapParams(process.Bundle()). If that read/parse fails (missing or unreadable/corrupt file), the error is wrapped with the sandbox ID and returned.","triggerScenarios":"The bundle directory of a running shim lacks bootstrap.json, was deleted while the shim ran, or contains corrupt/empty JSON produced by a failed earlier writeBootstrapParams.","commonSituations":"Bundles on tmpfs wiped on reboot while shim socket still registered; disk cleanup scripts removing bundle dirs; interrupted containerd write leaving truncated bootstrap.json.","solutions":["Restore/rewrite bootstrap.json in the bundle directory or stop and re-create the container","Verify the bundle path exists and is readable by the containerd process","Check disk/filesystem health for corrupted files","Restart the shim and task so bootstrap.json is regenerated"],"exampleFix":"# before: file missing\nls /run/containerd/io.containerd.runtime.v2.task/moby/<id>/bootstrap.json  # No such file\n# after: recreate by stopping and re-creating the task\nctr tasks kill <id>; ctr run ... <id>","handlingStrategy":"validation","validationCode":"func bootstrapExists(bundle string) error {\n    f := filepath.Join(bundle, \"bootstrap.json\")\n    if _, err := os.Stat(f); err != nil { return fmt.Errorf(\"bootstrap.json missing: %w\", err) }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"bootstrap params\") {\n        // recreate the task or restore bootstrap.json from bundle backup\n    }\n}","preventionTips":["Don't delete bundle directories of running shims","Back up bootstrap.json before maintenance on state mounts","Avoid tmpfs for bundle storage if restarts must reconnect to shims"],"tags":["containerd","bootstrap","filesystem"],"backgroundTag":"bootstrap-params-missing","analyzedSha":"4246446a2bf7d03837b0244118d858799393bd80","analyzedAt":"2026-09-02T00:14:43.053Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}