[9.0.1] Fix a deadlock in RemotePathChecker when using a disk cache (https://github.com/bazelbuild/bazel/pull/28416)
#28465
+80
−56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The call to
RemoteActionFileSystem#getInputStreaminRemotePathChecker#isRemotecould result in a deadlock since it is executed on the same executor that is also used to prefetch the file from the disk cache.This is fixed by replacing the blocking call with a future. Along the way the method is renamed to avoid confusion due to two different meanings of "remote" (not being available in the disk cache vs. not being materialized at the exec path).
Fixing this bug makes it possible to run all BwoB tests with disk cache.
Related to #28408
Closes #28416.
PiperOrigin-RevId: 862135346
Change-Id: Ic6a0b190be8f4769788078afe481496996f82013
Commit 55e4aac