Error: Can't use 'tar -xzf' extract archive file
Describe the bug
Can't use runner. getting below error while running actions
Getting action download info Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e) Download action repository 'actions/setup-python@v2' (SHA:7f80679172b057fc5e90d70d197929d454754a5a) Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_fcaba673-8301-4f09-b4c0-658716c016e9/0f75c0dd-581a-4910-aa5c-6a5cc9a53620.tar.gz. return code: 2.
To Reproduce Steps to reproduce the behavior:
- run github actions
Expected behavior
actions should be complete without any errors
Runner Version and Platform
Current runner version: '2.291.1'
OS of the machine running the runner? OSX/Windows/Linux/...
What's not working?
Current runner version: '2.291.1'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Secret source: None
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
Download action repository 'actions/setup-python@v2' (SHA:7f80679172b057fc5e90d70d197929d454754a5a)
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_fcaba673-8301-4f09-b4c0-658716c016e9/0f75c0dd-581a-4910-aa5c-6a5cc9a53620.tar.gz. return code: 2.
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.
Seems like there is an issue with downloads from GitHub now causing this. Not necessarily related to this runner, but no relevant issues show up on the status page yet
##[debug]Download 'https://api.github.com/repos/actions/checkout/tarball/7884fcad6b5d53d10323aee724dc68d8b9096a2e' to '/home/runner/work/_actions/_temp_a5[50](https://github.com/repo/runs/6704514689?check_suite_focus=true#step:1:54)142d-0c74-440a-acaf-e526af6ec97d/1fa4ba8b-28e8-4e94-b98c-36df9a67a84d.tar.gz'
##[debug]Unwrap 'actions-checkout-7884fca' to '/home/runner/work/_actions/actions/checkout/v2'
##[debug]Archive '/home/runner/work/_actions/_temp_a550142d-0c74-440a-acaf-e526af6ec97d/1fa4ba8b-28e8-4e94-b98c-36df9a67a84d.tar.gz' has been unzipped into '/home/runner/work/_actions/actions/checkout/v2'.
Download action repository 'cypress-io/github-action@v2' (SHA:f5bea478b80a774068179089247f13d60abc5010)
##[debug]Download 'https://api.github.com/repos/cypress-io/github-action/tarball/f5bea478b80a774068179089247f13d60abc5010' to '/home/runner/work/_actions/_temp_5fbb9635-be9b-4a7b-b73c-0ebccfec2765/58b39741-0df7-42c0-a724-c399f0b53d[52](https://github.com/repo/runs/6704514689?check_suite_focus=true#step:1:56).tar.gz'
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_5fbb9635-be9b-4a7b-b73c-0ebccfec2765/58b39741-0df7-42c0-a724-c399f0b[53](https://github.com/repo/runs/6704514689?check_suite_focus=true#step:1:57)d52.tar.gz. return code: 2.
##[debug]System.NotSupportedException: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_5fbb9635-be9b-4a7b-b73c-0ebccfec2765/58b39741-0df7-42c0-a724-c399f0b53d52.tar.gz. return code: 2.
@kennethlynne We're also hit by this issue and I just saw that you're using the cypress-io/github-action in your workflow which we're using as well. All other flows not using this particular action are working fine so this might be the culprit?
@levrik I had the same issue with actions/cache , it might not be something specific to that action
2022-06-02T07:31:37.9410277Z Requested labels: ubuntu-latest
2022-06-02T07:31:37.9410326Z Job defined at: ***
2022-06-02T07:31:37.9410360Z Waiting for a runner to pick up this job...
2022-06-02T07:31:38.4804160Z Job is waiting for a hosted runner to come online.
2022-06-02T07:31:41.7120304Z Job is about to start running on the hosted runner: GitHub Actions 2 (hosted)
2022-06-02T07:31:45.3932730Z Current runner version: '2.291.1'
2022-06-02T07:31:45.3957556Z ##[group]Operating System
2022-06-02T07:31:45.3958149Z Ubuntu
2022-06-02T07:31:45.3958384Z 20.04.4
2022-06-02T07:31:45.3958661Z LTS
2022-06-02T07:31:45.3958942Z ##[endgroup]
2022-06-02T07:31:45.3959326Z ##[group]Virtual Environment
2022-06-02T07:31:45.3959720Z Environment: ubuntu-20.04
2022-06-02T07:31:45.3960011Z Version: 20220515.1
2022-06-02T07:31:45.3960524Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220515.1/images/linux/Ubuntu2004-Readme.md
2022-06-02T07:31:45.3961171Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220515.1
2022-06-02T07:31:45.3961659Z ##[endgroup]
2022-06-02T07:31:45.3962014Z ##[group]Virtual Environment Provisioner
2022-06-02T07:31:45.3962371Z 1.0.0.0-main-20220516-1
2022-06-02T07:31:45.3962633Z ##[endgroup]
2022-06-02T07:31:45.3963338Z ##[group]GITHUB_TOKEN Permissions
2022-06-02T07:31:45.3963864Z Checks: write
2022-06-02T07:31:45.3964324Z Contents: read
2022-06-02T07:31:45.3964909Z Issues: read
2022-06-02T07:31:45.3965215Z Metadata: read
2022-06-02T07:31:45.3965482Z PullRequests: write
2022-06-02T07:31:45.3965797Z ##[endgroup]
2022-06-02T07:31:45.3969324Z Secret source: Actions
2022-06-02T07:31:45.3969865Z Prepare workflow directory
2022-06-02T07:31:45.4828344Z Prepare all required actions
2022-06-02T07:31:45.5012540Z Getting action download info
2022-06-02T07:31:45.7359967Z Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
2022-06-02T07:31:46.3806597Z Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
2022-06-02T07:31:46.7458476Z ##[error]Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_cf1ffd67-1857-4283-a39e-49599b0ee39d/06579d60-f1f2-4519-945b-48dd8cee9f01.tar.gz. return code: 2.
@claudesky Then just coincidence that that first log I saw here was failing on the exact same action. Still weird that the workflows using the Cypress action are the only ones failing for us... at least so far.
My failing and succeeding run differ in that the failing run ran on Github Actions 2 (hosted) while the succeeding one ran on Hosted Agent (hosted)
Successful run:
2022-06-02T08:04:16.7646023Z Requested labels: ubuntu-latest
2022-06-02T08:04:16.7646082Z Job defined at: ***
2022-06-02T08:04:16.7646107Z Waiting for a runner to pick up this job...
2022-06-02T08:04:17.2154105Z Job is waiting for a hosted runner to come online.
2022-06-02T08:04:21.3465203Z Job is about to start running on the hosted runner: Hosted Agent (hosted)
2022-06-02T08:04:24.8974587Z Current runner version: '2.291.1'
2022-06-02T08:04:24.9001536Z ##[group]Operating System
2022-06-02T08:04:24.9002087Z Ubuntu
2022-06-02T08:04:24.9002364Z 20.04.4
2022-06-02T08:04:24.9002750Z LTS
2022-06-02T08:04:24.9003065Z ##[endgroup]
2022-06-02T08:04:24.9003431Z ##[group]Virtual Environment
2022-06-02T08:04:24.9003829Z Environment: ubuntu-20.04
2022-06-02T08:04:24.9004218Z Version: 20220515.1
2022-06-02T08:04:24.9004721Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220515.1/images/linux/Ubuntu2004-Readme.md
2022-06-02T08:04:24.9005424Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220515.1
2022-06-02T08:04:24.9005902Z ##[endgroup]
2022-06-02T08:04:24.9006302Z ##[group]Virtual Environment Provisioner
2022-06-02T08:04:24.9006694Z 1.0.0.0-main-20220516-1
2022-06-02T08:04:24.9007033Z ##[endgroup]
2022-06-02T08:04:24.9007734Z ##[group]GITHUB_TOKEN Permissions
2022-06-02T08:04:24.9008378Z Checks: write
2022-06-02T08:04:24.9008848Z Contents: read
2022-06-02T08:04:24.9009258Z Issues: read
2022-06-02T08:04:24.9009595Z Metadata: read
2022-06-02T08:04:24.9009954Z PullRequests: write
2022-06-02T08:04:24.9010250Z ##[endgroup]
2022-06-02T08:04:24.9013851Z Secret source: Actions
2022-06-02T08:04:24.9014370Z Prepare workflow directory
2022-06-02T08:04:24.9848513Z Prepare all required actions
2022-06-02T08:04:25.0042811Z Getting action download info
2022-06-02T08:04:25.3987128Z Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
2022-06-02T08:04:25.7042374Z Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
I can confirm that GitHub Actions 2 seems to always fail. Succeeding runs were on GitHub Actions 5 for me.
For anyone hitting this in workflows using actions/cache (like I am), apparently bumping to v3 could fix the issue, see https://github.com/actions/cache/issues/811
@boegel We're on actions/cache@3 already and are still hit by this.
mentioned in zeromq/pyzmq#1709
they have a macOS runner that also failed with a similar error, this on GitHub Actions 3
https://github.com/zeromq/pyzmq/runs/6703714358?check_suite_focus=true
2022-06-02T07:00:58.6695522Z The agent pool assigned to this job has hit their MacOs concurrency limits
2022-06-02T07:00:58.7054247Z Requested labels: macos-10.15
2022-06-02T07:00:58.7054346Z Job defined at: zeromq/pyzmq/.github/workflows/test.yml@refs/pull/1709/merge
2022-06-02T07:00:58.7054404Z Waiting for a runner to pick up this job...
2022-06-02T07:05:31.0287470Z Job is waiting for a hosted runner to come online.
2022-06-02T07:05:39.0406102Z Job is about to start running on the hosted runner: GitHub Actions 3 (hosted)
2022-06-02T07:05:43.4575320Z Current runner version: '2.291.1'
2022-06-02T07:05:43.4613380Z ##[group]Operating System
2022-06-02T07:05:43.4613890Z Mac OS X
2022-06-02T07:05:43.4614090Z 10.15.7
2022-06-02T07:05:43.4614290Z 19H1922
2022-06-02T07:05:43.4614500Z ##[endgroup]
2022-06-02T07:05:43.4614740Z ##[group]Virtual Environment
2022-06-02T07:05:43.4615030Z Environment: macos-10.15
2022-06-02T07:05:43.4615280Z Version: 20220523.3
2022-06-02T07:05:43.4615700Z Included Software: https://github.com/actions/virtual-environments/blob/macOS-10.15/20220523.3/images/macos/macos-10.15-Readme.md
2022-06-02T07:05:43.4616290Z Image Release: https://github.com/actions/virtual-environments/releases/tag/macOS-10.15%2F20220523.3
2022-06-02T07:05:43.4616660Z ##[endgroup]
2022-06-02T07:05:43.4616920Z ##[group]Virtual Environment Provisioner
2022-06-02T07:05:43.4617200Z 1.0.0.0-main-20220516-1
2022-06-02T07:05:43.4617430Z ##[endgroup]
2022-06-02T07:05:43.4618240Z ##[group]GITHUB_TOKEN Permissions
2022-06-02T07:05:43.4618870Z Actions: read
2022-06-02T07:05:43.4619150Z Checks: read
2022-06-02T07:05:43.4619360Z Contents: read
2022-06-02T07:05:43.4619590Z Deployments: read
2022-06-02T07:05:43.4619830Z Discussions: read
2022-06-02T07:05:43.4620050Z Issues: read
2022-06-02T07:05:43.4620260Z Metadata: read
2022-06-02T07:05:43.4620490Z Packages: read
2022-06-02T07:05:43.4620700Z Pages: read
2022-06-02T07:05:43.4620960Z PullRequests: read
2022-06-02T07:05:43.4621220Z RepositoryProjects: read
2022-06-02T07:05:43.4621470Z SecurityEvents: read
2022-06-02T07:05:43.4621710Z Statuses: read
2022-06-02T07:05:43.4621940Z ##[endgroup]
2022-06-02T07:05:43.4626520Z Secret source: None
2022-06-02T07:05:43.4626940Z Prepare workflow directory
2022-06-02T07:05:43.5776070Z Prepare all required actions
2022-06-02T07:05:43.6024590Z Getting action download info
2022-06-02T07:05:43.8723910Z Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
2022-06-02T07:05:45.1118780Z Download action repository 'actions/setup-python@v2' (SHA:7f80679172b057fc5e90d70d197929d454754a5a)
2022-06-02T07:05:46.6042040Z Download action repository 'actions/cache@v2' (SHA:937d24475381cd9c75ae6db12cb4e79714b926ed)
2022-06-02T07:05:47.0771680Z ##[error]'/Users/runner/work/_actions/_temp_23eddb76-7d0e-4382-8fb0-98dd3c7e0a0e/80457705-8335-4c45-9891-822f66654c90.tar.gz' contains '0' directories
It seems to be that the downloaded tar archive is empty
Might be fixed according to https://github.com/actions/cache/issues/811#issuecomment-1144590383
@boegel We're on
actions/cache@3already and are still hit by this.
Maybe jumping from v2 to v3 invalidates the cache, and then you're essentially just working around the problem?
https://github.com/actions/cache/issues/811#issuecomment-1144598726
Referencing this even v3 has still issues
Workflow runs are reliably passing for me again without any changes.
checks are still failing
##[debug]Starting: Set up job
Current runner version: '2.291.1'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Secret source: None
##[debug]Primary repository: red-hat-storage/ocs-ci
Prepare workflow directory
##[debug]Creating pipeline directory: '/home/runner/work/ocs-ci'
##[debug]Creating workspace directory: '/home/runner/work/ocs-ci/ocs-ci'
##[debug]Update context data
##[debug]Evaluating job-level environment variables
##[debug]Evaluating job container
##[debug]Evaluating job service containers
##[debug]Evaluating job defaults
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2' (SHA:7884fcad6b5d53d10323aee724dc68d8b9096a2e)
##[debug]Download 'https://api.github.com/repos/actions/checkout/tarball/7884fcad6b5d53d10323aee724dc68d8b9096a2e' to '/home/runner/work/_actions/_temp_7ce008a5-e7a4-43ef-97b6-188050aae9f1/4d15c2cf-20ad-464c-bbd8-df3d870392fe.tar.gz'
##[debug]Unwrap 'actions-checkout-7884fca' to '/home/runner/work/_actions/actions/checkout/v2'
##[debug]Archive '/home/runner/work/_actions/_temp_7ce008a5-e7a4-43ef-97b6-188050aae9f1/4d15c2cf-20ad-464c-bbd8-df3d870392fe.tar.gz' has been unzipped into '/home/runner/work/_actions/actions/checkout/v2'.
Download action repository 'actions/setup-python@v2' (SHA:7f80679172b057fc5e90d70d197929d454754a5a)
##[debug]Download 'https://api.github.com/repos/actions/setup-python/tarball/7f80679172b057fc5e90d70d197929d454754a5a' to '/home/runner/work/_actions/_temp_da92c613-1ac4-4e3f-b7c5-5a4f6fdbb61c/c6da0c38-1812-4000-a493-43ac0256b3dd.tar.gz'
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_da92c613-1ac4-4e3f-b7c5-5a4f6fdbb61c/c6da0c38-1812-4000-a493-43ac0256b3dd.tar.gz. return code: 2.
##[debug]System.NotSupportedException: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_da92c613-1ac4-4e3f-b7c5-5a4f6fdbb61c/c6da0c38-1812-4000-a493-43ac0256b3dd.tar.gz. return code: 2.
##[debug] at GitHub.Runner.Worker.ActionManager.DownloadRepositoryActionAsync(IExecutionContext executionContext, ActionDownloadInfo downloadInfo, String destDirectory)
##[debug] at GitHub.Runner.Worker.ActionManager.DownloadRepositoryActionAsync(IExecutionContext executionContext, ActionDownloadInfo downloadInfo)
##[debug] at GitHub.Runner.Worker.ActionManager.PrepareActionsRecursiveAsync(IExecutionContext executionContext, PrepareActionsState state, IEnumerable`1 actions, Int32 depth, Guid parentStepId)
##[debug] at GitHub.Runner.Worker.ActionManager.PrepareActionsAsync(IExecutionContext executionContext, IEnumerable`1 steps, Guid rootStepId)
##[debug] at GitHub.Runner.Worker.JobExtension.InitializeJob(IExecutionContext jobContext, AgentJobRequestMessage message)
##[debug]Finishing: Set up job```
It seems that this issue has been fixed now. My latest job ran past the failure it halted at earlier.
Hey folks,
A server side bug caused this issue, we've since mitigated the problem, please let us know if you see it again.
Thank you for your patience while we addressed it and sorry for the trouble it may have caused you
actions are running as expected.
@thboop We experience this issue since a few minutes 😕
@thboop Just got this error as well - 5 times in a row. The log looks like this:
Current runner version: '2.294.0'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:[2](https://github.com/discoveryinc-ds/pergola-gql-rest-router/runs/7308685841?check_suite_focus=true#step:1:2)541b1294d2704b09[6](https://github.com/discoveryinc-ds/pergola-gql-rest-router/runs/7308685841?check_suite_focus=true#step:1:7)48[13](https://github.com/discoveryinc-ds/pergola-gql-rest-router/runs/7308685841?check_suite_focus=true#step:1:16)337f33b291d3f8596b)
Download action repository 'actions/setup-node@v3' (SHA:5b949b50c3461bbcd5a540b150c368[27](https://github.com/discoveryinc-ds/pergola-gql-rest-router/runs/7308685841?check_suite_focus=true#step:1:31)8160234a)
Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_0cf9b0a3-10f2-46b3-81[32](https://github.com/discoveryinc-ds/pergola-gql-rest-router/runs/7308685841?check_suite_focus=true#step:1:36)-27faac882c0e/8f805591-5395-496d-8369-581d68f44808.tar.gz. return code: 2.