An absorbed forward step returning None crashes the PyTorch executor loop
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
_forward_step() can return None when a forward pass is absorbed rather than producing outputs.
The executor loop then dereferences that None, and the exception escapes the loop — taking down the
executor rather than skipping the affected iteration.
This affects both the overlap and non-overlap PyTorch executor paths, which is why the fix touches both.
The executor loop is process-wide: one absorbed forward step ends serving for every in-flight and subsequent request, not just the one that triggered it. The HTTP frontend can remain up while this has happened, so it presents as requests failing against an apparently healthy server.
Expected behavior
An absorbed forward step is treated as 'no outputs this iteration' and serving continues.
actual behavior
The None result is dereferenced and the exception escapes the executor loop, ending serving for every in-flight and subsequent request. The HTTP frontend can stay up while this has happened.
additional notes
Treat a None result as "no outputs this iteration" and continue, rather than dereferencing it. The
added branch is exercised only when _forward_step() returns None; normal forward and sampling
behaviour is unchanged.
Deliberately out of scope: the inter-pipeline-parallel path, where recovery from a failed forward must be coordinated across ranks rather than handled by a local skip.
We have the patch and a CPU-only regression test that fails before and passes after, and are raising this Issue Request first per CONTRIBUTING.md.
Hi @StephenLReed, I would like to contribute a focused fix and CPU-only regression test for this issue. I see that you already have a patch prepared; are you planning to open the PR yourself? If not, I am happy to take it once a maintainer approves the Issue Request. I will keep the change limited to handling an absorbed forward step in the overlap and non-overlap executor paths.
@karljang , @StephenLReed I independently reproduced the non-overlap failure on a Tesla T4. I injected a RuntimeError through model_engine.forward(), and it went through the real _forward_step() → _handle_errors() → None return, then the non-overlap _executor_loop() reached batch_outputs['logits'] with guided_decoder enabled. This resulted in TypeError: 'NoneType' object is not subscriptable, followed by executor cleanup/shutdown.
This matches the non-overlap gap review pointed out on #19233. Happy to help with the non-overlap regression test or fix if useful.