Error while running deepstream-test1(ERROR from element primary-nvinference-engine: Internal data stream error.)

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) jetson
• DeepStream Version 6.0
• JetPack Version (valid for Jetson only) 4.6
• TensorRT Version 8.2
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• 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) /opt/nvidia/deepstream/deepstream/bin/deepstream-test1-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I ran this command to test if deepstream-test1 is working.


/opt/nvidia/deepstream/deepstream/bin/deepstream-test1-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264

I encountered an error related to an internal data stream, which caused the streaming to stop.
I am using jeston nano in headless mode and I cant view it graphically I guess.

ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine opened error
0:01:12.764639692 20412      0x471f360 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1942> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:01:12.821970803 20412      0x471f360 INFO                 nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary-nvinference-engine> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Running...
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
Frame Number = 0 Number of objects = 9 Vehicle Count = 6 Person Count = 3
0:01:13.159985843 20412      0x42b4190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: Internal data stream error.
0:01:13.160038032 20412      0x42b4190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: streaming stopped, reason error (-5)
ERROR from element primary-nvinference-engine: Internal data stream error.
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(2288): gst_nvinfer_output_loop (): /GstPipeline:dstest1-pipeline/GstNvInfer:primary-nvinference-engine:
streaming stopped, reason error (-5)
Returned, stopping playback
Deleting pipeline

Which directory are you running your program in?
deepstream-test1-app need config file in the same directory. Can you run your command in this directory? /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1

here,

/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1$ /opt/nvidia/deepstream/deepstream/bin/deepstream-test1-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Now playing: /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264

Using winsys: x11 
Opening in BLOCKING MODE 
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:02.710861481 22324     0x1f6c9360 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1889> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:02.711948290 22324     0x1f6c9360 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1996> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:02.711997042 22324     0x1f6c9360 INFO                 nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1914> [UID = 1]: Trying to create engine from model files
WARNING: INT8 not supported by platform. Trying FP16 mode.
ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine opened error
0:01:10.194065694 22324     0x1f6c9360 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1942> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:01:10.249506458 22324     0x1f6c9360 INFO                 nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary-nvinference-engine> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
Running...
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
Frame Number = 0 Number of objects = 9 Vehicle Count = 6 Person Count = 3
0:01:10.627279799 22324     0x1f25e190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: Internal data stream error.
0:01:10.627335062 22324     0x1f25e190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: streaming stopped, reason error (-5)
ERROR from element primary-nvinference-engine: Internal data stream error.
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(2288): gst_nvinfer_output_loop (): /GstPipeline:dstest1-pipeline/GstNvInfer:primary-nvinference-engine:
streaming stopped, reason error (-5)
Returned, stopping playback
Deleting pipeline

Please add GST_DEBUG=3 before the command and test again, thank you.

And can you explain how did you install deepstream6.0.1 on your Nano? here is the guide of the installation: Quickstart Guide — DeepStream 6.0.1 Release documentation (nvidia.com)

I followed this to install deepstream Quickstart Guide — DeepStream 6.0 Release documentation

Should I uninstall it and download another one?

Here is the result after adding GST_DEBUG=3.

/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1$ GST_DEBUG=3 /opt/nvidia/deepstream/deepstream/bin/deepstream-test1-app /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Now playing: /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264

Using winsys: x11 
Opening in BLOCKING MODE 
0:00:00.278007995 22364     0x361f2190 WARN                    v4l2 gstv4l2object.c:4476:gst_v4l2_object_probe_caps:<nvv4l2-decoder:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:00.278094560 22364     0x361f2190 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
0:00:00.278144978 22364     0x361f2190 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
0:00:00.278191802 22364     0x361f2190 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:02.678344369 22364     0x361f2190 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1889> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:02.679410126 22364     0x361f2190 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1996> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream-test1/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:02.679459398 22364     0x361f2190 INFO                 nvinfer gstnvinfer.cpp:638:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1914> [UID = 1]: Trying to create engine from model files
WARNING: INT8 not supported by platform. Trying FP16 mode.
ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine opened error
0:01:10.868737544 22364     0x361f2190 WARN                 nvinfer gstnvinfer.cpp:635:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1942> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-6.0/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:01:10.923845219 22364     0x361f2190 INFO                 nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<primary-nvinference-engine> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
0:01:10.924233718 22364     0x361f2190 WARN                 basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<file-source> pad not activated yet
Running...
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:01:11.031856191 22364     0x35971230 WARN                    v4l2 gstv4l2object.c:4476:gst_v4l2_object_probe_caps:<nvv4l2-decoder:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:01:11.031917807 22364     0x35971230 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
0:01:11.031953746 22364     0x35971230 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
0:01:11.031986767 22364     0x35971230 WARN                    v4l2 gstv4l2object.c:2388:gst_v4l2_object_add_interlace_mode:0x3597d2a0 Failed to determine interlace mode
0:01:11.040064156 22364     0x35d81370 ERROR            egladaption gstegladaptation.c:661:gst_egl_adaptation_choose_config:<nvvideo-renderer> Could not find matching framebuffer config
0:01:11.040109990 22364     0x35d81370 ERROR            egladaption gstegladaptation.c:674:gst_egl_adaptation_choose_config:<nvvideo-renderer> Couldn't choose an usable config
0:01:11.040126449 22364     0x35d81370 ERROR          nveglglessink gsteglglessink.c:2672:gst_eglglessink_configure_caps:<nvvideo-renderer> Couldn't choose EGL config
0:01:11.040140772 22364     0x35d81370 ERROR          nveglglessink gsteglglessink.c:2730:gst_eglglessink_configure_caps:<nvvideo-renderer> Configuring caps failed
0:01:11.040170304 22364     0x35971230 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.040237285 22364     0x35971230 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.040272963 22364     0x35971230 WARN                GST_PADS gstpad.c:4226:gst_pad_peer_query:<nvegl-transform:src> could not send sticky events
0:01:11.041065066 22364     0x35971230 WARN            v4l2videodec gstv4l2videodec.c:1755:gst_v4l2_video_dec_decide_allocation:<nvv4l2-decoder> Duration invalid, not setting latency
0:01:11.041269550 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.041792324 22364     0x35971230 WARN          v4l2bufferpool gstv4l2bufferpool.c:1087:gst_v4l2_buffer_pool_start:<nvv4l2-decoder:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:01:11.054707385 22364   0x7f38003de0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1536:gst_v4l2_buffer_pool_dqbuf:<nvv4l2-decoder:pool:src> Driver should never set v4l2_buffer.field to ANY
0:01:11.054937078 22364   0x7f38003de0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.055144063 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.055206721 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.055252034 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.074691529 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.074766114 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
0:01:11.074808199 22364   0x7f380036d0 ERROR          nveglglessink gsteglglessink.c:2771:gst_eglglessink_setcaps:<nvvideo-renderer> Failed to configure caps
Frame Number = 0 Number of objects = 9 Vehicle Count = 6 Person Count = 3
0:01:11.290010278 22364     0x35d81190 ERROR         nvegltransform gstnvegltransform.c:346:gst_nvegl_transform_transform:<nvegl-transform> Something is wrong, EGLImage is expected.
0:01:11.290132365 22364     0x35d81190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: Internal data stream error.
0:01:11.290180126 22364     0x35d81190 WARN                 nvinfer gstnvinfer.cpp:2288:gst_nvinfer_output_loop:<primary-nvinference-engine> error: streaming stopped, reason error (-5)
ERROR from element primary-nvinference-engine: Internal data stream error.
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(2288): gst_nvinfer_output_loop (): /GstPipeline:dstest1-pipeline/GstNvInfer:primary-nvinference-engine:
streaming stopped, reason error (-5)
Returned, stopping playback
Deleting pipeline

OK, you are working in headless mode, and deepstream-test1 need egl to display, that’s the reason of the failure.
You may either work in normal mode with monitor connected, or use file sink to store the output in a file.

Yes that’s true as I mentioned earlier.
I’m not sure how do I use a file sink to store the output. I am a newbie, can you guide me please.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

You can refer to the link below with useDisplay == FALSE to modify your code.
https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps/blob/master/apps/tao_detection/deepstream_det_app.c#L784

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