Skip to content

crash if TensorRT 10.1x is used from a dynamic library #4617

@notaz

Description

@notaz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module:RuntimeOther generic runtime issues that does not fall into other modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions