Skip to content

Conversation

@glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Nov 25, 2025

Motivation:

The various 'withMumbleContinuation' APIs are supposed to be invoked synchronously with the caller. This assumption allows a lock to be acquired before the call and released from the body of the 'withMumbleContinuation' after e.g. storing the continuation. However this isn't the case and the job may be re-enqueued on the executor meaning that this is pattern is vulnerable to deadlocks.

Modifications:

  • Rework the test helpers to avoid holding a lock when a continuation is created.
  • Switch to using NIOLockedValue box

Result:

Lower chance of deadlock

Motivation:

The various 'withMumbleContinuation' APIs are supposed to be invoked
synchronously with the caller. This assumption allows a lock to be
acquired before the call and released from the body of the
'withMumbleContinuation' after e.g. storing the continuation. However
this isn't the case and the job may be re-enqueued on the executor
meaning that this is pattern is vulnerable to deadlocks.

Modifications:

- Rework the test helpers to avoid holding a lock when a continuation is
  created.
- Switch to using NIOLockedValue box

Result:

Lower chance of deadlock
@glbrntt glbrntt added the semver/none No version bump required. label Nov 25, 2025
@glbrntt glbrntt requested a review from fabianfett November 26, 2025 12:57
@glbrntt glbrntt enabled auto-merge (squash) November 26, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant