marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.4k stars 345 forks source link

Thread 9 "deepstream-app" received signal SIGSEGV, Segmentation fault. #399

Closed Today-fine closed 1 year ago

Today-fine commented 1 year ago

Run GST_DEBUG=2 deepstream-app -c deepstream_app_config.txt, the engine file is successfully generated, but the time period for saving to the local mp4 is wrong

root@sqn-desktop:~/DeepStream-Yolo# GST_DEBUG=2 deepstream-app -c deepstream_app_config.txt 
Opening in BLOCKING MODE 
0:00:00.394822840 63101 0xaaaab3eddf80 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xaaaab3bb8200 Failed to determine interlace mode
0:00:00.395179400 63101 0xaaaab3eddf80 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xaaaab3bb8200 Failed to determine interlace mode
0:00:00.395264108 63101 0xaaaab3eddf80 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xaaaab3bb8200 Failed to determine interlace mode
0:00:00.395365232 63101 0xaaaab3eddf80 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xaaaab3bb8200 Failed to determine interlace mode
0:00:00.395593210 63101 0xaaaab3eddf80 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<sink_sub_bin_encoder1:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:07.128370510 63101 0xaaaab3eddf80 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/root/DeepStream-Yolo/model_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: [Implicit Engine Info]: layers num: 4
0   INPUT  kFLOAT input           3x640x640       
1   OUTPUT kFLOAT boxes           25200x4         
2   OUTPUT kFLOAT scores          25200x1         
3   OUTPUT kFLOAT classes         25200x1         

0:00:07.200156985 63101 0xaaaab3eddf80 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /root/DeepStream-Yolo/model_b1_gpu0_fp32.engine
0:00:07.212999857 63101 0xaaaab3eddf80 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/root/DeepStream-Yolo/config_infer_primary_yoloV5.txt sucessfully
0:00:07.216100411 63101 0xaaaab3eddf80 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
0:00:07.217583548 63101 0xaaaab3eddf80 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet

Runtime commands:
        h: Print this help
        q: Quit

        p: Pause
        r: Resume

NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source.
      To go back to the tiled display, right-click anywhere on the window.

**PERF:  FPS 0 (Avg)
**PERF:  0.00 (0.00)
** INFO: <bus_callback:239>: Pipeline ready

0:00:07.240453841 63101 0xaaaabec86b00 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:07.240958855 63101 0xaaaabec86b00 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
Opening in BLOCKING MODE 
0:00:07.519033081 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:07.519182367 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.519304069 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.519387976 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.519467436 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:07.630684611 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:4512:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:07.630825449 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.630980848 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.631075924 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
0:00:07.631155831 63101 0xfffed00735e0 WARN                    v4l2 gstv4l2object.c:2398:gst_v4l2_object_add_interlace_mode:0xfffec801db50 Failed to determine interlace mode
** INFO: <bus_callback:225>: Pipeline running

0:00:07.643923180 63101 0xfffed00735e0 WARN            v4l2videodec gstv4l2videodec.c:1880:gst_v4l2_video_dec_decide_allocation:<nvv4l2decoder0> Duration invalid, not setting latency
0:00:07.648211626 63101 0xfffed00735e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
0:00:07.669038723 63101 0xaaaab3ed7800 WARN          v4l2bufferpool gstv4l2bufferpool.c:1114:gst_v4l2_buffer_pool_start:<sink_sub_bin_encoder1:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:07.670075089 63101 0xfffed400bd80 WARN          v4l2bufferpool gstv4l2bufferpool.c:1565:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:src> Driver should never set v4l2_buffer.field to ANY
Segmentation fault (core dumped)
Thread 9 "deepstream-app" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffff7cd10900 (LWP 61867)]
0x0000ffff8c3e3264 in NvDsInferParseCustomYolo(std::vector<NvDsInferLayerInfo, std::allocator<NvDsInferLayerInfo> > const&, NvDsInferNetworkInfo const&, NvDsInferParseDetectionParams const&, std::vector<NvDsInferObjectDetectionInfo, std::allocator<NvDsInferObjectDetectionInfo> >&) ()
   from /root/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so
(gdb) bt
#0  0x0000ffff8c3e3264 in NvDsInferParseCustomYolo(std::vector<NvDsInferLayerInfo, std::allocator<NvDsInferLayerInfo> > const&, NvDsInferNetworkInfo const&, NvDsInferParseDetectionParams const&, std::vector<NvDsInferObjectDetectionInfo, std::allocator<NvDsInferObjectDetectionInfo> >&) ()
    at /root/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so
#1  0x0000ffff8c3e35e0 in NvDsInferParseYolo () at /root/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so
#2  0x0000ffffc16be960 in  () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_infer.so
#3  0x0000ffffc16a2104 in  () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_infer.so
#4  0x0000ffffc16a2368 in  () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_infer.so
#5  0x0000ffffc16a61d0 in nvdsinfer::NvDsInferContextImpl::dequeueOutputBatch(NvDsInferContextBatchOutput&) () at /opt/nvidia/deepstream/deepstream-6.2/lib/libnvds_infer.so
#6  0x0000ffffc17b58fc in  () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so
#7  0x0000fffff7ccb47c in  () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#8  0x0000fffff70c4624 in start_thread (arg=0xfffff7ceee30) at pthread_create.c:477
#9  0x0000fffff6f5849c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5

[tiled-display]
enable=1
rows=1
columns=1
width=1280
height=720
gpu-id=0
nvbuf-memory-type=0

[source0]
enable=1
type=3
uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
num-sources=1
gpu-id=0
cudadec-memtype=0

[sink0]
enable=o
type=2
sync=0
gpu-id=0
nvbuf-memory-type=0

[sink1]
enable=1
type=3
container=1
codec=1
enc-type=0
sync=2
bitrate=4000000
profile=0
output-file=output.mp4
source-id=0

[osd]
enable=1
gpu-id=0
border-width=5
text-size=15
text-color=1;1;1;1;
text-bg-color=0.3;0.3;0.3;1
font=Serif
show-clock=0
clock-x-offset=800
clock-y-offset=820
clock-text-size=12
clock-color=1;0;0;0
nvbuf-memory-type=0

[streammux]
gpu-id=0
live-source=0
batch-size=1
batched-push-timeout=40000
width=1920
height=1080
enable-padding=0
nvbuf-memory-type=0

[primary-gie]
enable=1
gpu-id=0
gie-unique-id=1
nvbuf-memory-type=0
config-file=config_infer_primary_yoloV5.txt

[tests]
file-loop=0
[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
model-color-format=0
onnx-file=yolov5s.onnx
model-engine-file=model_b1_gpu0_fp32.engine
#int8-calib-file=calib.table
labelfile-path=labels.txt
batch-size=1
network-mode=0
num-detected-classes=80
interval=0
gie-unique-id=1
process-mode=1
network-type=0
cluster-mode=2
maintain-aspect-ratio=1
symmetric-padding=1
#force-implicit-batch-dim=1
workspace-size=1000
parse-bbox-func-name=NvDsInferParseYolo
#parse-bbox-func-name=NvDsInferParseYoloCuda
custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so
engine-create-func-name=NvDsInferYoloCudaEngineGet

[class-attrs-all]
nms-iou-threshold=0.45
pre-cluster-threshold=0.25
topk=300
TensorRT Version:8.5.2.2
GPU Type:Jetson Xavier NX
CUDA Version:11.4.315
CUDNN Version:8.6.0.166
Operating System + Version:Ubuntu 20.04 focal
DeepStream Version : 6.2
Gstreamer Version :1.16.3
Today-fine commented 1 year ago

problem solved https://hub.fgit.ml/marcoslucianops/DeepStream-Yolo/issues/395#issue-1774322725