{"record":{"id":"db750fa11ad2b508","repo":"uutils/coreutils","slug":"invalidinput-db750f","errorCode":"InvalidInput","errorMessage":"Too many levels of symbolic links","messagePattern":"Too many levels of symbolic links","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"src/uucore/src/lib/features/fs.rs","lineNumber":429,"sourceCode":"        if res_mode == ResolveMode::None {\n            continue;\n        }\n        match resolve_symlink(&result) {\n            Ok(Some(link_path)) => {\n                for link_part in link_path.components().rev() {\n                    parts.push_front(link_part.into());\n                }\n                if followed_symlinks < SYMLINKS_TO_LOOK_FOR_LOOPS {\n                    followed_symlinks += 1;\n                } else {\n                    let file_info =\n                        FileInformation::from_path(result.parent().unwrap(), false).unwrap();\n                    let mut path_to_follow = PathBuf::new();\n                    for part in &parts {\n                        path_to_follow.push(part.as_os_str());\n                    }\n                    if !visited_files.insert((file_info, path_to_follow)) {\n                        return Err(Error::new(\n                            ErrorKind::InvalidInput,\n                            \"Too many levels of symbolic links\",\n                        )); // TODO use ErrorKind::FilesystemLoop when stable\n                    }\n                }\n                result.pop();\n            }\n            Err(e)\n                if (miss_mode == MissingHandling::Existing\n                    || (miss_mode == MissingHandling::Normal && !parts.is_empty())) =>\n            {\n                return Err(e);\n            }\n            _ => {}\n        }\n    }\n    // raise Not a directory if required\n    match miss_mode {","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/uutils/coreutils/blob/85295bbf788bfd7a6926ba692031563504b304b7/src/uucore/src/lib/features/fs.rs#L411-L447","documentation":"Error \"Too many levels of symbolic links\" thrown in uutils/coreutils.","triggerScenarios":"Occurs when path canonicalization in uucore fs hits too many nested symbolic links (ELOOP).","commonSituations":"Resolving paths through circular symlink chains or symlink loops created accidentally.","solutions":["Break the symbolic link cycle in the path; inspect with readlink -f.","Avoid dereferencing links in a loop-prone tree, or use O_NOFOLLOW-style traversal."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"85295bbf788bfd7a6926ba692031563504b304b7","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}