Deepstream sample code error on Jetson Orin AGX

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 6.2
• JetPack Version (valid for Jetson only) 5.1.1
• TensorRT Version TensorRT 8.5.2
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description

I have been trying to run deepstream on the Jetson Orin AGX over ssh and stream the results over udp. I kept having an error that looked like the following:

nvbufsurface: Failed to create EGLImage.
0:01:08.716927590 65019 0xaaab1d8a7a90 ERROR       nvinferallocator gstnvinfer_allocator.cpp:102:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:01:08.716950982 65019 0xaaab1d8a7a90 WARN              GST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
0:01:08.716973095 65019 0xaaab1d8a7a90 WARN              bufferpool gstbufferpool.c:305:do_alloc_buffer:<bufferpool0> alloc function failed
0:01:08.716979847 65019 0xaaab1d8a7a90 WARN              bufferpool gstbufferpool.c:338:default_start:<bufferpool0> failed to allocate buffer
0:01:08.716985063 65019 0xaaab1d8a7a90 ERROR             bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<bufferpool0> start failed
0:01:08.716995463 65019 0xaaab1d8a7a90 WARN                 nvinfer gstnvinfer.cpp:985:gst_nvinfer_start:<secondary_gie_2> error: Failed to set buffer pool to active
0:01:08.722347831 65019 0xaaab1d8a7a90 WARN                GST_PADS gstpad.c:1142:gst_pad_set_active:<secondary_gie_2:sink> Failed to activate pad

I then tried to just get the sample deepstream apps to work and got the following:

deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI3: failed to query the version
libEGL warning: DRI2: failed to authenticate
WARNING: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.2/samples/configs/deepstream-app/../../models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine open error
0:00:02.083544460 65019 0xaaab1d8a7a90 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 6]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1897> [UID = 6]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.2/samples/configs/deepstream-app/../../models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine failed
0:00:02.225631508 65019 0xaaab1d8a7a90 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 6]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2002> [UID = 6]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.2/samples/configs/deepstream-app/../../models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine failed, try rebuild
0:00:02.225718293 65019 0xaaab1d8a7a90 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 6]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1923> [UID = 6]: Trying to create engine from model files
WARNING: [TRT]: The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
Warning: Flatten layer ignored. TensorRT implicitly flattens input to FullyConnected layers, but in other circumstances this will result in undefined behavior.
WARNING: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine opened error
0:01:08.514397594 65019 0xaaab1d8a7a90 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<secondary_gie_2> NvDsInferContext[UID 6]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1950> [UID = 6]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224       
1   OUTPUT kFLOAT predictions/Softmax 20x1x1          

nvbufsurface: Failed to create EGLImage.
0:01:08.716927590 65019 0xaaab1d8a7a90 ERROR       nvinferallocator gstnvinfer_allocator.cpp:102:gst_nvinfer_allocator_alloc: Error: Could not map EglImage from NvBufSurface for nvinfer
0:01:08.716950982 65019 0xaaab1d8a7a90 WARN              GST_BUFFER gstbuffer.c:951:gst_buffer_new_allocate: failed to allocate 88 bytes
0:01:08.716973095 65019 0xaaab1d8a7a90 WARN              bufferpool gstbufferpool.c:305:do_alloc_buffer:<bufferpool0> alloc function failed
0:01:08.716979847 65019 0xaaab1d8a7a90 WARN              bufferpool gstbufferpool.c:338:default_start:<bufferpool0> failed to allocate buffer
0:01:08.716985063 65019 0xaaab1d8a7a90 ERROR             bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<bufferpool0> start failed
0:01:08.716995463 65019 0xaaab1d8a7a90 WARN                 nvinfer gstnvinfer.cpp:985:gst_nvinfer_start:<secondary_gie_2> error: Failed to set buffer pool to active
0:01:08.722347831 65019 0xaaab1d8a7a90 WARN                GST_PADS gstpad.c:1142:gst_pad_set_active:<secondary_gie_2:sink> Failed to activate pad
** ERROR: <main:716>: Failed to set pipeline to PAUSED
Quitting
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=1
nvstreammux: Successfully handled EOS for source_id=2
nvstreammux: Successfully handled EOS for source_id=3
ERROR from secondary_gie_2: Failed to set buffer pool to active
Debug info: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(985): gst_nvinfer_start (): /GstPipeline:pipeline/GstBin:secondary_gie_bin/GstNvInfer:secondary_gie_2
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  155 ()
  Minor opcode of failed request:  1
  Serial number of failed request:  20
  Current serial number in output stream:  20

I additionally tried disabling the sinks and setting the sink to fakesink with no success. (Same errors)

I came across the following post (Deepstream sample code error in jetson xavier NX) and it appears to be a very similar issue. The fix was to attach a monitor. I want to be able to run deepstream remotely over ssh and would like another way to get this to work. I have the agx remotely installed currently, but I could access it and attach a monitor to verify that it fixes the problem.

Any help would be greatly appreciated.

I’ve tried with my Jetson board. To use fakesink will be OK for the remote ssh running. Please check whether you have set the sink correctly in your configuration file.

Jetson does not support X11 forwarding. Please do not use “xterm” to connect to the board. Or you have to disable x11-forwarding with the tool. Putty is recommended.

Thanks!

I was able to get past that problem by using ssh without X11. before I was using ssh -Y. Just using ssh without X11 appears to work now. Interestingly other apps seemed to work with X11 forwarding even though it isn’t supported.

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