Skip to content

fix(worker): improve deadlock stack trace diagnostics - #2019

Open
g-seo wants to merge 1 commit into
temporalio:mainfrom
g-seo:fix/issue-722-deadlock-stacktrace
Open

g-seo wants to merge 1 commit into
temporalio:mainfrom
g-seo:fix/issue-722-deadlock-stacktrace

Conversation

@g-seo

@g-seo g-seo commented Oct 25, 2026

Copy link
Copy Markdown

Summary

Clarify deadlock failures when the workflow thread ID is unavailable, and verify stack trace capture for unsandboxed workflows.

Behavior

  • Add (no thread ID available) to the deadlock message when the workflow instance provides no thread ID.
  • Extend the unsandboxed deadlock test to assert that the workflow-task failure recorded in history contains the blocked workflow's stack frame.
  • Add focused coverage for the missing-thread-ID diagnostic.

Validation

  • PYTHONPATH=. .venv/bin/python -m pytest tests/worker/test_workflow.py -k workflow_deadlock -q — 5 passed, 243 deselected.
  • Editable Rust bridge build — passed.
  • uv run ruff check --select I and uv run ruff format --check — passed.
  • uv run pyright, uv run mypy --namespace-packages --check-untyped-defs ., and uv run basedpyright — passed.
  • uv run pydocstyle --ignore-decorators=overload, cargo fmt --check, and git diff --check — passed.

The full test suite and CI were not run. Poe the Poet was unavailable, so its underlying test, formatting, and lint commands were run directly.

Compatibility

No public API or workflow execution behavior changes. The deadlock message changes only when no thread ID is available; interruption and eviction behavior remain unchanged.

Closes #722

@g-seo
g-seo requested a review from a team as a code owner October 25, 2026 06:15
@CLAassistant

CLAassistant commented Oct 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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.

[Feature Request] Stack trace on deadlock exception improvements

2 participants