• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 5.0
• TensorRT Version 220.127.116.11
• 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_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
Caught SIGSEGV Spinning. Please run 'gdb gst-launch-1.0 12753' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
[NvTiler::Composite] ERROR: 349; NvBufSurfTransformComposite failed(-3) 0
or others. Also, not all frames are purple.
Two more observations:
I included a delay
USLEEPof 10ms in
gst_minimal_transform. The pipeline is not crashing with this delay, but none of the frames are purple.
I removed the
nvinferfrom 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