{"record":{"id":"4608fb961c6b9749","repo":"juicedata/juicefs","slug":"entry-d-d-not-found","errorCode":null,"errorMessage":"entry %d/%d not found","messagePattern":"entry (.+?)/(.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/meta/base.go","lineNumber":2384,"sourceCode":"\t\t\tif attr.Typ != TypeDirectory {\n\t\t\t\treturn \"\", fmt.Errorf(\"inode %d is not a directory\", ino)\n\t\t\t}\n\t\t\tvar entries []*Entry\n\t\t\tif st := m.en.doReaddir(ctx, attr.Parent, 0, &entries, -1); st != 0 {\n\t\t\t\treturn \"\", fmt.Errorf(\"readdir inode %d: %s\", ino, st)\n\t\t\t}\n\t\t\tvar name string\n\t\t\tfor _, e := range entries {\n\t\t\t\tif e.Inode == ino {\n\t\t\t\t\tname = string(e.Name)\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif attr.Parent == RootInode && ino == TrashInode {\n\t\t\t\tname = TrashName\n\t\t\t}\n\t\t\tif name == \"\" {\n\t\t\t\treturn \"\", fmt.Errorf(\"entry %d/%d not found\", attr.Parent, ino)\n\t\t\t}\n\t\t\tnames = append(names, name)\n\t\t\tino = attr.Parent\n\t\t}\n\t\tif m.root != RootInode && ino == RootInode {\n\t\t\treturn outside, nil\n\t\t}\n\t\tnames = append(names, \"/\") // add root\n\n\t\tfor i, j := 0, len(names)-1; i < j; i, j = i+1, j-1 { // reverse\n\t\t\tnames[i], names[j] = names[j], names[i]\n\t\t}\n\t\treturn path.Join(names...), nil\n\t}\n\n\tvar paths []string\n\t// inode != RootInode, parent is the real parent inode\n\tfor parent, count := range m.GetParents(ctx, inode) {","sourceCodeStart":2366,"sourceCodeEnd":2402,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/meta/base.go#L2366-L2402","documentation":"During path reconstruction, after listing the parent directory no entry with the target inode was found (name stayed empty), so the path cannot be completed. This means the inode is not linked in its recorded parent — an orphaned or unlinked inode.","triggerScenarios":"doReaddir on attr.Parent returned entries but none had e.Inode == ino; happens when the dentry was removed (file unlinked) while the walk still references the inode, or when metadata dentry/parent pointers are inconsistent.","commonSituations":"Open file handle whose name was deleted while in use; concurrent rm/rename racing with path resolution; trash-inode special case mismatches; metadata corruption after crash.","solutions":["Re-resolve the file by path after confirming it still exists; the old inode is unlinked","Handle the race gracefully in application code (deleted-while-open is normal POSIX behavior)","If no deletion happened, inspect the metadata engine for dentry/parent inconsistency (fsck)"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"var entries []*meta.Entry\nif st := meta.Readdir(ctx, parent, 0, &entries, -1); st != 0 { return st }\nfound := false\nfor _, e := range entries {\n    if e.Inode == ino { found = true; break }\n}\nif !found { /* inode unlinked; re-resolve or fail gracefully */ }","typeGuard":null,"tryCatchPattern":"name, err := fs.GetPath(ino)\nif err != nil {\n    // fall back to re-opening by recorded path or treat as deleted\n}","preventionTips":["Expect deleted-while-open semantics: an open handle does not guarantee a name exists","Minimize concurrent rm/rename with path-resolution code paths","Verify trash configuration if relying on trash-inode lookups"],"tags":["metadata","inode","dentry","orphan"],"backgroundTag":"record-not-found","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}