{"record":{"id":"a0801a5856115548","repo":"GoogleContainerTools/skaffold","slug":"walking-q-w-a0801a","errorCode":null,"errorMessage":"walking %q: %w","messagePattern":"walking %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/docker/syncmap.go","lineNumber":108,"sourceCode":"\n\t\t\t\treturn !ignored, nil\n\t\t\t}\n\n\t\t\tif err := walk.From(absFrom).Unsorted().When(keepFile).WhenIsFile().Do(func(fpath string, info walk.Dirent) error {\n\t\t\t\trelPath, err := filepath.Rel(workspace, fpath)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\trelBase, err := filepath.Rel(absFrom, fpath)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tsrcByDest[path.Join(ft.To, filepath.ToSlash(relBase))] = relPath\n\t\t\t\treturn nil\n\t\t\t}); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"walking %q: %w\", absFrom, err)\n\t\t\t}\n\t\tcase mode.IsRegular():\n\t\t\tignored, err := dockerIgnored(filepath.Join(workspace, ft.From), fi)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\tif !ignored {\n\t\t\t\tif ft.ToIsDir {\n\t\t\t\t\tbase := filepath.Base(ft.From)\n\t\t\t\t\tsrcByDest[path.Join(ft.To, base)] = ft.From\n\t\t\t\t} else {\n\t\t\t\t\tsrcByDest[ft.To] = ft.From\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/docker/syncmap.go#L90-L126","documentation":"When a sync source is a directory, walkWorkspaceWithDestinations walks it with a keep-file filter to build destination mappings. If the underlying walk fails (unreadable directory, symlink loop, walk callback error), the error is wrapped as 'walking %q' with the absolute source path.","triggerScenarios":"os.Stat succeeded (path is a directory) but the walk cannot traverse it: permission denied on subdirectories, too many open files, or the keepFile callback (including dockerIgnored evaluation) returns an error.","commonSituations":"Directory readable at top level but subdirectories lack +x permission; broken symlinks inside the sync dir; extremely large directories hitting ulimit; git worktrees or mounted volumes with restricted permissions in containers/CI.","solutions":["Check permissions on the sync directory and all subdirectories (find <dir> -type d ! -perm -o+x)","Inspect nested symlinks inside the directory (find <dir> -type l -exec test ! -e {} \\;) and remove broken ones","Raise the open file limit (ulimit -n) if 'too many open files' appears in the wrapped error","Read the wrapped inner error to identify whether the failure is I/O or a dockerignore parsing issue"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"info, err := os.Stat(filepath.Join(workspace, ft.From))\nif err == nil && info.IsDir() {\n    if err := filepath.WalkDir(filepath.Join(workspace, ft.From), func(p string, d fs.DirEntry, err error) error {\n        return err\n    }); err != nil {\n        return fmt.Errorf(\"sync dir %q unreadable: %w\", ft.From, err)\n    }\n}","typeGuard":"func walkableDir(path string) bool {\n    fi, err := os.Stat(path)\n    return err == nil && fi.IsDir()\n}","tryCatchPattern":"if err := SyncMap(fts, workspace); err != nil {\n    if strings.Contains(err.Error(), \"walking\") && errors.Is(err, fs.ErrPermission) {\n        log.Warnf(\"skipping unreadable sync directory: %v\", err)\n        return nil\n    }\n    return err\n}","preventionTips":["Keep sync directory trees free of permission-restricted subdirectories","Avoid symlinks inside sync directories or verify they resolve","Raise ulimit -n for very large trees","Test SyncMap in dev mode before long watch sessions"],"tags":["filesystem","file-sync","walk"],"backgroundTag":"permission-denied","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}