Skip to content

Getting cache sometimes fails badly (networking issue?) #265

Closed

Description

@pjoe

We've seen a number of times where getting the cache times out in the middle and leaves a broken half loaded state on disk, which then breaks later build steps.

We have cached our Nuget packages (~465MB) which normally takes <40s to get, but we have seen builds that look like this:

 Cache nuget packages 8m 25s
[warning]Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1. Ensure BSD tar is installed and on the PATH.
Run actions/cache@v1
  with:
    path: ./Application/Global_Packages
    key: nuget-9ba1da79af128a202f3911ac3c9ae20a509436c87659857fff704f55c96ba435
  env:
    AZURE_STORAGE_CONNECTION_STRING: ***
Cache Size: ~248 MB (260292608 B)
C:\windows\System32\tar.exe -xz -f D:\a\_temp\cc4c4b3b-d2f1-47f3-8af2-e3b64f27c2bb\cache.tgz -C D:\a\tms\tms\Application\Global_Packages
./Moq.Delegates.4.0.10827.1/lib/net40/Moq.pdb: truncated gzip input
tar.exe: Error exit delayed from previous errors.
[warning]Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1. Ensure BSD tar is installed and on the PATH.

From private repo: https://github.com/TIMEmSYSTEM/tms/runs/592232032?check_suite_focus=true#step:3:11

What is even worse is that the cache step looks to complete successfully, so build happily continues until the step that uses the cached files, which are only partly on disk, and some even seem to be corrupt :(

For reference here is how it looks when it works:

Cache nuget packages 39s
Cache restored from key: nuget-9ba1da79af128a202f3911ac3c9ae20a509436c87659857fff704f55c96ba435
Run actions/cache@v1
with:
path: ./Application/Global_Packages
key: nuget-9ba1da79af128a202f3911ac3c9ae20a509436c87659857fff704f55c96ba435
env:
AZURE_STORAGE_CONNECTION_STRING: ***
Cache Size: ~466 MB (488209026 B)
C:\windows\System32\tar.exe -xz -f D:\a\_temp\3fa6417c-8a88-4487-a821-3d0f58e5caac\cache.tgz -C D:\a\tms\tms\Application\Global_Packages
Cache restored from key: nuget-9ba1da79af128a202f3911ac3c9ae20a509436c87659857fff704f55c96ba435

This could be related to #198 and #257

For reference here is the relevant part of our workflow file:

name: CI

on: [push]

jobs:
  build:
    runs-on: windows-2019
    env:
      AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}

    steps:
      - uses: actions/checkout@v2
      - name: Cache nuget packages
        uses: actions/cache@v1
        with:
          path: ./Application/Global_Packages
          key: nuget-${{ hashFiles('**/packages.config') }}

For now our workaround has been to re-run the build until it goes through, but that is a PITA 😟

Activity

  1. dhadka commented on Apr 20, 2020

    @dhadka
    Contributor

    Thanks for reporting this. We are aware of the issue. Given a few issues have been opened reporting this problem, I've created a "catch all" issue to track the investigation and mitigation: #267

  2. joshmgross commented on May 29, 2020

    @joshmgross
    Contributor

    Closing this issue as #267 is tracking the investigation and mitigation.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions