[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)

Aberta
#2,183 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@mjameswh já está trabalhando nisso.

Desde 2/12/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug sdk-python

Description:

The workflow runs a Local Activity that times out (start_to_close_timeout, retries exhausted), catches ActivityError, and calls workflow.sleep() in the except.

 try:
            # Attempt 1 times out; its 10s backoff is over the 5s threshold, so the worker records a
            # failure marker and a backoff timer. Attempt 2 times out and the error reaches this code.
            await workflow.execute_local_activity(
                slow_check,
                start_to_close_timeout=timedelta(seconds=5),
                retry_policy=RetryPolicy(initial_interval=timedelta(seconds=10), maximum_attempts=2),
                local_retry_threshold=timedelta(seconds=5),
            )
        except ActivityError:
            await workflow.sleep(timedelta(seconds=1), summary="sleep in except ActivityError")
        # Fails this workflow task so the worker evicts the run; the retry replays the whole history.
        raise RuntimeError("injected bug")

After the run is evicted and its history is replayed, the worker fails with [TMPRL1100]

Reproduced on version 1.34.0 and 1.37.0.

I've attached the reproduction.
_la_timeout_nde.zip

Linguagem predominante
Python
Estrelas
1.3k
Forks
305
Merge médio
3d 23h
PRs com merge (30d)
44

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de temporalio/sdk-python

Todas as issues de temporalio/sdk-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.