You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cached data restored from Rust's Cargo build is corrupted #403
It seems that file target/debug/deps/libserde_derive-797b01cb80d42716.dylib restored from cache is corrupted.
Reacted by evandrocoan, Jacob Pratt, Alberto Leal, Matt Kantor, Vitaliy, Thomas McGuire, Frederick Zhang, Leszek Zalewski, David D. Riddle, konsti and 2 more
I'm stumped. Depending on what sequence of commands I run before creating the tar, the problem seems to magically disappear. I was also thinking that perhaps the Actions runner or Cargo was causing the files to be modified after the build/test step ends, so I looked at the last modified time as well as open file handles (lsof) and don't see anything suggesting the files are being modified during or after creation of the tar.
@zonyitoo Since all the files impacted seem to be in target, I'm wondering if you can exclude that from the cache. Do you still see a speedup benefit?
@zonyitoo Forcing the Mac runner to use GNU tar instead of BSD tar seems to fix the issue. Please consider using this as a workaround until we can devise a more permanent solution. It adds about 10-15 seconds to install GNU tar, but the savings from skipping the build greatly outweighs this.
Activity
dhadka commentedon Aug 20, 2020
@zonyitoo Thanks for reporting this, I'm forking the affected repo and taking a look.
dhadka commentedon Aug 20, 2020
I created a fork and modified the workflow file to create and extract the tar, without involving the cache. From the run here - https://github.com/dhadka/shadowsocks-rust/runs/1009714459?check_suite_focus=true, the checksum before tarring is:
and after extracting is:
The checksums are identical for all except for
target/debug/deps/libserde_derive-38c0c362558a2b3b.dylib.dhadka commentedon Aug 21, 2020
This one is weird. There's actually a number of files with changing checksums:
You can see these results here - https://github.com/dhadka/shadowsocks-rust/runs/1010226166?check_suite_focus=true
What makes it really weird...if I add
sleep 10aftercargo testand before creating thetar, it works fine. Change, Run Outputdhadka commentedon Aug 21, 2020
I'm stumped. Depending on what sequence of commands I run before creating the tar, the problem seems to magically disappear. I was also thinking that perhaps the Actions runner or Cargo was causing the files to be modified after the build/test step ends, so I looked at the last modified time as well as open file handles (
lsof) and don't see anything suggesting the files are being modified during or after creation of thetar.@zonyitoo Since all the files impacted seem to be in
target, I'm wondering if you can exclude that from the cache. Do you still see a speedup benefit?dae commentedon Aug 21, 2020
target contains all the Rust build products - without it compilation would have to start from scratch
Our repo seems to be hitting the same issue - it's been cropping up sporadically for the last couple of months, and we've been having to bust the cache each time: https://github.com/ankitects/anki/runs/1010643070
Revert "Merge pull request #729 from evandroforks/upload_rslib_artifa…
attempt to work around actions/cache#403
dhadka commentedon Aug 21, 2020
@zonyitoo Forcing the Mac runner to use GNU tar instead of BSD tar seems to fix the issue. Please consider using this as a workaround until we can devise a more permanent solution. It adds about 10-15 seconds to install GNU tar, but the savings from skipping the build greatly outweighs this.
Code change: https://github.com/dhadka/shadowsocks-rust/pull/1
Test run: https://github.com/dhadka/shadowsocks-rust/pull/1/checks
CC @dae
dae commentedon Aug 21, 2020
Thanks, will give that a go and let you know if it comes back.
(Ignore the failure below, I used the wrong package name)
try gnu tar workaround for CI cache
zonyitoo commentedon Aug 22, 2020
Thanks!
Workaround for restoring cache from action/cache getting corrupted
55 remaining items
Re-enable cache on macOS
Unskip more macOS tests in CI (#2584)
sourcefrog commentedon Sep 20, 2021
This seems to have been incidentally fixed in
cache@v2which seems to always usegtar.github-actions commentedon May 7, 2022
This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.
github-actions commentedon May 17, 2022
This issue was closed because it has been inactive for 5 days since being marked as stale.
Auto merge of #2565 - RalfJung:ci, r=RalfJung
Remove gtar actions/cache workaround
GitHub Actions: improve macOS releases (crytic#527)
fix(research): tighten R10 A4.5 case sensitivity and A0 drift statement