{"record":{"id":"0e0240c4a5d947e1","repo":"juicedata/juicefs","slug":"readlink-s-from-s-w","errorCode":null,"errorMessage":"readlink %s from %s: %w","messagePattern":"readlink (.+?) from (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/sync/sync.go","lineNumber":1935,"sourceCode":"\tclose(prefixs)\n\n\twg.Wait()\n\tlistedPrefix.Done()\n\treturn nil\n}\n\nvar errDirSuffix = errors.New(\"dir miss suffix '/'\")\nvar ignoreFiles int64\n\nfunc produceSingleObject(tasks chan<- object.Object, src, dst object.ObjectStorage, key string, config *Config, checkpointMgr *CheckpointManager) error {\n\tobj, err := src.Head(ctx, key)\n\tif err != nil {\n\t\tif config.Links && (errors.Is(err, utils.ErrExtlink) || errors.Is(err, syscall.ENOTSUP) || errors.Is(err, os.ErrNotExist)) {\n\t\t\tif sl, ok := src.(object.SupportSymlink); ok {\n\t\t\t\tif target, e := sl.Readlink(key); e == nil {\n\t\t\t\t\tobj, err = object.NewSymlink(key, target), nil\n\t\t\t\t} else {\n\t\t\t\t\terr = fmt.Errorf(\"readlink %s from %s: %w\", key, src, e)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tlogger.Warnf(\"head %s from %s: %s\", key, src, err)\n\t\t\treturn err\n\t\t}\n\t}\n\tif obj.IsDir() && (!config.Links || !obj.IsSymlink()) {\n\t\t// only `files-from` will hit this case\n\t\tif !strings.HasSuffix(key, \"/\") {\n\t\t\treturn errDirSuffix\n\t\t}\n\t\tif !config.Dirs {\n\t\t\treturn nil\n\t\t}\n\t}\n\tvar srckeys = make(chan object.Object, 1)","sourceCodeStart":1917,"sourceCodeEnd":1953,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/sync/sync.go#L1917-L1953","documentation":"Returned by produceSingleObject in `juicefs sync` when, after a Head miss on a link-configured source, resolving the symlink target via Readlink also fails. The wrapped error names the key and source; sync of that single object is abandoned.","triggerScenarios":"Thrown at pkg/sync/sync.go:1935 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the source object/symlink exists and is readable","Exclude the broken path or fix it at the source, then re-run sync"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}