EngineDeadError message compounds a prefix each time it is unpickled
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
- TensorRT-LLM: 1.3.0rc23 (built from
f20ea652); behaviour re-checked againstmain@fbda11f5 - GPU: NVIDIA GeForce RTX 5090 (sm_120), driver 595.71.05
- PyTorch 2.11.0+cu130, CUDA 13.0, Python 3.12.13
- Ubuntu 25.10, kernel 6.17.0-41-generic
- Backend: PyTorch; single GPU, no TP/PP
- Model where observed: Qwen3.6-35B-A3B-NVFP4 with FP8 KV cache (where model-specific)
Who can help?
No response
Reproduction
EngineDeadError.__init__ renders root_cause into the message, and default exception pickling
round-trips through args — which holds that rendered message. Unpickling re-invokes __init__ with
the message string as the cause, so the prefix is prepended again on every hop:
original : Engine has died: RuntimeError: PyExecutor has already been shutdown
1 hop : Engine has died: str: Engine has died: RuntimeError: PyExecutor has already been shutdown
2 hops : Engine has died: str: Engine has died: str: Engine has died: RuntimeError: ...
The class is raised when a worker process dies, i.e. exactly where it crosses a process boundary, so
the mangled text is the form users are most likely to encounter.
Expected behavior
An EngineDeadError reconstructed in another process renders the same message as the original.
actual behavior
Each unpickle prepends the prefix again, so the message grows one 'Engine has died: str: ' per hop. .root_cause is unaffected.
additional notes
Message only. __dict__ is restored after __init__, so .root_cause survives as the original
exception and the attribute contract holds. This is log legibility and unbounded message growth, not
a broken consumer contract.
Add __reduce__ returning (self.__class__, (self.root_cause,)) so reconstruction uses the cause
rather than the rendered text. root_cause is already pickled as part of __dict__, so no new
picklability requirement is introduced.
We have the patch with four CPU-only tests (2 fail before, 4 pass after) and are raising this Issue
Request first per CONTRIBUTING.md.
Questions for maintainers
- Would you prefer
__reduce__, or moving the rendering out of__init__into__str__soargs
never holds the formatted text? - Are there other exception types in
tensorrt_llm/executorthat render constructor arguments into
the message and would have the same issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read CONTRIBUTING.md, then locate EngineDeadError under tensorrt_llm/executor and inspect how its constructor and pickling interact. Run the four CPU-only tests mentioned in the issue, and verify that exception round-tripping preserves the original message without adding another prefix while root_cause remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100