Skip to content

[Bug] Flaky panic triggered by test_workflow_cancel_activity in sdk-python #1230

@brianstrauch

Description

@brianstrauch

Two dbg_panic! sites fire from sdk-core during a sdk-python test that rapidly cancels local activities under a 1s workflow task timeout.

  • thread 'workflow-processing' panicked at crates/sdk-core/src/worker/workflow/managed_run.rs:401:17: Attempted to complete activation for run 019db732-4d78-7616-9a36-20b44eff6c09 without associated workflow task
  • thread 'tokio-runtime-worker' panicked at crates/sdk-core/src/worker/workflow/mod.rs:575:13: Send half of activation complete response channel went missing
  • Surfaces to Python as pyo3_async_runtimes.RustPanic: rust future panicked: unknown error from complete_workflow_activation, and subsequent QueryWorkflow RPCs return WorkflowNotReadyFailure.

Reproduction

sdk-python (debug build):

uv run pytest tests/worker/test_workflow.py::test_workflow_cancel_activity -k True -x -s

Timing-sensitive; doesn't always reproduce.

CI run: https://github.com/temporalio/sdk-python/actions/runs/24804169223

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions