Skip to content

zstd -d: no such file or directory #809

Closed

Description

@stelescuraul

Hello, I have an issue regarding restoring caches on self hosted runners.
I am building the cache in a github runner, then in my self hosted runner, I am trying to restore it. I can see that the cache is actually being downloaded, but then when the tar command is running, it is failing to unpack it. Here's the log for it:

##[debug]Save intra-action state CACHE_KEY = ...e6f4
##[debug]Resolved Keys:
##[debug]["...e6f4"]
##[debug]Checking zstd --version
##[debug]*** zstd command line interface 64-bits v1.5.2, by Yann Collet ***
##[debug]Resource Url: url here
::add-mask::***
##[debug]Cache Result:
##[debug]{"scope":"refs/heads/dev","cacheKey":"...e6f4","cacheVersion":"...4fc88","creationTime":"2022-05-26T13:02:33.1933333Z","archiveLocation":"***"}
##[debug]Archive Path: /home/user/actions-runner/actions-runner/_work/_temp/...efdd/cache.tzst
##[debug]Use Azure SDK: true
##[debug]Download concurrency: 8
##[debug]Request timeout (ms): 30000
##[debug]Downloading segment at offset 0 with length 643139890...

Received 634751282 of 643139890 (98.7%), 40.3 MBs/sec
Received 643139890 of 643139890 (100.0%), 37.0 MBs/sec
Cache Size: ~613 MB (643139890 B) -> Cache downloaded

/usr/bin/tar --use-compress-program zstd -d -xf /home/user/actions-runner/actions-runner/_work/_temp/id/cache.tzst -P -C /home/user/actions-runner/actions-runner/_work/repo/repo
tar (child): zstd -d: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/bin/tar: Child returned status 2
/usr/bin/tar: Error is not recoverable: exiting now
Warning: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2

Basically, I can see the archive being downloaded in the folder but then i see the error in the output and the archive is gone.

When restoring cache from a Github runner, the tar command looks exactly the same but the cache is restored.

Cache Size: ~613 MB (643139890 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/id/cache.tzst -P -C /home/runner/work/repo/repo
Cache restored successfully

In the self hosted runner, i do have tar and zstd installed as you can see from debug outputs as well. This of course results in a cache miss.

Any idea on what this particular issue is all about? Am I missing something and this Is just a configuration error?

Activity

  1. sammcj commented on Jun 2, 2022

    @sammcj

    We are having exactly the same problem.

  2. sammcj commented on Jun 22, 2022

    @sammcj

    This is still causing us issues.

    Screen Shot 2022-06-22 at 11 05 49 am

  3. sammcj commented on Jun 22, 2022

    @sammcj

    We have logged an Enterprise support ticket for this, reference 1677362

  4. lvpx commented on Jul 11, 2022

    @lvpx
    Contributor

    Hi @sammcj , we investigated the above issue and noticed that it occurs for tar version < 1.30. From our testing of Amazon linux 2 instances, they come with tar version 1.26 and we were able to recreate the issue. If you could please test after upgrading the tar version at your end and see if it resolves the issue?

  5. self-assigned this
    on Jul 11, 2022
  6. added
    question
    on Jul 11, 2022
  7. sammcj commented on Jul 12, 2022

    @sammcj

    Hi @pdotl, Amazon Linux 2 is the standard AWS operating system managed by AWS - the latest tar that is available is 1.26.

    Given that Amazon Linux 2 is one of the most widely used distros and the main supported distro on AWS I think the Action should detect the OS or at least the tar version and pass the correct compression flags.

  8. added
    bug
    and removed
    question
    on Jul 13, 2022
  9. lvpx commented on Jul 14, 2022

    @lvpx
    Contributor

    Hi @sammcj, we are working on getting this fixed. Meanwhile, here are a few workarounds that should get your workflows running:

    1. Upgrade tar to a version above 1.26. The latest version can be fetched from https://www.gnu.org/software/tar/ and then compiled and installed manually.
    2. If possible, use the newer Amazon Linux 2022 image for your runner as it comes with tar 1.34 preinstalled.
  10. sammcj commented on Jul 19, 2022

    @sammcj

    @pdotl I spoke with the platform owners at the company I'm doing work with and they're not keen to switch from Amazon Linux 2 to Amazon Linux 2022 (very confusing versioning / naming from AWS here!) as it's in beta and not yet GA with Amazon - https://aws.amazon.com/linux/amazon-linux-2022/faqs/

  11. sammcj commented on Aug 3, 2022

    @sammcj

    Any update on this bug?

  12. sammcj commented on Aug 4, 2022

    @sammcj

    Hello,

    I'm not sure why this ticket was closed again @pdotl - the issue has not been resolved?

    Using the latest available version of Actions/Cache as of two hours ago:

    2022-08-04T21:21:08.2519068Z [command]/bin/tar --use-compress-program zstd -d -xf /home/ec2-user/actions-runner/_work/_temp/174148f4-633f-486a-b68e-d77f1a33a8a6/cache.tzst -P -C /home/ec2-user/actions-runner/_work/kis-fsu-ms/kis-fsu-ms
    2022-08-04T21:21:08.2647128Z tar (child): zstd -d: Cannot exec: No such file or directory
    2022-08-04T21:21:08.2647406Z tar (child): Error is not recoverable: exiting now
    2022-08-04T21:21:08.2648337Z /bin/tar: Child returned status 2
    2022-08-04T21:21:08.2648623Z /bin/tar: Error is not recoverable: exiting now
    2022-08-04T21:21:08.2676093Z ##[warning]Failed to restore: Tar failed with error: The process '/bin/tar' failed with exit code 2
    
  13. lvpx commented on Aug 5, 2022

    @lvpx
    Contributor

    Hi @sammcj

    Apologies, the ticket was autoclosed probably because of the commit description citing the issues. The changes are about to be merged and will be available in the latest version of actions/cache today.

  14. lvpx commented on Aug 5, 2022

    @lvpx
    Contributor

    @sammcj please run your workflows with the latest available version of cache using actions/cache@v3. The issue should now be resolved.

  15. sammcj commented on Aug 7, 2022

    @sammcj

    @pdotl just did a test build - no more errors! Thank you 😄

  16. sammcj commented on Aug 10, 2022

    @sammcj

    FYI - after fixing this our Java builds have gone from 20-25mins right down to 5-7mins! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions