Skip to content

Fails on tar exit code 1 on ubuntu-latest #689

Closed

Description

@cyberpwnn

I need to share around a small but heavily processed repository to multiple jobs,

    runs-on: ubuntu-latest
    steps: 
      - name: Cache Repository
        uses: actions/cache@v2
        with:
          path: |
            ~/
            !~/.git/

Fails with

Post job cleanup.
/usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/xxx/xxx--files-from manifest.txt
/usr/bin/tar: ../../../work/_temp/6483fbb9-3579-4fb0-a582-3316b336d5a9/cache.tzst: file changed as we read it
Warning: Tar failed with error: The process '/usr/bin/tar' failed with exit code 1

Activity

  1. vsvipul commented on Dec 21, 2021

    @vsvipul
    Contributor

    Hi @cyberpwnn ! Is the repo on which you are using cache public? If yes, can you share link to the workflow run. If not, can you share the logs here?

  2. MatthieuLeboeuf commented on Dec 28, 2021

    @MatthieuLeboeuf

    Hello,
    I have the same error
    logs
    iAMjpav

  3. dopplershift commented on Feb 3, 2022

    @dopplershift

    Seeing the same issue on this repo. Here's a representative action run:

    Post job cleanup.
    Post job cleanup.
    /usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/MetPy/MetPy --files-from manifest.txt
    /usr/bin/tar: ../../../work/_temp/bdee9e41-e8-4f2a-9912-6eb32de36aa/cache.tzst: file changed as we read it
    Warning: Tar failed with error: The process '/usr/bin/tar' failed with exit code 1
    Post job cleanup.
    Cache hit occurred on the primary key setup-python-Linux-pip-9225292fdf311547e1fda261cbc2734e26bc2c516bdcf7d87f5c7af6de21fb8c, not saving cache.
    
  4. sammcj commented on May 30, 2022

    @sammcj

    Can confirm this is still an issue.

    zstd is installed but:

    /bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/ec2-user/actions-runner/_work/my-repo/my-repo --files-from manifest.txt
    tar (child): zstd -T0: Cannot exec: No such file or directory
    tar (child): Error is not recoverable: exiting now
    
  5. kotewar commented on May 30, 2022

    @kotewar
    Contributor

    @sammcj - your error seems to be a different one as the file/directory doesn't exist at the first place. Can you please check if the path(s) that you have provided in your configuration exist?

  6. kotewar commented on May 30, 2022

    @kotewar
    Contributor

    @MatthieuLeboeuf, @dopplershift @cyberpwnn can you please share the path (or list of folders) used for caching and approximate cache size after compression in your respective repos when you came across this issue?

  7. dopplershift commented on Jun 1, 2022

    @dopplershift

    So for my failure, I'm caching ~/local. It's the build products from the PROJ library to save me from building later, so maybe a few MB?

  8. kotewar commented on Jun 6, 2022

    @kotewar
    Contributor

    @dopplershift thanks for sharing the path. The logs you have shared are not available anymore. Requesting you to please share the run if you come across the situation again.

  9. dopplershift commented on Jun 6, 2022

    @dopplershift

    It's been failing pretty consistently for the last 6 months, so I appreciate you taking a look. Here's the most recent failure from last night.

  10. kotewar commented on Jun 7, 2022

    @kotewar
    Contributor

    @dopplershift I am planning to release a fix (v3.0.4) today, I'll let you know once its available for testing.

  11. kotewar commented on Jun 7, 2022

    @kotewar
    Contributor

    v3.0.4 is out and the same can be used to test this issue (no need to change anything in the workflow, actions/cache@v3 will point to the latest changes).

    Do let us know if you come across the same problem again.

  12. kotewar commented on Jun 10, 2022

    @kotewar
    Contributor

    I am hoping the problem is resolved for all now. Hence closing the issue.

  13. dopplershift commented on Jun 12, 2022

    @dopplershift

    I can confirm that moving to @v3 fixes this particular issue for me.

    I'm having a different problem now where it can't find the cache (after successfully saving), but the fact that you can't list what caches are present it making debugging more than a little difficult. I'll open an issue if I can ever get my hands around it.

  14. added 3 commits that reference this issue on Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions