Skip to content

fix: ensure deadlock errors in futures fail workflow task immediately#467

Merged
chris-olszewski merged 2 commits into
mainfrom
olszewski/fix_gh_464
Jun 17, 2026
Merged

fix: ensure deadlock errors in futures fail workflow task immediately#467
chris-olszewski merged 2 commits into
mainfrom
olszewski/fix_gh_464

Conversation

@chris-olszewski

Copy link
Copy Markdown
Member

What was changed

If a Workflow::Future fails from a DeadlockError, now immediately raise the error instead of storing it until the future is waited upon.

This is done by a special marker mixin on the DeadlockError exception.

Why?

Previously if a DeadlockError was thrown in a Workflow::Future it would not trigger a WFT failure until the future was waited upon. This could lead to a workflow task completion with a incomplete list of commands emitted. If the history was then replayed on a worker that didn't have CPU contention and didn't trigger the deadlock detector a NDE error would be thrown.

Checklist

  1. Addresses [Bug] Sync primitives can lead to un-replayable workflow history. #464

  2. How was this tested:
    Added new test that triggers a deadlock detection error in a future.

  3. Any docs updates needed?
    N/A

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense to me. Good find!

Comment thread temporalio/test/deadlock_test.rb Outdated
@chris-olszewski chris-olszewski merged commit 11dc8db into main Jun 17, 2026
8 checks passed
@chris-olszewski chris-olszewski deleted the olszewski/fix_gh_464 branch June 17, 2026 17:19
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