temporalio / temporalio/sdk-python

[Feature Request] Stack trace on deadlock exception improvements

Open
#722 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.2k
Forks
241
Avg merge
3d 21h
Merged PRs (30d)
55

Description

Describe the solution you'd like

https://github.com/temporalio/sdk-python/pull/626 added a stack traces from the deadlocking thread, but there are three improvements we need to make to make sure this is working properly:

  1. Make this also work for users that have opted out of sandboxing (if, as suspected reading the PR, it doesn't actually work already)
  2. Add a test to confirm the deadlock stack trace represents (couldn't see such a test in the PR)
  3. We append (no frames available) or (failed getting frames: {err}) when we couldn't capture the threads trace, but we should also add something like (no thread ID available) if the earlier condition occurs where for some reason we don't have a thread ID at all.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PR #626 and the deadlock exception implementation it introduced. Check the behavior with sandboxing disabled, add a test that validates the captured deadlocking-thread stack trace, and cover the missing-thread-ID message. Done means all three cases produce the requested diagnostic output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.