temporalio / temporalio/sdk-typescript

[Bug] Nondeterminism error: Invalid transition while handling update response in state Accepted

Open
#1,966 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
917
Forks
224
Avg merge
3d 16h
Merged PRs (30d)
43

Description

Nondeterminism error occurred and was captured in logs. Workflow executed successfully and there is no evidence of any WFT failing or being retried.

Describe the bug

The error happens between workflow tasks in the event history, i.e. there is a 9 minute gap between WFTs when this error was reported.

On the failed replay attempt, lang is sending the Update Accepted and Start Timer commands twice for the same update instance. Comparing this to wf history, there should be only one Accepted + StartTimer(7) (i.e. no timer 8 at that point).

"completion": "WorkflowActivationCompletion(
     run_id: 019cc51e-4207-706d-941f-33fbc2e29ea2,
     status: Success(
       UpdateResponse(
         protocol_instance_id: 108c0439-970d-46bc-8cd5-174ff155b7f1,
         response: Some(Accepted(()))
       )
       StartTimer(7)
       UpdateResponse(        // <------ This one is totally unexpected
         protocol_instance_id: 108c0439-970d-46bc-8cd5-174ff155b7f1,
         response: Some(Accepted(()))
       )
       StartTimer(8)
     )
)",
Minimal Reproduction

So far this seems to be a one off event.

Environment/Versions
  • OS and processor: ?
  • Temporal Version: Typescript 1.15.0
  • Temporal Cloud
Additional context

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

No source file, test, or entry point is named. Start by examining the logged WorkflowActivationCompletion and comparing the replay event history around the nine-minute gap, focusing on the repeated Update Accepted response and StartTimer commands. Done means identifying a reproducible cause or a confirmed reason the duplicate commands cannot occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.