Hello,
I’m looking for effective ways to debug deadlock issues. This morning, I encountered a deadlock in a workflow that occurred before any real code had run. I’m not using CPU-heavy or non-deterministic code when this happens—it deadlocks right before the first activity execution.
All I have is a log message from the workflow. The pod wasn’t under heavy load; this is a scheduled workflow that runs once every 10 minutes.
The only thing we can take a wild guess at is that we had a lot of TCP-resets on one of our kubernetes nodes. I don’t know if the deadlock occurs because of the pod losing connection to temporal maybe?
Has anyone experienced this before, or do you have tips for debugging such early-stage deadlocks?
[WorkflowRun]
public async Task Run(FormsReceiptWorkflowArguments arguments)
{
Workflow.Logger.LogInformation("Checking if there are any new forms responses to handle");
Payload<List<FormResponsesAttribute>>? responses = await Workflow.ExecuteActivityAsync((FormsReceiptActivities a) => a.GetDocumentsWithPendingResponses(arguments.PackageKey), DefaultOptions);
if (responses != null)
{
await CreateReceipts(arguments.Directory, responses);
}
Workflow.Logger.LogInformation("Finished receipt processing of forms responses");
}
{
"events": [
{
"eventId": "1",
"eventTime": "2026-02-05T05:40:47.935994473Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED",
"taskId": "80742225",
"workflowExecutionStartedEventAttributes": {
"workflowType": {
"name": "customer-xyz-forms-receipt-workflow"
},
"taskQueue": {
"name": "customer-xyz",
"kind": "TASK_QUEUE_KIND_NORMAL"
},
"input": {
"payloads": [
{
"metadata": {
"encoding": "json/plain"
},
"data": {
"PackageKey": {
"Value": "019c2b76-685d-73d4-8d26-4e985f727c34"
},
"Directory": "/data/customers/019aca94-339d-76b5-adc0-f5dbebc08cad/019c2b76-685d-73d4-8d26-4e985f727c34/formsResponses"
}
}
]
},
"workflowTaskTimeout": "10s",
"lastCompletionResult": {
"payloads": [
{
"metadata": {
"encoding": "json/plain"
},
"data": {}
}
]
},
"originalExecutionRunId": "019c2c51-3ebf-7f2a-a011-ed14fe4028ac",
"identity": "temporal-scheduler-production-customer-xyz-forms-receipt-019c2b76-685d-73d4-8d26-4e985f727c34",
"firstExecutionRunId": "019c2c51-3ebf-7f2a-a011-ed14fe4028ac",
"attempt": 1,
"firstWorkflowTaskBackoff": "0s",
"searchAttributes": {
"indexedFields": {
"TemporalScheduledById": {
"metadata": {
"encoding": "json/plain",
"type": "Keyword"
},
"data": "customer-xyz-forms-receipt-019c2b76-685d-73d4-8d26-4e985f727c34"
},
"TemporalScheduledStartTime": {
"metadata": {
"encoding": "json/plain",
"type": "Datetime"
},
"data": "2026-02-05T05:40:00Z"
}
}
},
"workflowId": "customer-xyz-forms-receipt-019c2b76-685d-73d4-8d26-4e985f727c34-2026-02-05T05:40:00Z"
}
},
{
"eventId": "2",
"eventTime": "2026-02-05T05:40:47.936098731Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"taskId": "80742226",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "customer-xyz",
"kind": "TASK_QUEUE_KIND_NORMAL"
},
"startToCloseTimeout": "10s",
"attempt": 1
}
},
{
"eventId": "3",
"eventTime": "2026-02-05T05:40:47.952091263Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
"taskId": "80742231",
"workflowTaskStartedEventAttributes": {
"scheduledEventId": "2",
"identity": "1@customer-xyz-deployment-597b5d74d6-n5ndc",
"requestId": "0c9b3b44-7802-4e89-8ebc-80d705c68766",
"historySizeBytes": "879",
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
}
}
},
{
"eventId": "4",
"eventTime": "2026-02-05T05:40:57.955572429Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_TIMED_OUT",
"taskId": "80742235",
"workflowTaskTimedOutEventAttributes": {
"scheduledEventId": "2",
"startedEventId": "3",
"timeoutType": "TIMEOUT_TYPE_START_TO_CLOSE"
}
},
{
"eventId": "5",
"eventTime": "2026-02-05T05:40:57.955578162Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"taskId": "80742240",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "customer-xyz",
"kind": "TASK_QUEUE_KIND_NORMAL"
},
"startToCloseTimeout": "10s",
"attempt": 2
}
},
{
"eventId": "6",
"eventTime": "2026-02-05T05:40:57.964060578Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
"taskId": "80742241",
"workflowTaskStartedEventAttributes": {
"scheduledEventId": "5",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd",
"requestId": "c82dbef6-875a-4fc4-a2a0-01fd468f23df",
"historySizeBytes": "1072",
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
}
}
},
{
"eventId": "7",
"eventTime": "2026-02-05T05:40:57.973612461Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
"taskId": "80742242",
"workflowTaskCompletedEventAttributes": {
"scheduledEventId": "5",
"startedEventId": "6",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd",
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
},
"sdkMetadata": {
"coreUsedFlags": [
3,
2,
1
],
"langUsedFlags": [
2
],
"sdkName": "temporal-dotnet",
"sdkVersion": "1.9.0.0"
},
"meteringMetadata": {}
}
},
{
"eventId": "8",
"eventTime": "2026-02-05T05:40:57.973732832Z",
"eventType": "EVENT_TYPE_ACTIVITY_TASK_SCHEDULED",
"taskId": "80742243",
"activityTaskScheduledEventAttributes": {
"activityId": "1",
"activityType": {
"name": "GetDocumentsWithPendingResponses"
},
"taskQueue": {
"name": "customer-xyz",
"kind": "TASK_QUEUE_KIND_NORMAL"
},
"header": {
"fields": {
"_tracer-data": {
"metadata": {
"encoding": "json/plain"
},
"data": {
"traceparent": "00-da80c9d5af390e77740923e41790f181-87e5b83d2741e57b-01"
}
}
}
},
"input": {
"payloads": [
{
"metadata": {
"encoding": "json/plain"
},
"data": {
"Value": "019c2b76-685d-73d4-8d26-4e985f727c34"
}
}
]
},
"scheduleToCloseTimeout": "0s",
"scheduleToStartTimeout": "0s",
"startToCloseTimeout": "90s",
"heartbeatTimeout": "0s",
"workflowTaskCompletedEventId": "7",
"retryPolicy": {
"initialInterval": "10s",
"backoffCoefficient": 2,
"maximumInterval": "1000s"
},
"useWorkflowBuildId": true
}
},
{
"eventId": "9",
"eventTime": "2026-02-05T05:40:57.983388627Z",
"eventType": "EVENT_TYPE_ACTIVITY_TASK_STARTED",
"taskId": "80742250",
"activityTaskStartedEventAttributes": {
"scheduledEventId": "8",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd",
"requestId": "215331fa-de43-400b-97f0-48675b2f4d96",
"attempt": 1,
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
}
}
},
{
"eventId": "10",
"eventTime": "2026-02-05T05:41:14.265036647Z",
"eventType": "EVENT_TYPE_ACTIVITY_TASK_COMPLETED",
"taskId": "80742251",
"activityTaskCompletedEventAttributes": {
"result": {
"payloads": [
{
"metadata": {
"encoding": "binary/null"
},
"data": null
}
]
},
"scheduledEventId": "8",
"startedEventId": "9",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd"
}
},
{
"eventId": "11",
"eventTime": "2026-02-05T05:41:14.265043387Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"taskId": "80742252",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "1@customer-xyz-deployment-597b5d74d6-429hd-dddb6ce891a8406a8bd95b0d7dbe7a17",
"kind": "TASK_QUEUE_KIND_STICKY",
"normalName": "customer-xyz"
},
"startToCloseTimeout": "10s",
"attempt": 1
}
},
{
"eventId": "12",
"eventTime": "2026-02-05T05:41:14.274525846Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
"taskId": "80742256",
"workflowTaskStartedEventAttributes": {
"scheduledEventId": "11",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd",
"requestId": "8d83238d-af63-4369-923d-039d9657a314",
"historySizeBytes": "2171",
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
}
}
},
{
"eventId": "13",
"eventTime": "2026-02-05T05:41:14.284294903Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
"taskId": "80742260",
"workflowTaskCompletedEventAttributes": {
"scheduledEventId": "11",
"startedEventId": "12",
"identity": "1@customer-xyz-deployment-597b5d74d6-429hd",
"workerVersion": {
"buildId": "0f2bb25d-407e-432a-b268-d3450e1c291f"
},
"sdkMetadata": {},
"meteringMetadata": {}
}
},
{
"eventId": "14",
"eventTime": "2026-02-05T05:41:14.284332485Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED",
"taskId": "80742261",
"workflowExecutionCompletedEventAttributes": {
"result": {
"payloads": [
{
"metadata": {
"encoding": "json/plain"
},
"data": {}
}
]
},
"workflowTaskCompletedEventId": "13"
}
}
]
}