{"record":{"id":"07ca0ce022b3ede9","repo":"dagger/dagger","slug":"failed-to-get-mounts-of-q","errorCode":null,"errorMessage":"failed to get mounts of %q","messagePattern":"failed to get mounts of %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/snapshots/merge.go","lineNumber":122,"sourceCode":"\t\t}\n\t\tctx = leaseCtx\n\t}\n\tif leaseID, ok := leases.FromContext(ctx); !ok || leaseID == \"\" {\n\t\tleaseCtx, done, err := WithLease(ctx, sn.lm, MakeTemporary)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to create temporary lease for view mounts during merge\")\n\t\t}\n\t\tdefer done(context.TODO())\n\t\tctx = leaseCtx\n\t}\n\n\tprepareKey := identity.NewID()\n\tif err := sn.Prepare(ctx, prepareKey, baseKey); err != nil {\n\t\treturn errors.Wrapf(err, \"failed to prepare %q\", key)\n\t}\n\tapplyMounts, err := sn.Mounts(ctx, prepareKey)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed to get mounts of %q\", key)\n\t}\n\n\tusage, err := sn.diffApply(ctx, applyMounts, diffs...)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to apply diffs\")\n\t}\n\tif err := sn.Commit(ctx, key, prepareKey, withMergeUsage(usage)); err != nil {\n\t\treturn errors.Wrapf(err, \"failed to commit %q\", key)\n\t}\n\treturn nil\n}\n\nfunc (sn *mergeSnapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, error) {\n\tif info, err := sn.Stat(ctx, key); err != nil {\n\t\treturn snapshots.Usage{}, err\n\t} else if usage, ok, err := mergeUsageOf(info); err != nil {\n\t\treturn snapshots.Usage{}, err\n\t} else if ok {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/engine/snapshots/merge.go#L104-L140","documentation":"Merge wraps failures from sn.Mounts(ctx, prepareKey) with \"failed to get mounts of %q\". After successfully preparing an intermediate snapshot, the code asks the snapshotter for its mount configuration to apply the diffs onto; if the snapshotter cannot compute mounts (snapshot vanished, backend error), this error is returned. The %q is the destination key, not the internal prepareKey.","triggerScenarios":"Merge(ctx, key, diffs) where the snapshotter's Mounts call on the freshly prepared prepareKey fails — e.g. snapshot was deleted between Prepare and Mounts, or the overlay backend cannot construct the mount options.","commonSituations":"Concurrent garbage collection removing prepareKey; containerd snapshotter wedged after node restart; overlayfs kernel/module issues on the host.","solutions":["Retry the Merge operation — prepareKey is a fresh identity.NewID() each time, so a retry allocates a new snapshot","Check containerd daemon logs for snapshotter/Mounts errors around the timestamp","Verify no aggressive GC/pruning job runs concurrently with merges","Confirm the snapshotter driver (overlayfs/stargz/native) is healthy on the node"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// prepareKey is internal; validate the diff endpoints exist\nfor _, d := range diffs {\n    if _, err := sn.Stat(ctx, d.Lower); err != nil { return err }\n}","typeGuard":null,"tryCatchPattern":"if err := sn.Merge(ctx, key, diffs); err != nil {\n    if strings.Contains(err.Error(), \"failed to get mounts of\") {\n        return retryMerge(ctx, key, diffs) // fresh prepareKey on retry\n    }\n    return err\n}","preventionTips":["Retry Merge on transient mount errors — a new snapshot is prepared each attempt","Disable concurrent GC pruning while merges run","Watch containerd logs for snapshotter mount failures","Keep the snapshotter driver healthy (kernel module, backing fs)"],"tags":["snapshots","containerd","mounts"],"backgroundTag":"snapshot-mount-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"}