Skip to content

Use configured deadlock timeout in error message#2419

Closed
kritibehl wants to merge 1 commit into
temporalio:mainfrom
kritibehl:fix-deadlock-timeout-message
Closed

Use configured deadlock timeout in error message#2419
kritibehl wants to merge 1 commit into
temporalio:mainfrom
kritibehl:fix-deadlock-timeout-message

Conversation

@kritibehl

Copy link
Copy Markdown
Contributor

What was changed

This PR updates the workflow deadlock detection error message to report the configured deadlock detection timeout instead of always saying “a second”.

Specifically, the deadlock message now formats the timeout value passed into the coroutine execution path, so non-default DeadlockDetectionTimeout values are reflected in the emitted error.

A regression test was added with a non-default timeout to verify that the error message includes the configured duration.

Why?

The deadlock detector already uses the configured timeout when deciding when to trigger. However, the error message was still hardcoded to say the workflow goroutine did not yield for over “a second”.

This could be misleading when users configure a different deadlock detection timeout.

Checklist

  1. Closes Hardcoded deadlock timeout in error message can be misleading #2418

  2. How was this tested:

  • go test ./internal -run 'TestDeadlockDetectorAndAwaitRace|TestDeadlockDetectorUsesConfiguredTimeoutInMessage|TestDeadlockDetectorStackTrace' -count=1
  • go test ./internal -run 'TestDeadlockDetectorUsesConfiguredTimeoutInMessage' -count=5
  • go test ./internal -run 'TestDeadlockDetector' -count=1
  • go test ./internal -count=1
  1. Any docs updates needed?

No docs updates needed. This only updates the internal deadlock error message to reflect the configured timeout.

@kritibehl kritibehl requested a review from a team as a code owner June 25, 2026 20:31
@yuandrew yuandrew closed this Jul 6, 2026
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.

Hardcoded deadlock timeout in error message can be misleading

2 participants