Skip to content

[6.2][CAS] Delay CAS initialization on server side after daemon starts #11001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cachemeifyoucan
Copy link

  • Explanation: Delay CAS initialization in cc1depscan until after daemon is established so daemon can scan the CAS and recovery from any error if possible.
  • Scope: Avoid a dead-lock caused timeout when CAS is corrupted when building using a daemon based caching build.
  • Issues: rdar://155342429
  • Original PRs: [CAS] Delay CAS initialization on server side after daemon starts #10978
  • Risk: Low. This handles a corner cases when CAS is corrupted.
  • Testing: Unit test.
  • Reviewers: @benlangmuir

For auto CAS validation and recovery, it is important that server does
not open the CAS until daemon replies so daemon has the chance to
validate and recovery from broken CAS if needed. Otherwise, this is
going to be a dead lock on daemon waiting for server to close the CAS
before deletion.

rdar://155342429
(cherry picked from commit 4095d2d)
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner July 14, 2025 20:51
@cachemeifyoucan
Copy link
Author

@swift-ci please test

@cachemeifyoucan
Copy link
Author

@swift-ci please test windows platform

2 similar comments
@cachemeifyoucan
Copy link
Author

@swift-ci please test windows platform

@cachemeifyoucan
Copy link
Author

@swift-ci please test windows platform

@akyrtzi akyrtzi merged commit 0bbdf73 into swiftlang:swift/release/6.2 Jul 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants