Failed to create 'primary_gie'

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): NVIDIA A30 dGPU
• DeepStream Version: 6.3
• JetPack Version (valid for Jetson only)
• TensorRT Version: 8.5
• NVIDIA GPU Driver Version (valid for GPU only): NVIDIA A30
• Operating System: Ubuntu 20.04


Error

** ERROR: <create_primary_gie_bin:129>: Failed to create 'primary_gie'
** ERROR: <create_primary_gie_bin:193>: create_primary_gie_bin failed
** ERROR: <create_pipeline:1576>: create_pipeline failed
** ERROR: <main:697>: Failed to create pipeline
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
App run failed

How to reproduce the issue ?

  • Installation Guide followed

  • Steps to run sample app

    • cd /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app
    • deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt

Could you run that with GST_DEBUG=3 deepstream-app -c source30_1080p_dec_infer-resnet_tiled_display_int8.txt and attach the whole log?

I am basically getting the same log.

** ERROR: <create_primary_gie_bin:129>: Failed to create 'primary_gie'
** ERROR: <create_primary_gie_bin:193>: create_primary_gie_bin failed
** ERROR: <create_pipeline:1576>: create_pipeline failed
** ERROR: <main:697>: Failed to create pipeline
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
App run failed

There was one thing that I have noticed. When I clear the cache of gstreamer-1.0 using rm ${HOME}/.cache/gstreamer-1.0/registry.x86_64.bin command, and then if I run I get some warnings but I am not sure if it’s because of those warnings that I am getting the error.

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.889: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.895: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so': libcublas.so.11: cannot open shared object file: No such file or directory

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.904: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferaudio.so': libcublas.so.11: cannot open shared object file: No such file or directory

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.909: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_deepstream_bins.so': libcublas.so.11: cannot open shared object file: No such file or directory

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.909: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:7497): GStreamer-WARNING **: 13:30:16.934: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ucx.so': libucs.so.0: cannot open shared object file: No such file or directory
** ERROR: <create_primary_gie_bin:129>: Failed to create 'primary_gie'
** ERROR: <create_primary_gie_bin:193>: create_primary_gie_bin failed
** ERROR: <create_pipeline:1576>: create_pipeline failed
** ERROR: <main:697>: Failed to create pipeline
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
App run failed

From this log above, it can be seen that it is a problem with your environment. Please confirm if the cuda toolkit has been successfully installed.https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#dgpu-setup-for-ubuntu

Yes, the cuda toolkit seems to be installed successfully.

To actually confirm I went ahead and reinstalled cuda. But still I’m getting the same error.

** ERROR: <create_primary_gie_bin:129>: Failed to create 'primary_gie'
** ERROR: <create_primary_gie_bin:193>: create_primary_gie_bin failed
** ERROR: <create_pipeline:1576>: create_pipeline failed
** ERROR: <main:697>: Failed to create pipeline
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
App run failed

Please follow the link I posted earlier to install the relevant dependencies step by step. You can also use the ldd /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_infer.so command to verify which dependency libraries are missing.

I ran the command to check the missing libraries and it seems there’s this one library related to libcublas that is not found.
I had followed the exact same steps but I’m not sure how it got missed.

So, how do I fulfil this missing library. Like I have to download it and include it in some folder or there’s a direct command to do it??

Here’s the output of the command(ldd /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_infer.so) that I ran:

	linux-vdso.so.1 (0x00007fff43329000)
	libnvds_infer.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_infer.so (0x00007fce95823000)
	libnvds_meta.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_meta.so (0x00007fce95818000)
	libnvdsgst_meta.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_meta.so (0x00007fce95811000)
	libnvdsgst_helper.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_helper.so (0x00007fce95807000)
	libnvdsgst_customhelper.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_customhelper.so (0x00007fce957fc000)
	libnvbufsurftransform.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvbufsurftransform.so (0x00007fce93b3a000)
	libnvbufsurface.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvbufsurface.so (0x00007fce93b31000)
	libyaml-cpp.so.0.6 => /lib/x86_64-linux-gnu/libyaml-cpp.so.0.6 (0x00007fce93aae000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fce93aa8000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fce93a85000)
	libcudart.so.12 => /usr/local/cuda/lib64/libcudart.so.12 (0x00007fce937dd000)
	libcuda.so.1 => /lib/x86_64-linux-gnu/libcuda.so.1 (0x00007fce91b7e000)
	libgstreamer-1.0.so.0 => /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007fce91a37000)
	libgstbase-1.0.so.0 => /lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007fce919b9000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fce9188f000)
	libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fce9182f000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fce9164d000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fce91630000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fce9143e000)
	libnvds_inferlogger.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_inferlogger.so (0x00007fce91437000)
	libnvds_inferutils.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_inferutils.so (0x00007fce91411000)
	libnvinfer.so.8 => /lib/x86_64-linux-gnu/libnvinfer.so.8 (0x00007fce73bca000)
	libnvinfer_plugin.so.8 => /lib/x86_64-linux-gnu/libnvinfer_plugin.so.8 (0x00007fce70c32000)
	libnvonnxparser.so.8 => /lib/x86_64-linux-gnu/libnvonnxparser.so.8 (0x00007fce70779000)
	libnvparsers.so.8 => /lib/x86_64-linux-gnu/libnvparsers.so.8 (0x00007fce70233000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fce95905000)
	libgstrtp-1.0.so.0 => /lib/x86_64-linux-gnu/libgstrtp-1.0.so.0 (0x00007fce7020d000)
	libnppc.so.12 => /usr/local/cuda/lib64/libnppc.so.12 (0x00007fce6fe7c000)
	libnppig.so.12 => /usr/local/cuda/lib64/libnppig.so.12 (0x00007fce6d763000)
	libnppidei.so.12 => /usr/local/cuda/lib64/libnppidei.so.12 (0x00007fce6cac0000)
	libnvbuf_fdmap.so => ///opt/nvidia/deepstream/deepstream-6.3/lib/libnvbuf_fdmap.so (0x00007fce6caba000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fce6cab0000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fce6c961000)
	libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fce6c95b000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fce6c8e6000)
	libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fce6c8da000)
	libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fce6c604000)
	libcublas.so.11 => not found
	libcublasLt.so.11 => not found
	libcudnn.so.8 => /usr/local/cuda/lib64/libcudnn.so.8 (0x00007fce6c3de000)

From the log above, it appears that you have not installed the cuda environment properly.
Please install the CUDA and driver step by step: install-cuda-toolkit-12-1.

Yeah, actually this was the reason for the error.

But even while following the installations for CUDA and driver step by step for some reason these library files libcublas.so.11 and libcublasLt.so.11 were not getting downloaded.

So, to actually resolve this issue, I had to download the library files manually and then copy them to /usr/local/cuda/lib64/

I had used this article as reference.

Now, I am able to run the sample applications.

Thanks @yuweiw

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.