Cache fails with zstd error - zstd -d: Cannot exec: No such file or directory
Despite zstd being installed, the cache action fails as it appears to be looking for zstd in the wrong location.
- Operation System: Amazon Linux 2
- Action version: v3
- Runner version: Latest stable
Job:
- uses: actions/checkout@v3
- name: Cache Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
Run actions/cache@v3
Received 0 of 4[7](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:8)5287217 (0.0%), 0.0 MBs/sec
Received 0 of 475287217 (0.0%), 0.0 MBs/sec
Received 4194304 of 4752[8](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:9)7217 (0.[9](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:10)%), 1.3 MBs/sec
Received 46137344 of 475287217 (9.7%), 11.0 MBs/sec
Received 83886080 of 475287217 (17.6%), 16.0 MBs/sec
Received [10](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:11)4857600 of 475287217 (22.1%), 16.7 MBs/sec
Received [13](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:14)4217728 of 475287217 (28.2%), 18.3 MBs/sec
Received 167772160 of 475287217 (35.3%), 20.0 MBs/sec
Received 197132288 of 475287217 (41.5%), 20.9 MBs/sec
Received 234881024 of 475287217 (49.4%), 22.4 MBs/sec
Received 268435456 of 475287217 (56.5%), 23.3 MBs/sec
Received 297795584 of 475287217 (62.7%), 23.6 MBs/sec
Received 339738624 of 475287217 (71.5%), 24.9 MBs/sec
Received 369098752 of 475287217 (77.7%), 25.1 MBs/sec
Received 406847488 of 475287217 (85.6%), 25.8 MBs/sec
Received 4362076[16](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:17) of 4752872[17](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:18) (91.8%), 26.0 MBs/sec
Received 471092913 of 475287217 (99.1%), 26.4 MBs/sec
Received 475287217 of 475287217 (100.0%), 26.2 MBs/sec
Cache Size: ~453 MB (475287217 B)
/bin/tar --use-compress-program zstd -d -xf /home/ec2-user/actions-runner/_work/_temp/469[19](https://github.com/OrgName/repo-name/runs/6702665797?check_suite_focus=true#step:3:20)ba1-0057-4976-990d-1f9cd28b3900/cache.tzst -P -C /home/ec2-user/actions-runner/_work/repo-name/repo-name
tar (child): zstd -d: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
Warning: Tar failed with error: The process '/bin/tar' failed with exit code 2
Experiencing what I believe is a related error with cache@v2.
Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_87e210c3-fb31-497b-9ab0-da952e03417f/5c14691f-39b6-4ada-a092-3021917c4b2d.tar.gz. return code: 2.
me too
tar -xzf
Seeing the same error as caseyagraff.
Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
##[debug]Download 'https://api.github.com/repos/actions/cache/tarball/937d24475381cd9c75ae6db12cb4e79714b926ed' to '/home/runner/work/_actions/_temp_4192251e-0ae7-4f05-b113-e03bf86b3a83/a97fb7bf-5285-4c84-aa2a-021debd0fb44.tar.gz'
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_4192251e-0ae7-4f05-b113-e03bf86b3a83/a97fb7bf-5285-4c84-aa2a-021debd0fb44.tar.gz. return code: 2.
Was just fine on our latest build 23 hours ago, but today an error.
same issue with ci @ https://github.com/jslint-org/jslint/runs/6703304102?check_suite_focus=true
it ran fine 2 days ago
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_36ee705b-2e9f-49a0-985f-9fe5e383d8b7/25394922-3d8b-4ab8-a401-1a8db6412a7b.tar.gz. return code: 2.
We are also getting this. Can't use 'tar -xzf' extract archive file: /opt/actions-runner/_work/_actions/_temp_710d04d0-c53b-4809-993a-8e1cd0011a46/1c33ee88-e011-46d8-b400-b2a330052e85.tar.gz. return code: 2
Same tar error here, with some context:
Current runner version: '2.291.1'
Operating System
Ubuntu
20.04.4
LTS
Virtual Environment
Environment: ubuntu-20.04
Version: 20220515.1
Included Software: https://***.com/actions/virtual-environments/blob/ubuntu20/20220515.1/images/linux/Ubuntu2004-Readme.md
Image Release: https://***.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220515.1
Virtual Environment Provisioner
1.0.0.0-main-20220516-1
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
Download action repository 'actions/setup-java@v1' (SHA:d202f5dbf7256730fb690ec59f6381650114feb2)
Download action repository 'webfactory/[email protected]' (SHA:ee29fafb6aa450493bac9136b346e51ea60a8b5e)
Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_600c9728-0e67-43f3-ac10-17af2f8ecba0/b49c9e6c-5cf2-458a-bf4b-9a1363839462.tar.gz. return code: 2.
I could get around this by installing zstd using apt/yum package manager. edit: nope, intermittenly failing.
Seems to be fixed now :)
edit: nope I take that back, it failed again :(
I was running actions/cache@v2 and got the Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_<random id>.tar.gz. return code: 2. error. I then updated all my workflows to use actions/cache@v3 and it seems to have fixed the problem.
I was running
actions/cache@v2and got theError: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_<random id>.tar.gz. return code: 2.error. I then updated all my workflows to useactions/cache@v3and it seems to have fixed the problem.
~~It unfortunately didn't solve my issue~~ Triggering the same build failed but restarting a build from 0 worked
Switching to v3 from v2 worked for me.
👋 , 👀
Trying to reproduce. I tried couple of workflow with v2 and v3. https://github.com/tiwarishub/empty/actions/workflows/test.yml but doesnt seems to be happening
Switching to v3 from v2 worked for me.
For anyone it is not working ?
@tiwarishub bumping to v3 resolved the issue. I believe it only happens on github hosted runners
@tiwarishub bumping to v3 resolved the issue. I believe it only happens on github hosted runners
I was actually using self-hosted runners with actions runner controller.
I have the same issue with
##[debug]Download 'https://api.github.com/repos/actions/cache/tarball/937d24475381cd9c75ae6db12cb4e79714b926ed' to '/home/runner/work/_actions/_temp_6f6b38df-acb3-4cbc-a688-c0e1adfcf6cb/1e3524d5-210a-4d29-803d-46eeb869[56](https://github.com/acquia-pso/veolia/runs/6704394552?check_suite_focus=true#step:1:60)27.tar.gz'
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_6f6b38df-acb3-4cbc-a688-c0e1adfcf6cb/1e3524d5-210a-4d29-803d-46eeb8695627.tar.gz. return code: 2.
##[debug]System.NotSupportedException: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_6f6b38df-acb3-4cbc-a688-c0e1adfcf6cb/1e3524d5-210a-4d29-803d-46eeb8695627.tar.gz. return code: 2.
Seems to be due to https://api.github.com/repos/actions/cache/tarball/937d24475381cd9c75ae6db12cb4e79714b926ed being zero bytes
@tiwarishub bumping to v3 resolved the issue. I believe it only happens on github hosted runners
yep, bumping fixed the issue for us as well
Same here:
- https://github.com/SeaQL/sea-orm/pull/783
Error in description is while downloading the cache but in subsequent comments it for downloading the tar ball of actions/cache (which is different and seems to be happening for most). We were seeing issues with codeload which seems to be fixed now. We will update here once get more details