the TensorRT 10.8.0.43 and also older version (tested with 10.7.0.23) is incompatible with newest glibc version
We are using TRT to inference and build TRT engines from mainly Yolo networks.
Inference is working but when attempted to create a TRTEngine from a ONNX model I got this error (exception)
[nvidialogger]: createInferBuilder: Error Code 6: API Usage Error (Unable to load library: libnvinfer_builder_resource.so.10.8.0:
libnvinfer_builder_resource.so.10.8.0: cannot enable executable stack as shared object requires: Invalid argument)
1/2 FAIL : DetectorTest::imageDetectionTest()
[EXCEPTION] Unexpected exception thrown. Error message: Could not build trt engine : Could not intialize TRT Builder
Downgrading to glbc 2.40+r66+g7d4b6bcae91f Fixes the issue, but downgrading should not be a solution since downgrading a system package can introduce instability to a system.
It is working with glibc version 2.40+r66+g7d4b6bcae91f
Environment
TensorRT Version: 10.8.0.43 GPU Type: RTX2070 Nvidia Driver Version: 570.86.16 CUDA Version: 12.8.0 CUDNN Version: 9.5.1.17 Operating System + Version: Arch Linux + Linux 6.13.1 Glibc: 2.41+r2+g0a7c7a3e283a
Steps To Reproduce
Update to latest glibc (2.41) and try to build any trtengine with createInferBuilder
@HowP, can you provide more information on this issue? For example where is glibc 2.41 coming from, such as what is the path for where it’s installed? If you can provide a Dockerfile for example to help reproduce the environment that would help. glibc 2.41 is very new so we can’t be certain it’s not a regression or known issue in glibc.
cannot enable executable stack as shared object requires: Invalid argument
As far as I know, the Ubuntu is also preparing to update to new glibc glibc package : Ubuntu ( A newer version of glibc is available for packaging: GLibC 2.41)
This appears to be an intended change in glibc 2.41 after doing some more searching, adding the version to the search context. Here are a few other examples where this same issue is happening.
* dlopen and dlmopen no longer make the stack executable if a shared
library requires it, either implicitly because of a missing GNU_STACK
ELF header (and default ABI permission having the executable bit set)
or explicitly because of the executable bit in GNU_STACK, and the
stack is not already executable. Instead, loading such objects will
fail.
fixes the issue. I do not know if the problem is relevant to other libraries as well, but I stumbled on libnvinfer_builder_resource only.
Thank you for your help.
I hope that the new TRT package will be available soon.
On the side note (for me not relevant issue):
Also I noticed that TRT when engine
could not open /sys/fs/cgroup/memory/memory.limit_in_bytes
This file is not present on arch linux but I believe it is not present on Ubuntu also since this location corresponds to cgroup v1 and Ubuntu and also Arch is using cgroupv2
@HowP thanks for confirming the workaround fixed your issue. We will work on including this fix in our next monthly release. I don’t think it will harm the other libraries to change the linker flags to also clear the execstack flag since they shouldn’t need it based on your results so far, and are likely already clear.
Regarding,
could not open /sys/fs/cgroup/memory/memory.limit_in_bytes
I believe this is a recent change and most important for embedded systems with less memory. Thanks for pointing out we should add support for cgroupsv2 as well.
@ework Hi I am still facing this issue, am using python 3.12.9 + cuda 12.8 + arch linux with gblic 2.41 (same as his)
[02/12/2025-15:19:32] [TRT] [E] createInferBuilder: Error Code 6: API Usage Error (Unable to load library: libnvinfer_builder_resource.so.10.7.0: libnvinfer_builder_resource.so.10.7.0: cannot enable executable stack as shared object requires: Invalid argument)
[vapoursynth] Script evaluation failed:
[vapoursynth] Python exception: pybind11::init(): factory function returned nullptr
[vapoursynth]
[vapoursynth] Traceback (most recent call last):
[vapoursynth] File "src/cython/vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
[vapoursynth] File "src/cython/vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
[vapoursynth] File "/home/syntist/.config/mpv/rife.py", line 16, in <module>
[vapoursynth] builder = trt.Builder(logger)
[vapoursynth] ^^^^^^^^^^^^^^^^^^^
[vapoursynth] TypeError: pybind11::init(): factory function returned nullptr
[vapoursynth]
[vapoursynth] could not init VS
Disabling filter vapoursynth.00 because it has failed.
Also i tried doing
(.venv) ╰─❯ execstack -q /home/syntist/Documents/vs-rife/.venv/lib/python3.12/site-packages/tensorrt_libs/libnvinfer_builder_resource.so.10.7.0
X /home/syntist/Documents/vs-rife/.venv/lib/python3.12/site-packages/tensorrt_libs/libnvinfer_builder_resource.so.10.7.0
(.venv) ╰─❯ execstack -c /home/syntist/Documents/vs-rife/.venv/lib/python3.12/site-packages/tensorrt_libs/libnvinfer_builder_resource.so.10.7.0
execstack: /home/syntist/Documents/vs-rife/.venv/lib/python3.12/site-packages/tensorrt_libs/libnvinfer_builder_resource.so.10.7.0: section file offsets not monotonically increasing
So i can’t really disable it. I am using AUR (en) - execstack
this for execstack.