Process crashes and hangs when passing parameters that contain CancellationToken
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
There have been several reports of CLR crashes and process hangs when using DTFx, specifically when a call to an activity function, continue-as-new, etc. passes in a parameter that contains a reference to `CancellationToken`. This also happens when `OrchestrationContext.CreateClient` is used and methods in T interface with `CancellationToken` in their signatures.
The root issue is that the serialization code used by DTFx will serialize `CancellationToken` objects in a way that can corrupt CLR memory, resulting in unexpected behavior.
The mitigation is to remove `CancellationToken` parameters from interfaces that are wrapped using `OrchestrationContext.CreateClient` or from argument values that are passed to `ScheduleTask*`, `ContinueAsNew`, etc.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.