actions / actions/cache

The process '/usr/bin/tar' failed with exit code 1 -- file changed as we read it

Open
#1,522 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

There is not a clear approach on how to work around this or force it to tar up the files.

I've tried force killing the running process before calling actions/cache/save and it complains files are being changed. I don't understand how best to debug this but seems like with the compression program used.

There needs to be a verbose option to see what's happening under the hood to better understand why this fails the workflow.

/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/github/actions-runner/_work/artifacts --files-from manifest.txt --use-compress-program zstdmt
/usr/bin/tar: artifacts/: file changed as we read it
Warning: Failed to save: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 1
Warning: Cache save failed.

Configuration used:

    - name: Save ${{ matrix.target }} Corpus
      if: always()
      uses: actions/cache/save@v4.2.0
      with:
        path: ${{ github.workspace }}/artifacts
        key: ${{ matrix.target }}-corpus-${{ github.run_id }}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the actions/cache/save workflow with the shown path and command, then inspect the tar output around manifest.txt and the reported artifacts/ change. Compare the failure with the requested verbose diagnostics and define done as making the cache-save failure explainable or reliably handled when files change during archiving.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.