Skip to content

Fix a self-deadlock in HostOffloadBackend's remote-write completion. - #1031

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_986211272
Sep 24, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_986211272

Conversation

@copybara-service

Copy link
Copy Markdown

Fix a self-deadlock in HostOffloadBackend's remote-write completion.

In BeginWriteRemote, release lifetime->mu before registering poll_future.OnReady
and use ReaderMutexLock in both callbacks.

Previously, registering OnReady while holding lifetime->mu deadlocked whenever poll_future was already resolved by the time OnReady was called (either because the PollWriteRemote RPC completed quickly or because client resolution failed synchronously), causing OnReady to run inline on the same thread and re-acquire lifetime->mu.

@google-cla

google-cla Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_986211272 branch 2 times, most recently from c701088 to c32d310 Compare September 24, 2026 05:54
In BeginWriteRemote, release lifetime->mu before registering poll_future.OnReady
and use ReaderMutexLock in both callbacks.

Previously, registering OnReady while holding lifetime->mu deadlocked whenever poll_future was already resolved by the time OnReady was called (either because the PollWriteRemote RPC completed quickly or because client resolution failed synchronously), causing OnReady to run inline on the same thread and re-acquire lifetime->mu.

PiperOrigin-RevId: 987268928
@copybara-service
copybara-service Bot merged commit f65108d into main Sep 24, 2026
1 check failed
@copybara-service
copybara-service Bot deleted the test_986211272 branch September 24, 2026 06:35
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.

0 participants