Deepstream-test2 runs abnormally

In the example deepstream-test2, the h264 file provided in stream or the yaml file in test2 are directly segfaulted

  1. run sample_720p.h264
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvTrackerParams::getConfigRoot()] !!![WARNING] Can't open config file (/opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-test2/../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml). Will go ahead with default values
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvTrackerParams::getConfigRoot()] !!![WARNING] Can't open config file (/opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-test2/../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml). Will go ahead with default values

Thread 1 "deepstream-test" received signal SIGBUS, Bus error.
0x0000ffffe164fca4 in ?? () from /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
(gdb) bt
#0  0x0000ffffe164fca4 in  () at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
#1  0x0000ffffe166dec8 in  () at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
#2  0x0000ffffe1653550 in  () at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
#3  0x0000ffffe164e090 in  () at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
#4  0x0000ffffe1672130 in NvMOT_Init () at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
#5  0x0000ffffe4379f34 in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so
#6  0x0000ffffe437a124 in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so
#7  0x0000ffffe43855cc in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so
#8  0x0000ffffefc9ba44 in gst_base_transform_activate (trans=trans@entry=0xaaaaab5fe190, active=active@entry=1) at gstbasetransform.c:2399
#9  0x0000ffffefc9bcd0 in gst_base_transform_sink_activate_mode (pad=<optimized out>, mode=GST_PAD_MODE_PUSH, active=1, parent=0xaaaaab5fe190) at gstbasetransform.c:2465
#10 gst_base_transform_sink_activate_mode (pad=<optimized out>, parent=0xaaaaab5fe190, mode=<optimized out>, active=1) at gstbasetransform.c:2454
#11 0x0000fffff7ecbb2c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#12 0x0000fffff7ecc310 in gst_pad_set_active () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#13 0x0000fffff7ea0970 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#14 0x0000fffff7eb6710 in gst_iterator_fold () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#15 0x0000fffff7ea3f70 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#16 0x0000fffff7ea4418 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#17 0x0000fffff7ea6ddc in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#18 0x0000fffff7ea751c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#19 0x0000fffff7e7d434 in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#20 0x0000fffff7ea6ddc in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#21 0x0000fffff7ea6e1c in gst_element_change_state () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#22 0x0000fffff7ea751c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#23 0x0000aaaaaaaa2e48 in main (argc=2, argv=0xffffffffec58) at deepstream_test2_app.c:525
  1. run dstest2_config.yml
(gdb) set args dstest2_config.yml
(gdb) r
Starting program: /opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-test2/deepstream-test2-app dstest2_config.yml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
With tracker

Program received signal SIGSEGV, Segmentation fault.
0x0000fffff7b62974 in ?? () from /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_yml_parser.so
(gdb) bt
#0  0x0000fffff7b62974 in  () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_yml_parser.so
#1  0x0000fffff7b7b860 in nvds_parse_gie_type () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_yml_parser.so
#2  0x0000aaaaaaaa2534 in main (argc=2, argv=0xffffffffec48) at deepstream_test2_app.c:361
(gdb)

Can you ran any other sample in your environment?
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used

Jetson Xavier NX Developer Kit
DeepStream 6.2
Jetpack 5.1.1
TensorRt 8.5.2.2
CUDA 11.4.315

Run deepStreamer-test2-app dstest2_config.yml
or
Run deepstreamer-test2-app sample_720p.h264

Did you modify some config? Can the other samples run in your Xavier NX?
Deepstream6.2 was verified in JP5.1.1 and by default all samples can run correctly, not sure if some config changed in your setup.

Without modifying any parameters, other test examples cannot run yaml files


source:
  location: ../../../../samples/streams/sample_720p.h264

streammux:
  batch-size: 1
  batched-push-timeout: 40000
  width: 1280
  height: 720


tracker:
  tracker-width: 1280
  tracker-height: 720
  gpu-id: 0
  ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
  # ll-config-file required to set different tracker types
  # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_IOU.yml
  # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvSORT.yml
  ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml
  # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDCF_accuracy.yml
  # ll-config-file: ../../../../samples/configs/deepstream-app/config_tracker_NvDeepSORT.yml
  enable-batch-process: 1

# Inference using nvinfer:
# primary-gie:
#   plugin-type: 0
#   config-file-path: dstest2_pgie_config.yml

# secondary-gie1:
#   plugin-type: 0
#   config-file-path: dstest2_sgie1_config.yml

# secondary-gie2:
#   plugin-type: 0
#   config-file-path: dstest2_sgie2_config.yml

# secondary-gie3:
#   plugin-type: 0
#   config-file-path: dstest2_sgie3_config.yml

# Inference using nvinferserver:
primary-gie:
  plugin-type: 1
  config-file-path: dstest2_pgie_nvinferserver_config.txt

secondary-gie1:
  plugin-type: 1
  config-file-path: dstest2_sgie1_nvinferserver_config.txt

secondary-gie2:
  plugin-type: 1
  config-file-path: dstest2_sgie2_nvinferserver_config.txt

secondary-gie3:
  plugin-type: 1
  config-file-path: dstest2_sgie3_nvinferserver_config.txt

Run sample_720p.h264 Demo


./deepstream-test2-app sample_720p.h264
With tracker
Using file: sample_720p.h264
Opening in BLOCKING MODE
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:16.380483978  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary3-nvinference-engine> NvDsInferContext[UID 4]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 4]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224
1   OUTPUT kFLOAT predictions/Softmax 6x1x1

0:00:16.490211460  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary3-nvinference-engine> NvDsInferContext[UID 4]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 4]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_VehicleTypes/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:16.666185541  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<secondary3-nvinference-engine> [UID 4]: Load new model:dstest2_sgie3_config.txt sucessfully
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:18.398442388  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary2-nvinference-engine> NvDsInferContext[UID 3]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 3]: deserialized trt engine from :/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

0:00:18.491311207  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary2-nvinference-engine> NvDsInferContext[UID 3]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 3]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_CarMake/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:18.655553927  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<secondary2-nvinference-engine> [UID 3]: Load new model:dstest2_sgie2_config.txt sucessfully
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:20.351048345  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary1-nvinference-engine> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 2]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 2
0   INPUT  kFLOAT input_1         3x224x224
1   OUTPUT kFLOAT predictions/Softmax 12x1x1

0:00:20.439908661  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<secondary1-nvinference-engine> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 2]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Secondary_CarColor/resnet18.caffemodel_b16_gpu0_int8.engine
0:00:20.607844871  7866 0xaaaad8a7c610 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<secondary1-nvinference-engine> [UID 2]: Load new model:dstest2_sgie1_config.txt sucessfully
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvTrackerParams::getConfigRoot()] !!![WARNING] Can't open config file (/opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-test2/../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml). Will go ahead with default values
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvTrackerParams::getConfigRoot()] !!![WARNING] Can't open config file (/opt/nvidia/deepstream/deepstream-6.2/sources/apps/sample_apps/deepstream-test2/../../../../samples/configs/deepstream-app/config_tracker_NvDCF_perf.yml). Will go ahead with default values
段错误 (核心已转储)

what’s the output of “deepstream-app --version-all”?


sqn@sqn-desktop:~/Desktop$ deepstream-app --version-all
deepstream-app version 6.2.0
DeepStreamSDK 6.2.0
CUDA Driver Version: 11.4
CUDA Runtime Version: 11.4
TensorRT Version: 8.5
cuDNN Version: 8.6
libNVWarp360 Version: 2.0.1d3

Snipaste-2023-06-19-15-50-09.png

Debugging found that as long as the method similar to nvds is called, it will be directly abnormal. Is it a problem with yaml or where does it need to be initialized?

Did you modify the yaml config file?

Extracted from the official code has not been modified

I think this a problem which relate about memory.
Can you try this command below first ?

rm -rf ~/.cache/gstreamer-1.0

Or not

The yaml dynamic library used by the official demo uses a version of 0.6
The current version of my yaml is 0.6.3

The problem has been solved, just lower the version of yaml to 0.6.0

1 Like

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