NVIDIA / NVIDIA/TensorRT-LLM

EngineDeadError message compounds a prefix each time it is unpickled

Open Beginner friendly
#17,910 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Pytorch
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 against main @ 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

  1. Would you prefer __reduce__, or moving the rendering out of __init__ into __str__ so args
    never holds the formatted text?
  2. Are there other exception types in tensorrt_llm/executor that render constructor arguments into
    the message and would have the same issue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.