Skip to content

Conversation

@bazel-io
Copy link
Member

The call to RemoteActionFileSystem#getInputStream in RemotePathChecker#isRemote could 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

…uild#28416)

The call to `RemoteActionFileSystem#getInputStream` in `RemotePathChecker#isRemote` could 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 bazelbuild#28408

Closes bazelbuild#28416.

PiperOrigin-RevId: 862135346
Change-Id: Ic6a0b190be8f4769788078afe481496996f82013
@bazel-io bazel-io requested a review from a team as a code owner January 28, 2026 10:39
@bazel-io bazel-io added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Jan 28, 2026
@bazel-io bazel-io requested a review from coeuvre January 28, 2026 10:39
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses a potential deadlock in RemotePathChecker when using a disk cache. The change from a synchronous, blocking call to an asynchronous one using ListenableFuture is well-implemented and correctly resolves the issue. The related changes to RemoteActionFileSystem and RemoteExecutionCache are necessary adaptations to the new asynchronous pattern. The renaming of isRemote to isAvailableLocally also improves code clarity. The added test coverage for disk cache scenarios is a valuable addition. The overall implementation is solid and I have no further suggestions.

@iancha1992 iancha1992 enabled auto-merge January 28, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants