NVIDIA / NVIDIA/TensorRT

crash if TensorRT 10.1x is used from a dynamic library

Open
#4,617 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Module:Runtime
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Description

On Linux, if TensorRT is used by a dynamic library that is loaded using dlopen(), there is a crash when the program finishes. This is likely caused by TensorRT doing dlclose() on libnvinfer_builder_resource.so.10.x from a static c++ object destructor. The problem would likely go away if TensorRT would unload libnvinfer_builder_resource from nvinfer1::IBuilder destructor, or from a normal function marked with __attribute__((destructor)) rather than some c++ destructor. This is due to the way destructors are implemented in glibc.

Environment

TensorRT Version: 10.13, 10.14
NVIDIA GPU: RTX 5090
NVIDIA Driver Version: 580.95.05
CUDA Version: 13.0

Operating System: Ubuntu 24.04.3 LTS
Baremetal or Container (if so, version): Baremetal

Relevant Files

test.zip

Steps To Reproduce

Unzip the attached file and run make. Run the reproducer with

LD_LIBRARY_PATH=. ./test

Have you tried the latest release?: yes

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

Start with the attached test.zip reproducer, run make, then execute it with LD_LIBRARY_PATH=. ./test on the stated Linux environment. Trace the shutdown path after dlopen() and verify that the program finishes without the reported crash when TensorRT 10.13 or 10.14 is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.