SIGSEGV, nvtracker DeepStream 3.0

I try to modify sample2 to work with USB webcam. It fine working with DeepStream 2.0, but crash with 3.0.

Ubuntu 16.04
CUDA 10.0
TensorRT 5.0.2.6
GStreamer 1.8.3
NVidia GT1030 (DDR5)

https://drive.google.com/open?id=1s35PybWTX81ZSbJvdVYZPAX_B66ZS5zB

[Switching to Thread 0x7fff917fe700 (LWP 27851)]
0x00007fffcb5bf6be in gst_nv_tracker_submit_input_buffer(_GstBaseTransform*, int, _GstBuffer*) () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_tracker.so
(gdb) bt
#0  0x00007fffcb5bf6be in gst_nv_tracker_submit_input_buffer(_GstBaseTransform*, int, _GstBuffer*) () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_tracker.so
#1  0x00007ffff58da422 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#2  0x00007ffff7b1b59f in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007ffff7b23543 in gst_pad_push () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007fffedf20996 in gst_nvinfer_inference_thread () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_infer.so
#5  0x00007ffff75b9c55 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff66506ba in start_thread (arg=0x7fff917fe700) at pthread_create.c:333
#7  0x00007ffff728641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Same happens when i try run it with:

gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg,width=1600,height=1200,framerate=15/1 ! \
jpegparse ! jpegdec ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! \
"video/x-raw(memory:NVMM),format=NV12" ! nvinfer config-file-path=./dstest2_pgie_config.txt ! nvtracker

When I remove nvtracker will not crash. Interestingly, the example (without modifications) works fine.

$ gdb /usr/bin/gst-launch-1.0 
GNU gdb (Ubuntu 8.2-0ubuntu1~16.04.1) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gst-launch-1.0...(no debugging symbols found)...done.
(gdb) run  -v v4l2src device=/dev/video0 ! image/jpeg,width=1600,height=1200,framerate=15/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! video/x-raw\(memory:NVMM\),format=NV12 ! nvinfer config-file-path=./dstest2_pgie_config.txt ! nvtracker
Starting program: /usr/bin/gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg,width=1600,height=1200,framerate=15/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! video/x-raw\(memory:NVMM\),format=NV12 ! nvinfer config-file-path=./dstest2_pgie_config.txt ! nvtracker
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Установка конвейера в состояние PAUSED…
[New Thread 0x7fffca8d5700 (LWP 28312)]
[New Thread 0x7fffca0d4700 (LWP 28314)]
[New Thread 0x7fffc98d3700 (LWP 28315)]
[New Thread 0x7fffc8f4f700 (LWP 28316)]
>>> Generating new TRT model engine
Using INT8 data type.
[New Thread 0x7fffbd1c5700 (LWP 28317)]

 ***** Storing serialized engine file as /home/nicktrain/Загрузки/DeepStreamSDK-Tesla-v3.0/DeepStream_Release/sources/apps/sample_apps/deepstream-test2e/../../../../samples/models/Primary_Detector/resnet10.caffemodel_b1_int8.engine batchsize = 1 *****

[New Thread 0x7fffbdfff700 (LWP 28318)]
[New Thread 0x7fffb3fff700 (LWP 28319)]
[Thread 0x7fffb3fff700 (LWP 28319) exited]
[New Thread 0x7fffb37fe700 (LWP 28320)]
Конвейер работает и не требует состояния PREROLL…
[New Thread 0x7fffb2ffd700 (LWP 28321)]
Установка конвейера в состояние PLAYING…
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "image/jpeg\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "image/jpeg\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = "image/jpeg\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "image/jpeg\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:src: caps = "image/jpeg\,\ parsed\=\(boolean\)true\,\ format\=\(string\)UYVY\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:sink: caps = "image/jpeg\,\ parsed\=\(boolean\)true\,\ format\=\(string\)UYVY\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)1:4:0:0\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)3/4\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)3/4\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/Gstnvvidconv:nvvidconv0.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstNvInfer:nvinfer0.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstNvTracker:nvtracker0.GstPad:src: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstNvTracker:nvtracker0.GstPad:sink: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstNvInfer:nvinfer0.GstPad:sink: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter2.GstPad:sink: caps = "video/x-raw\(memory:NVMM\)\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)15/1"
/GstPipeline:pipeline0/Gstnvvidconv:nvvidconv0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)3/4\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)3/4\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/GstVideoScale:videoscale0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)15/1\,\ format\=\(string\)NV12"
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1600\,\ height\=\(int\)1200\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)1:4:0:0\,\ framerate\=\(fraction\)15/1"

Thread 7 "gst-launch-1.0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffbdfff700 (LWP 28318)]
0x00007fffcb1b56be in gst_nv_tracker_submit_input_buffer(_GstBaseTransform*, int, _GstBuffer*) () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_tracker.so
(gdb) bt
#0  0x00007fffcb1b56be in gst_nv_tracker_submit_input_buffer(_GstBaseTransform*, int, _GstBuffer*) () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_tracker.so
#1  0x00007ffff54d0422 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#2  0x00007ffff7b1b59f in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#3  0x00007ffff7b23543 in gst_pad_push () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#4  0x00007fffedb16996 in gst_nvinfer_inference_thread () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_infer.so
#5  0x00007ffff75b9c55 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff73336ba in start_thread (arg=0x7fffbdfff700) at pthread_create.c:333
#7  0x00007ffff706941d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)

I also try other pipeline:
this working:

gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg,width=1600,height=1200,framerate=15/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! video/x-raw\(memory:NVMM\),format=NV12 ! nvinfer config-file-path=./dstest2_pgie_config.txt ! nvvidconv ! nvosd ! nveglglessink sync=false

this same problem:

gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg,width=1600,height=1200,framerate=15/1 ! jpegparse ! jpegdec ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! video/x-raw\(memory:NVMM\),format=NV12 ! nvinfer config-file-path=./dstest2_pgie_config.txt ! nvtracker ! nvvidconv ! nvosd ! nveglglessink sync=false

Maybe i have wrong version OpenCV? Or wrong build?

Hi @lubagov,
DS 3.0 is really old, even there is a bug, it’s almost possible to provide patch for it.
The latest release is 5.0.1, can you try 5.0.1?

Thanks!

I really ask it 2 year ago, and DS3.0 was last version…

1 Like