Skip to content

[5.1] Remote: Fix crashes by InterruptedException when dynamic execution is…#15091

Merged
Wyverald merged 1 commit intobazelbuild:release-5.1.0from
coeuvre:release-5.1.0
Mar 21, 2022
Merged

[5.1] Remote: Fix crashes by InterruptedException when dynamic execution is…#15091
Wyverald merged 1 commit intobazelbuild:release-5.1.0from
coeuvre:release-5.1.0

Conversation

@coeuvre
Copy link
Copy Markdown
Member

@coeuvre coeuvre commented Mar 21, 2022

… enabled.

Fixes #14433.

The root cause is, inside RemoteExecutionCache, the result of FindMissingDigests is shared with other threads without considering error handling. For example, if there are two or more threads uploading the same input and one thread got interrupted when waiting for the result of FindMissingDigests call, the call is cancelled and others threads still waiting for the upload will receive upload error due to the cancellation which is wrong.

This PR fixes this by effectively applying reference count to the result of FindMissingDigests call so that if one thread got interrupted, as long as there are other threads depending on the result, the call won't be cancelled and the upload can continue.

Closes #15001.

PiperOrigin-RevId: 436180205

Closes #14709.

Loading
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