question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zstd -d: no such file or directory

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sammcjcommented, Aug 10, 2022

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

1reaction
sammcjcommented, Aug 7, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errno 2 No such file or directory when looping through folder ...
I am currently trying to create a loop that goes through a folder and converts every file from .zst to json, and then...
Read more >
[r2.6][PR] Cannot find real source of dependency No such file ...
The "header missing" error does not come from the lack of the library, which is correctly provided and installed in third_party/zstd.BUILD (and ...
Read more >
zstd tests failing on decompression only tests
The `zstd` tests make use of a number of special files such as `/dev/null` and `dev/zero` and these are not present in the...
Read more >
zstd, zstdmt, unzstd, zstdcat - Compress or decompress .zst files
If no files are given or file is -, zstd reads from standard input and writes the processed data to standard output. zstd...
Read more >
How to compress files with zstd from the command line or ...
This command will compress all the files specified in the text file and remove them upon completion.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found