actions/cache/save can not handle circular symbolic links in saved paths (ELOOP: too many symbolic links encountered)
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
The actions/cache/save@v4 action fails to create cache archive if there are "dead" circular symbolic links inside. The following error shows up in the output:
Warning: ELOOP: too many symbolic links encountered, stat '/home/runner/work/amneziawg-openwrt/amneziawg-openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/initial/lib/lib'
Warning: Cache save failed.
Problematic links:
$ find . -follow -printf ""
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/mips-openwrt-linux-musl/lib/lib’: Too many levels of symbolic links
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/initial/lib64/lib’: Too many levels of symbolic links
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/initial/lib/lib’: Too many levels of symbolic links
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/lib64/lib’: Too many levels of symbolic links
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/lib32/lib’: Too many levels of symbolic links
find: ‘./staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/lib/lib’: Too many levels of symbolic links
All these are circular symlinks, e.g.:
lrwxrwxrwx 1 runner docker 3 Sep 7 19:56 lib -> lib
lrwxrwxrwx 1 runner docker 3 Sep 7 19:56 staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/initial/lib/lib -> lib
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the reported circular links and the find . -follow -printf "" command, then trace the cache-save path that creates the archive. Verify behavior against paths containing self-referential symlinks and confirm that cache saving completes without the reported ELOOP warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100