Segmentation fault with Software encoder

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1
• TensorRT Version 7.2.2.3
• NVIDIA GPU Driver Version (valid for GPU only) 460.32.03
• Issue Type( questions, new requirements, bugs) bug

When cpu based software encoder (enc-type=1) is used for video saving, the deepstream app crashes with segmentation fault, while it’s working with hardware encoder (enc-type=0).

deepstream-app -c deepstreamConf.txt

Config file

[application]
enable-perf-measurement=1
perf-measurement-interval-sec=5
kitti-track-output-dir=/var/febrieye/log/deepstreamLog/

[tiled-display]
enable=0
width=1920
height=1080
rows=1
columns=1
gpu-id=0
#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform
#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory, applicable for Tesla
#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory, applicable for Tesla
#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory, applicable for Tesla
#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetson
nvbuf-memory-type=0

[source0]
enable=1
#Type - 1=CameraV4L#2 2=URI 3=MultiURI 4=RTSP
type=4
uri=rtsp://admin:admin123@10.33.1.21:554
num-sources=1
gpu-id=0
# (0): memtype_device   - Memory type Device
# (1): memtype_pinned   - Memory type Host Pinned
# (2): memtype_unified  - Memory type Unified
cudadec-memtype=0

[sink0]
enable=1
# 1=Fakesink, 2=EGL (nveglglessink), 3=Filesink, 4=RTSP, 5=Overlay (Jetson only)
type=3
output-file=out.mp4
#encoder type 0=Hardware 1=Software
enc-type=1
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
sync=0
#iframeinterval=10
bitrate=2000000
#H264 Profile - 0=Baseline 2=Main 4=High
#H265 Profile - 0=Main 1=Main10
profile=0
source-id=0

[streammux]
batch-size=1
## Set muxer output width and height
width=1920
height=1080
##Boolean property to inform muxer that sources are live
live-source=1
gpu-id=0
##time out in usec, to wait after the first buffer is available
##to push the batch even if the complete batch is not formed
batched-push-timeout=40000
##Enable to maintain aspect ratio wrt source, and allow black borders, works
##along with width, height properties
enable-padding=0
nvbuf-memory-type=0

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

[tests]
file-loop=0

gdb log:

#0  0x00007fffae4985c0 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#1  0x00007fffae5db553 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#2  0x00007fffae6c4885 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#3  0x00007fffae435eac in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#4  0x00007fffae6a75d5 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#5  0x00007fffae42b966 in  () at /usr/lib/x86_64-linux-gnu/libcuda.so
#6  0x00007fffae4e6ab7 in cuMemcpy2DUnaligned_v2 () at /usr/lib/x86_64-linux-gnu/libcuda.so
#7  0x00007ffff7b834eb in  () at /usr/local/cuda/lib64/libcudart.so.11.0
#8  0x00007ffff7b60bcf in  () at /usr/local/cuda/lib64/libcudart.so.11.0
#9  0x00007ffff7b9d878 in cudaMemcpy2D () at /usr/local/cuda/lib64/libcudart.so.11.0
#10 0x00007fff94c3de86 in NvBufSurfaceCopyCudaBatch () at /opt/nvidia/deepstream/deepstream/lib/libnvbufsurface.so
#11 0x00007fff94c3e009 in NvBufSurfaceCopySysToCuda () at /opt/nvidia/deepstream/deepstream/lib/libnvbufsurface.so
#12 0x00007fff94c3cd7a in NvBufSurfaceCopyImpl () at /opt/nvidia/deepstream/deepstream/lib/libnvbufsurface.so
#13 0x00007fff94c3c905 in NvBufSurfaceCopy () at /opt/nvidia/deepstream/deepstream/lib/libnvbufsurface.so
#14 0x00007fff87b6fa33 in gst_nvvideoconvert_transform () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so
#15 0x00007fffcb524401 in  () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#16 0x00007fffcb523b84 in  () at /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#17 0x00007ffff60ca89b in  () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#18 0x00007ffff60d2bc3 in gst_pad_push () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#19 0x00007fff8c1d1ba9 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so
#20 0x00007ffff60ff279 in  () at /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#21 0x00007ffff5b18c70 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff5b182a5 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff50436db in start_thread (arg=0x7fff6e932700) at pthread_create.c:463
#24 0x00007ffff558071f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Hi,
Reproed your issue, we are investigating, will update when there progress.