Segmentation Fault ERROR

Hello.
I am trying to run the Python file from this repository using the given command: python3 deepstream.py -s file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 -c config_infer_primary_yoloV8_face.txt

Every time I run the command I’m getting Segmentation fault ERROR with a black screen, below is the log I get while running the file:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ubuntu@ubuntu-Blade-15-2022-RZ09-0421:~/Documents/DeepStream-Yolo-Face$ python3 deepstream.py -s file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 -c config_infer_primary_yoloV8_face.txt

SOURCE: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
CONFIG_INFER: config_infer_primary_yoloV8_face.txt
STREAMMUX_BATCH_SIZE: 1
STREAMMUX_WIDTH: 1920
STREAMMUX_HEIGHT: 1080
GPU_ID: 0
PERF_MEASUREMENT_INTERVAL_SEC: 5
JETSON: FALSE

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Initialized
0:00:03.122840037 24409 0x3042a60 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1988> [UID = 1]: deserialized trt engine from :/home/ubuntu/Documents/DeepStream-Yolo-Face/yolov8n-face.onnx_b1_gpu0_fp32.engine
WARNING: [TRT]: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 2
0 INPUT kFLOAT images 3x640x640
1 OUTPUT kFLOAT output0 5x8400

0:00:03.173926305 24409 0x3042a60 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2091> [UID = 1]: Use deserialized engine model: /home/ubuntu/Documents/DeepStream-Yolo-Face/yolov8n-face.onnx_b1_gpu0_fp32.engine
0:00:03.175549029 24409 0x3042a60 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:config_infer_primary_yoloV8_face.txt sucessfully

Segmentation fault (core dumped)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Please, I wonder if anyone could help me with this issue, how can I fix it?

DeepStream Version = 6.3
YOLO MODEL = Yolov8n-face
CUDA = 12.3
TensorRT = 8.5.3.1
NVIDIA GRAPHIC = GeForce RTX 3080 Ti
32GB RAM and 1TB SSD

can you use gdb to get the crash stack? could you share the code link?

I got to solve the issue above.

However, I am now facing a new Error. I can run the script and it shows the screen with the video, but the video is frozen, and then I get the following ERROR:

Traceback (most recent call last):
File “deepstream.py”, line 149, in tracker_src_pad_buffer_probe
parse_face_from_meta(frame_meta, obj_meta)
File “deepstream.py”, line 115, in parse_face_from_meta
circle_params.yc = yc
TypeError: (): incompatible function arguments. The following argument types are supported:
1. (self: pyds.NvOSD_CircleParams, arg0: int) → None

Invoked with: <pyds.NvOSD_CircleParams object at 0x7ff2601a7c70>, -395
Traceback (most recent call last):
File “deepstream.py”, line 149, in tracker_src_pad_buffer_probe
parse_face_from_meta(frame_meta, obj_meta)
File “deepstream.py”, line 115, in parse_face_from_meta
circle_params.yc = yc
TypeError: (): incompatible function arguments. The following argument types are supported:
1. (self: pyds.NvOSD_CircleParams, arg0: int) → None

Here is the link of the GitHub repository: GitHub - marcoslucianops/DeepStream-Yolo-Face: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 application for YOLO-Face models

after testing on DS6.4 docker with DGPU, I can’t reproduce this issue. here is the log.12.19.txt (2.7 KB)
are you testing in DS6.3 docker? did you try source sample_1080p_h264.mp4? if it is related to source, could you share your test source? Thanks!

I wasn’t testing in docker. I just tested it in docker, and I don’t how to open the file directory in docker. I get this error when I try to do so.

root@ubuntu-Blade-15-2022-RZ09-0421:/Documents/DeepStream-Yolo-Face# python3 deepstream.py -s file:///opt/nvidia/deepstream/deepstream/samples/streams/sample-video.mp4 -c config_infer_primary_yoloV8_face.txt
python3: can’t open file ‘deepstream.py’: [Errno 2] No such file or directory

I’m still learning DeepStream and Ubuntu OS

why is there no deepstream.py?
notice the app can run outside docker, can you try file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 outside docker? please check if there is also “TypeError: (): incompatible function argument”.

This is what I get when I try it outside docker:

ubuntu@ubuntu-Blade-15-2022-RZ09-0421:~$ file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
bash: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4: No such file or directory

please test python3 deepstream.py -s file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 -c config_infer_primary_yoloV8_face.txt

I just tried outside docker, and I still get the same error. Even when I test using docker I also get the error of “No such file or directory”. Below is the image of how I am initializing docker and the errors I’m getting.

I copied the DeepStream-Yolo-Face folder into the Documents folder, giving the following path: Documents/DeepStream-Yolo-Face.

When I try to do “ls -l” using docker I get “total 0” showing that there are no file inside the folder ‘DeepStream-Yolo-Face’

how did you get it run outside docker? could you share the result of “ll DeepStream-Yolo-Face” outside docker?

I just tested it outside docker, and still getting the same ERROR

is the following command correct?

sudo docker run --gpus all -it --rm --net=host --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -w /Documents/DeepStream-Yolo-Face/ nvcr.io/nvidia/deepstream:6.3-gc-triton-devel

I just solved the error. The issue was in the docker command I used. I fixed it with this:

xhost +
sudo docker run --gpus all -it --rm --net=host --privileged -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/ubuntu/Documents/DeepStream-Yolo-Face:/Documents/DeepStream-Yolo-Face -e DISPLAY=$DISPLAY -w /Documents/DeepStream-Yolo-Face nvcr.io/nvidia/deepstream:6.3-gc-triton-devel

1 Like

thanks for sharing! is there still “TypeError: (): incompatible function argument”?

No please. I am now getting the following errors:

root@ubuntu-Blade-15-2022-RZ09-0421:/Documents/DeepStream-Yolo-Face# python3 deepstream.py -s file:///opt/nvidia/deepstream/deepstream/samples/streams/sample-video.mp4 -c config_infer_primary_yoloV8_face.txt

(gst-plugin-scanner:203): GStreamer-WARNING **: 08:12:49.891: 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:203): GStreamer-WARNING **: 08:12:50.695: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2enc.so’: libmpeg2encpp-2.1.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:203): GStreamer-WARNING **: 08:12:50.874: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:203): GStreamer-WARNING **: 08:12:50.907: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstchromaprint.so’: libavcodec.so.58: cannot open shared object file: No such file or directory

(gst-plugin-scanner:203): GStreamer-WARNING **: 08:12:50.948: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpg123.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:203): GStreamer-WARNING **: 08:12:51.138: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2dec.so’: libmpeg2.so.0: cannot open shared object file: No such file or directory

SOURCE: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample-video.mp4
CONFIG_INFER: config_infer_primary_yoloV8_face.txt
STREAMMUX_BATCH_SIZE: 1
STREAMMUX_WIDTH: 1920
STREAMMUX_HEIGHT: 1080
GPU_ID: 0
PERF_MEASUREMENT_INTERVAL_SEC: 5
JETSON: FALSE

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Initialized
0:00:20.372630074 202 0x1f02520 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1988> [UID = 1]: deserialized trt engine from :/Documents/DeepStream-Yolo-Face/yolov8n-face.onnx_b1_gpu0_fp32.engine
WARNING: [TRT]: The getMaxBatchSize() function should not be used with an engine built from a network created with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag. This function will always return 1.
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [Implicit Engine Info]: layers num: 4
0 INPUT kFLOAT images 3x640x640
1 OUTPUT kFLOAT output0 80x80x80
2 OUTPUT kFLOAT 389 80x40x40
3 OUTPUT kFLOAT 397 80x20x20

0:00:20.812569474 202 0x1f02520 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2091> [UID = 1]: Use deserialized engine model: /Documents/DeepStream-Yolo-Face/yolov8n-face.onnx_b1_gpu0_fp32.engine
0:00:20.834966807 202 0x1f02520 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:config_infer_primary_yoloV8_face.txt sucessfully
[NvMultiObjectTracker] De-initialized

ERROR: gst-resource-error-quark: Resource not found. (3): gstfilesrc.c(532): gst_file_src_start (): /GstPipeline:pipeline0/GstURIDecodeBin:source-bin-0000/GstFileSrc:source:
No such file “/opt/nvidia/deepstream/deepstream/samples/streams/sample-video.mp4”

@fanzh can you help show me how are you able to run the app using Docker? I’m getting the following error:

Traceback (most recent call last):
File “deepstream.py”, line 13, in
import pyds
ModuleNotFoundError: No module named ‘pyds’

but I have it installed. Any help please?

as the log shown, the app can’t find the source video. please make sure the path is valid.