Restore Cache - Error validating cache

I have a project that saves and restores 2 caches. 1 of them works as expected while the other reports:

Error validating cache: Error listing tarball /tmp/cache632340460: exit status 2

Both caches are located within $HOME and I’m not really sure why one would work while the other would fail. What information would be useful in figuring this out? My project uses a machine executor rather than docker, for what it’s worth, and the data being cached/restored for both caches are coming from/going to directories mounted as volumes in docker.

Hi @moorecp, welcome to the CircleCI Discuss community! Without looking at your build, here are a few things I can think of:

Usually, the save_cache function skips when the same cache-key already stored. If your workflow is using parallelism, It’s better to separate the cache step to another job to avoid this.

If you are using docker-compose with the machine executor, the vendor folder has root permissions. Since the user of machine executor is a CircleCI user, could you try changing it to the root owner and see if you continue to experience this error?