• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 5.0
• TensorRT Version 7.1.3.4
• NVIDIA GPU Driver Version (valid for GPU only) 440.33.01
• Issue Type( questions, new requirements, bugs) question
• How to reproduce the issue ?
I wrote a custom plugin minimal
. I can’t do an in-place transformation, that’s why I implemented functions gst_minimal_transform
and gst_minimal_prepare_output_buffer
. It’s based on https://forums.developer.nvidia.com/t/qustion-of-memory-leak-gst-plugin-based-on-dsexample/145151
For this example, I simply use NvBufSurfaceMemSet
in the transform function to set the UV-plane in the output buffer to a value representing purple.
Something seems wrong with the buffers on the GPU. The pipeline crashes with different errors, e.g.
Cuda failure: status=1 in CreateTextureObj at line 2562
nvbufsurftransform.cpp:2624: => Transformation Failed -2
or
Caught SIGSEGV
Spinning. Please run 'gdb gst-launch-1.0 12753' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
or
[NvTiler::Composite] ERROR: 349; NvBufSurfTransformComposite failed(-3)
0
or others. Also, not all frames are purple.
Two more observations:
-
I included a delay
USLEEP
of 10ms ingst_minimal_transform
. The pipeline is not crashing with this delay, but none of the frames are purple. -
I removed the
nvinfer
from the pipeline and then even without delay the pipeline doesn’t crash and all frames are purple.
It seems the information in the output buffer is decaying and being overwritten, so I assume the buffers are not allocated properly on the GPU. What am I doing wrong?
NB: I cannot use an in-place plugin like dsexample, since the intended purpose of this plugin is to create surfaces with a different batch and frame size than the input.
This is how I run the pipeline
gst-launch-1.0 videotestsrc pattern=0 ! nvvideoconvert ! "video/x-raw(memory:NVMM)" ! m.sink_0 \
nvstreammux name=m num-surfaces-per-frame=1 batch-size=1 width=800 height=600 ! \
minimal ! \
nvinfer config-file-path= /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.txt batch-size=1 ! \
nvmultistreamtiler rows=1 columns=1 height=600 width=800 ! \
nvvideoconvert nvbuf-memory-type=3 ! \
nveglglessink
Source code of the plugin is attached.
gstminimal.cpp (11.4 KB)
gstminimal.h (3.2 KB)