A workflow containing a timer encounters an error after the worker restarting

Hi, I encountered an error while using Temporal in my Go language project.

  • The Temporal server version is 2.28.0.
  • The Temporal SDK version is v1.26.1.

Execution Process

  1. Start a worker.
  2. Execute the workflow, which creates a timer and waits.
  3. Stop the worker and restart it.
  4. When the timer fired, an error message indicating workflowTaskFailed event will appear.

Error log

{
  "message": "[TMPRL1100] unknown command CommandType: Timer, ID: 17, possible causes are nondeterministic workflow definition code or incompatible change in the workflow definition",
  "source": "GoSDK",
  "stackTrace": "process event for order_matching_task_queue [panic]:\ngo.temporal.io/sdk/internal.panicIllegalState(...)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:440\ngo.temporal.io/sdk/internal.(*commandsHelper).getCommand(0xc00658e080, {0x4, {0xc006655728, 0x2}})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:929 +0x3a5\ngo.temporal.io/sdk/internal.(*commandsHelper).handleTimerStarted(0x1f08f841348?, {0xc006655728?, 0xc000601008?})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:1385 +0x25\ngo.temporal.io/sdk/internal.(*workflowExecutionEventHandlerImpl).ProcessEvent(0xc006588108, 0xc0066aae70, 0xa0?, 0x0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_event_handlers.go:1175 +0x3f1\ngo.temporal.io/sdk/internal.(*workflowExecutionContextImpl).ProcessWorkflowTask(0xc006598000, 0xc0066aced0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_handlers.go:1100 +0x1608\ngo.temporal.io/sdk/internal.(*workflowTaskHandlerImpl).ProcessWorkflowTask(0xc0042f0000, 0xc0066aced0, 0xc006598000, 0xc00658a5a0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_handlers.go:889 +0x3c5\ngo.temporal.io/sdk/internal.(*workflowTaskPoller).processWorkflowTask(0xc00391c240, 0xc0066aced0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_pollers.go:357 +0x3c3\ngo.temporal.io/sdk/internal.(*workflowTaskPoller).ProcessTask(0xc00391c240, {0x1adcba0, 0xc0066aced0})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_pollers.go:321 +0x78\ngo.temporal.io/sdk/internal.(*baseWorker).processTask(0xc0043ba160, {0x1add6e0, 0xc0066a8780})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:518 +0x153\ngo.temporal.io/sdk/internal.(*baseWorker).processTaskAsync.func1()\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:369 +0x45\ncreated by go.temporal.io/sdk/internal.(*baseWorker).processTaskAsync in goroutine 71\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:365 +0xa5",
  "applicationFailureInfo": {
    "type": "PanicError",
    "nonRetryable": true
  }
}

Self-diagnosis Information

When locating the (*commandsHelper).getCommand method in internal/internal_command_state_machine, I found that in h.commands, there exists a CommandType: Activity with ID: 17, but the commandID that needs to be retrieved is CommandType: Timer with the same ID 17. The IDs are the same, but the types are different.

My question is how to avoid this error after a restart?

Looking forward to your answer. Thanks!

Make sure that the workflow code is deterministic. See Core application - Go SDK | Temporal Platform Documentation

I will provide a workflow history, hoping it will be helpful in identifying the cause of the issue.

{
  "events": [
    {
      "eventId": "1",
      "eventTime": "2024-10-23T08:26:48.775296900Z",
      "eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED",
      "taskId": "20971758",
      "workflowExecutionStartedEventAttributes": {
        "workflowType": {
          "name": "OrderWorkflowWaitingMatching"
        },
        "parentWorkflowNamespace": "default",
        "parentWorkflowNamespaceId": "c70ccd65-aea9-45b7-bf93-2697cab7dac1",
        "parentWorkflowExecution": {
          "workflowId": "order-workflow-test-apply-id-cscb6ehre9f60a0cvcfg",
          "runId": "294b9c7f-b308-47ac-9b39-56aee9873aec"
        },
        "parentInitiatedEventId": "23",
        "taskQueue": {
          "name": "order_matching_task_queue",
          "kind": "TASK_QUEUE_KIND_NORMAL"
        },
        "input": {
          "payloads": [
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "InRlc3QtYXBwbHktaWQi"
            },
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "ImNzY2I2ZWhyZTlmNjBhMGN2Y2ZnIg=="
            }
          ]
        },
        "workflowExecutionTimeout": "0s",
        "workflowRunTimeout": "0s",
        "workflowTaskTimeout": "10s",
        "originalExecutionRunId": "b2b870a3-33bb-487e-abf2-26204069618e",
        "firstExecutionRunId": "b2b870a3-33bb-487e-abf2-26204069618e",
        "attempt": 1,
        "firstWorkflowTaskBackoff": "0s",
        "header": {},
        "workflowId": "match-waiting-workflow-test-apply-id-cscb6ehre9f60a0cvcfg",
        "rootWorkflowExecution": {
          "workflowId": "order-workflow-test-apply-id-cscb6ehre9f60a0cvcfg",
          "runId": "294b9c7f-b308-47ac-9b39-56aee9873aec"
        }
      }
    },
    {
      "eventId": "2",
      "eventTime": "2024-10-23T08:26:48.786515400Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
      "taskId": "20971768",
      "workflowTaskScheduledEventAttributes": {
        "taskQueue": {
          "name": "order_matching_task_queue",
          "kind": "TASK_QUEUE_KIND_NORMAL"
        },
        "startToCloseTimeout": "10s",
        "attempt": 1
      }
    },
    {
      "eventId": "3",
      "eventTime": "2024-10-23T08:26:48.801773800Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
      "taskId": "20971774",
      "workflowTaskStartedEventAttributes": {
        "scheduledEventId": "2",
        "identity": "25240@JYM-HpZhanX@",
        "requestId": "456dc1b3-8f9a-4e47-969a-225a254f0b2f",
        "historySizeBytes": "638",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "4",
      "eventTime": "2024-10-23T08:26:48.812868600Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
      "taskId": "20971781",
      "workflowTaskCompletedEventAttributes": {
        "scheduledEventId": "2",
        "startedEventId": "3",
        "identity": "25240@JYM-HpZhanX@",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        },
        "sdkMetadata": {
          "langUsedFlags": [
            3
          ],
          "sdkName": "temporal-go",
          "sdkVersion": "1.26.1"
        },
        "meteringMetadata": {}
      }
    },
    {
      "eventId": "5",
      "eventTime": "2024-10-23T08:26:48.812868600Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED",
      "taskId": "20971782",
      "activityTaskScheduledEventAttributes": {
        "activityId": "5",
        "activityType": {
          "name": "OrderInfoActivity"
        },
        "taskQueue": {
          "name": "order_matching_task_queue",
          "kind": "TASK_QUEUE_KIND_NORMAL"
        },
        "header": {},
        "input": {
          "payloads": [
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "InRlc3QtYXBwbHktaWQi"
            },
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "ImNzY2I2ZWhyZTlmNjBhMGN2Y2ZnIg=="
            }
          ]
        },
        "scheduleToCloseTimeout": "60s",
        "scheduleToStartTimeout": "60s",
        "startToCloseTimeout": "60s",
        "heartbeatTimeout": "0s",
        "workflowTaskCompletedEventId": "4",
        "retryPolicy": {
          "initialInterval": "1s",
          "backoffCoefficient": 2,
          "maximumInterval": "100s"
        },
        "useWorkflowBuildId": true
      }
    },
    {
      "eventId": "6",
      "eventTime": "2024-10-23T08:26:48.824698100Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED",
      "taskId": "20971789",
      "activityTaskStartedEventAttributes": {
        "scheduledEventId": "5",
        "identity": "25240@JYM-HpZhanX@",
        "requestId": "4fbc4cf6-9d21-4a37-94b4-62e4612a11ad",
        "attempt": 1,
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "7",
      "eventTime": "2024-10-23T08:26:49.062583600Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED",
      "taskId": "20971790",
      "activityTaskCompletedEventAttributes": {
        "result": {
          "payloads": [
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "eyJBcHBseSI6eyJJZCI6InRlc3QtYXBwbHktaWQiLCJDcmVhdGVkQXQiOiIyMDI0LTEwLTIzVDE2OjI2OjM0LjgzODk4OSswODowMCIsIlVwZGF0ZWRBdCI6IjIwMjQtMTAtMjNUMTY6MjY6MzQuODM4OTg5KzA4OjAwIiwiRGVsZXRlZEF0IjpudWxsLCJWZXJzaW9uIjoxLCJTZW5kVXNlcklkIjoiY3E4OHVnbTBlZzVqYnFnNWVmdjAiLCJTZW5kVXNlckdwcyI6WzEwOS41MTkyOCwxOC4yNzYxNjNdLCJUeXBlIjoicmVhbF90aW1lIiwiU3RhdHVzIjoib3JkZXJfbWF0Y2hpbmciLCJUb3RhbFByaWNlIjoiMjAuMiIsIlByaWNlIjoiMjAiLCJTZXJ2aWNlUHJpY2UiOiIwLjIiLCJUcmFkZU5vIjoiIiwiRW1wbG95ZXJJZCI6IiIsIlRyYW5zYWN0aW9uSWQiOiIiLCJDcmVhdGVUaW1lIjpudWxsLCJQYXlUaW1lIjpudWxsLCJDbG9zZVRpbWUiOm51bGwsIlNlbmRVc2VyTW9kZSI6ImVtcGxveWVyX3BlcnNvbiIsIlBheVR5cGUiOiIiLCJTZW5kVXNlckFkZHIiOiLmtbfljZfnnIHkuInkuprluILlkInpmLPljLrmnIjlhYnot68iLCJTZW5kVXNlckFkZHJOYW1lIjoi5r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QiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiIsIlVwZGF0ZWRBdCI6IjAwMDEtMDEtMDFUMDA6MDA6MDBaIiwiRGVsZXRlZEF0IjpudWxsLCJWZXJzaW9uIjpudWxsLCJKb2JJZCI6IiIsIkV4dHJhV29ya1RpbWUiOjAsIlN0YXR1cyI6IiIsIlN0YXJ0VGltZSI6bnVsbCwiRW5kVGltZSI6bnVsbCwiUGF5VGltZSI6bnVsbCwiQ2xvc2VUaW1lIjpudWxsLCJUcmFuc2FjdGlvbklkIjoiIiwiUGF5VHlwZSI6IiIsIlRyYWRlTm8iOiIiLCJQcmljZSI6IjAifX0="
            }
          ]
        },
        "scheduledEventId": "5",
        "startedEventId": "6",
        "identity": "25240@JYM-HpZhanX@"
      }
    },
    {
      "eventId": "8",
      "eventTime": "2024-10-23T08:26:49.062583600Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
      "taskId": "20971791",
      "workflowTaskScheduledEventAttributes": {
        "taskQueue": {
          "name": "JYM-HpZhanX:52e8df8d-4cb1-497e-b337-503cf76f8e9f",
          "kind": "TASK_QUEUE_KIND_STICKY",
          "normalName": "order_matching_task_queue"
        },
        "startToCloseTimeout": "10s",
        "attempt": 1
      }
    },
    {
      "eventId": "9",
      "eventTime": "2024-10-23T08:26:49.075388500Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
      "taskId": "20971795",
      "workflowTaskStartedEventAttributes": {
        "scheduledEventId": "8",
        "identity": "25240@JYM-HpZhanX@",
        "requestId": "aae44e80-2b94-4d83-bfff-1a242578d2d2",
        "historySizeBytes": "6170",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "10",
      "eventTime": "2024-10-23T08:26:49.083443800Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
      "taskId": "20971799",
      "workflowTaskCompletedEventAttributes": {
        "scheduledEventId": "8",
        "startedEventId": "9",
        "identity": "25240@JYM-HpZhanX@",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        },
        "sdkMetadata": {},
        "meteringMetadata": {}
      }
    },
    {
      "eventId": "11",
      "eventTime": "2024-10-23T08:26:49.083443800Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED",
      "taskId": "20971800",
      "activityTaskScheduledEventAttributes": {
        "activityId": "11",
        "activityType": {
          "name": "UpdateInfoActivity"
        },
        "taskQueue": {
          "name": "order_matching_task_queue",
          "kind": "TASK_QUEUE_KIND_NORMAL"
        },
        "header": {},
        "input": {
          "payloads": [
            {
              "metadata": {
                "encoding": "anNvbi9wbGFpbg=="
              },
              "data": "eyJBcHBseSI6bnVsbCwiU2VuZCI6eyJJZCI6ImNzY2I2ZWhyZTlmNjBhMGN2Y2ZnIiwiQ3JlYXRlZEF0IjoiMDAwMS0wMS0wMVQwMDowMDowMFoiLCJVcGRhdGVkQXQiOiIwMDAxLTAxLTAxVDAwOjAwOjAwWiIsIkRlbGV0ZWRBdCI6bnVsbCwiVmVyc2lvbiI6bnVsbCwib3JkZXJBcHBseUlkIjoiIiwicHJpY2UiOiIwIiwib3JpZ2luYWxQcmljZSI6IjAiLCJzdGF0dXMiOiIiLCJqb2JJZCI6IiIsImlzUGVuYWxpemVkIjowLCJFbXBsb3llZUlkIjoiIiwiU3RhcnRUaW1lIjpudWxsLCJFbmRUaW1lIjpudWxsLCJDYW5jZWxlZEF0IjpudWxsLCJDYW5jZWxSZWFzb24iOiIiLCJJc0V2YWx1YXRlZCI6MCwiU2VydmljZVByaWNlIjoiMCIsIldvcmtmbG93SWQiOiIiLCJSdW5JZCI6IiIsIkNoaWxkV29ya2Zsb3dJZCI6Im1hdGNoLXdhaXRpbmctd29ya2Zsb3ctdGVzdC1hcHBseS1pZC1jc2NiNmVocmU5ZjYwYTBjdmNmZyIsIkNoaWxkUnVuSWQiOiJiMmI4NzBhMy0zM2JiLTQ4N2UtYWJmMi0yNj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wMVQwMDowMDowMFoiLCJEZWxldGVkQXQiOm51bGwsIlZlcnNpb24iOm51bGwsIk9yZGVyUmVjZWl2ZUlkIjoiIiwiT3JkZXJTZW5kSWQiOiIiLCJPcmRlckFwcGx5SWQiOiIiLCJQcmljZSI6IjAiLCJQYXlUaW1lIjpudWxsLCJDbG9zZVRpbWUiOm51bGwsIlN0YXR1cyI6IiIsIlRyYW5zYWN0aW9uSWQiOiIiLCJQYXlUeXBlIjoiIiwiVHJhZGVObyI6IiIsIk9yZGVyUmVjZWl2ZSI6bnVsbCwiT3JkZXJTZW5kIjpudWxsLCJPcmRlckFwcGx5IjpudWxsfSwiSm9iIjpudWxsfSwiUmVjZWl2ZSI6bnVsbCwiVXNlckdlbyI6bnVsbCwiSm9iIjpudWxsLCJKb2JFeHQiOm51bGx9"
            }
          ]
        },
        "scheduleToCloseTimeout": "60s",
        "scheduleToStartTimeout": "60s",
        "startToCloseTimeout": "60s",
        "heartbeatTimeout": "0s",
        "workflowTaskCompletedEventId": "10",
        "retryPolicy": {
          "initialInterval": "1s",
          "backoffCoefficient": 2,
          "maximumInterval": "100s"
        },
        "useWorkflowBuildId": true
      }
    },
    {
      "eventId": "12",
      "eventTime": "2024-10-23T08:26:49.090362Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED",
      "taskId": "20971806",
      "activityTaskStartedEventAttributes": {
        "scheduledEventId": "11",
        "identity": "25240@JYM-HpZhanX@",
        "requestId": "fa12df5c-0633-465d-b127-d95c72113694",
        "attempt": 1,
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "13",
      "eventTime": "2024-10-23T08:26:49.162297600Z",
      "eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED",
      "taskId": "20971807",
      "activityTaskCompletedEventAttributes": {
        "scheduledEventId": "11",
        "startedEventId": "12",
        "identity": "25240@JYM-HpZhanX@"
      }
    },
    {
      "eventId": "14",
      "eventTime": "2024-10-23T08:26:49.162297600Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
      "taskId": "20971808",
      "workflowTaskScheduledEventAttributes": {
        "taskQueue": {
          "name": "JYM-HpZhanX:52e8df8d-4cb1-497e-b337-503cf76f8e9f",
          "kind": "TASK_QUEUE_KIND_STICKY",
          "normalName": "order_matching_task_queue"
        },
        "startToCloseTimeout": "10s",
        "attempt": 1
      }
    },
    {
      "eventId": "15",
      "eventTime": "2024-10-23T08:26:49.169851500Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
      "taskId": "20971812",
      "workflowTaskStartedEventAttributes": {
        "scheduledEventId": "14",
        "identity": "25240@JYM-HpZhanX@",
        "requestId": "8a00a7c9-41b1-403a-9b8e-f34d054ae913",
        "historySizeBytes": "8448",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "16",
      "eventTime": "2024-10-23T08:26:49.179021100Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
      "taskId": "20971816",
      "workflowTaskCompletedEventAttributes": {
        "scheduledEventId": "14",
        "startedEventId": "15",
        "identity": "25240@JYM-HpZhanX@",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        },
        "sdkMetadata": {},
        "meteringMetadata": {}
      }
    },
    {
      "eventId": "17",
      "eventTime": "2024-10-23T08:26:49.179021100Z",
      "eventType": "EVENT_TYPE_TIMER_STARTED",
      "taskId": "20971817",
      "timerStartedEventAttributes": {
        "timerId": "17",
        "startToFireTimeout": "117.531284900s",
        "workflowTaskCompletedEventId": "16"
      }
    },
    {
      "eventId": "18",
      "eventTime": "2024-10-23T08:28:46.726059300Z",
      "eventType": "EVENT_TYPE_TIMER_FIRED",
      "taskId": "20971820",
      "timerFiredEventAttributes": {
        "timerId": "17",
        "startedEventId": "17"
      }
    },
    {
      "eventId": "19",
      "eventTime": "2024-10-23T08:28:46.733078800Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
      "taskId": "20971821",
      "workflowTaskScheduledEventAttributes": {
        "taskQueue": {
          "name": "JYM-HpZhanX:52e8df8d-4cb1-497e-b337-503cf76f8e9f",
          "kind": "TASK_QUEUE_KIND_STICKY",
          "normalName": "order_matching_task_queue"
        },
        "startToCloseTimeout": "10s",
        "attempt": 1
      }
    },
    {
      "eventId": "20",
      "eventTime": "2024-10-23T08:28:46.740082100Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
      "taskId": "20971825",
      "workflowTaskStartedEventAttributes": {
        "scheduledEventId": "19",
        "identity": "16828@JYM-HpZhanX@",
        "requestId": "90295bd6-a89f-47fa-9a90-062b8651b743",
        "historySizeBytes": "8854",
        "workerVersion": {
          "buildId": "5e4efe030bb177ed5afa5533417de3d6"
        }
      }
    },
    {
      "eventId": "21",
      "eventTime": "2024-10-23T08:28:46.757679100Z",
      "eventType": "EVENT_TYPE_WORKFLOW_TASK_FAILED",
      "taskId": "20971829",
      "workflowTaskFailedEventAttributes": {
        "scheduledEventId": "19",
        "startedEventId": "20",
        "cause": "WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR",
        "failure": {
          "message": "[TMPRL1100] unknown command CommandType: Timer, ID: 17, possible causes are nondeterministic workflow definition code or incompatible change in the workflow definition",
          "source": "GoSDK",
          "stackTrace": "process event for order_matching_task_queue [panic]:\ngo.temporal.io/sdk/internal.panicIllegalState(...)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:440\ngo.temporal.io/sdk/internal.(*commandsHelper).getCommand(0xc00658e080, {0x4, {0xc006655728, 0x2}})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:929 +0x3a5\ngo.temporal.io/sdk/internal.(*commandsHelper).handleTimerStarted(0x1f08f841348?, {0xc006655728?, 0xc000601008?})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_command_state_machine.go:1385 +0x25\ngo.temporal.io/sdk/internal.(*workflowExecutionEventHandlerImpl).ProcessEvent(0xc006588108, 0xc0066aae70, 0xa0?, 0x0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_event_handlers.go:1175 +0x3f1\ngo.temporal.io/sdk/internal.(*workflowExecutionContextImpl).ProcessWorkflowTask(0xc006598000, 0xc0066aced0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_handlers.go:1100 +0x1608\ngo.temporal.io/sdk/internal.(*workflowTaskHandlerImpl).ProcessWorkflowTask(0xc0042f0000, 0xc0066aced0, 0xc006598000, 0xc00658a5a0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_handlers.go:889 +0x3c5\ngo.temporal.io/sdk/internal.(*workflowTaskPoller).processWorkflowTask(0xc00391c240, 0xc0066aced0)\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_pollers.go:357 +0x3c3\ngo.temporal.io/sdk/internal.(*workflowTaskPoller).ProcessTask(0xc00391c240, {0x1adcba0, 0xc0066aced0})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_task_pollers.go:321 +0x78\ngo.temporal.io/sdk/internal.(*baseWorker).processTask(0xc0043ba160, {0x1add6e0, 0xc0066a8780})\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:518 +0x153\ngo.temporal.io/sdk/internal.(*baseWorker).processTaskAsync.func1()\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:369 +0x45\ncreated by go.temporal.io/sdk/internal.(*baseWorker).processTaskAsync in goroutine 71\n\tE:/Project/GolangProject/go/pkg/mod/go.temporal.io/sdk@v1.26.1/internal/internal_worker_base.go:365 +0xa5",
          "applicationFailureInfo": {
            "type": "PanicError",
            "nonRetryable": true
          }
        },
        "identity": "16828@JYM-HpZhanX@"
      }
    }
  ]
}

History is not helpful. Have you checked the workflow code for determinism?