{"record":{"id":"a3149301bea78451","repo":"dagger/dagger","slug":"clone-exec-rootfs-w","errorCode":null,"errorMessage":"clone exec rootfs: %w","messagePattern":"clone exec rootfs: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/sdk.go","lineNumber":256,"sourceCode":"\tContainer dagql.ObjectResult[*Container]\n}\n\nfunc (r *ContainerRuntime) AsContainer() (dagql.ObjectResult[*Container], bool) {\n\treturn r.Container, true\n}\n\nfunc (r *ContainerRuntime) Call(\n\tctx context.Context,\n\texecMD *engineutil.ExecutionMetadata,\n\tfnCall *FunctionCall,\n\tmoduleContext dagql.ObjectResult[*Module],\n) error {\n\thideCtx := dagql.WithSkip(ctx)\n\n\tctr := r.Container\n\tclonedFS, err := CloneContainerDirectoryAccessor(hideCtx, ctr.Self().FS)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"clone exec rootfs: %w\", err)\n\t}\n\tclonedMounts, err := CloneContainerMounts(hideCtx, ctr.Self().Mounts)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"clone exec mounts: %w\", err)\n\t}\n\tclonedMeta, err := CloneContainerMetaSnapshot(hideCtx, ctr.Self().MetaSnapshot)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"clone exec meta snapshot: %w\", err)\n\t}\n\texecCtr := &Container{\n\t\tFS:                 clonedFS,\n\t\tMetaSnapshot:       clonedMeta,\n\t\tConfig:             ctr.Self().Config,\n\t\tEnabledGPUs:        slices.Clone(ctr.Self().EnabledGPUs),\n\t\tMounts:             clonedMounts,\n\t\tPlatform:           ctr.Self().Platform,\n\t\tAnnotations:        slices.Clone(ctr.Self().Annotations),\n\t\tSecrets:            slices.Clone(ctr.Self().Secrets),","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/sdk.go#L238-L274","documentation":"Wraps a failure from CloneContainerDirectoryAccessor while ContainerRuntime.Call prepares a function-exec container (core/sdk.go:256). Before running module code, Dagger clones the runtime container's rootfs accessor so the exec doesn't mutate the original; failure means the rootfs Directory could not be cloned (underlying blob/copy error surfaced via %w).","triggerScenarios":"Calling a module function (constructor or function) whose runtime container's FS cannot be cloned — typically an underlying storage/cache read error on the rootfs blobs, or a corrupted/evicted rootfs reference.","commonSituations":"Corrupted engine cache after a crash or disk-full; container built from an image layer that failed to load; running with an engine whose content store was partially deleted.","solutions":["Inspect the wrapped cause (%w) and fix the underlying storage error (free disk, repair content store)","Retry the operation — transient cache/blob errors often resolve on rerun","Rebuild the runtime container (re-pull image / recreate filesystem steps) to refresh the rootfs reference","As a last resort, clear the engine content cache and re-run (dagger engine prune / restart engine)"],"exampleFix":"// before\nctr := dag.Container().From(\"alpine\") // image pull was interrupted\n// after\nctr := dag.Container().From(\"alpine\") // re-pull fully, then retry the function call\ndag.Container().From(\"alpine\").Sync(ctx) // warm the cache first","handlingStrategy":"retry","validationCode":"// verify the rootfs is loadable before the call\nif _, err := ctr.Rootfs().Sync(ctx); err != nil {\n    // rebuild the container first\n}","typeGuard":null,"tryCatchPattern":"err := runtime.Call(ctx, execMD, fnCall, modCtx)\nif err != nil && strings.Contains(err.Error(), \"clone exec rootfs\") {\n    // check disk space / prune cache, then retry\n}","preventionTips":["Keep sufficient disk space for the engine content store","Re-pull base images after interrupted pulls","Restart the engine after cache-corrupting crashes"],"tags":["dagger","container","rootfs","clone","cache"],"backgroundTag":"rootfs-clone-failed","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}