Nvstreammux error releasing cuda memory

The “Cuda failure: status=700 nvbufsurface: Error(-1) in releasing cuda memory” error occurs for some picture resolutions, formats and memory types when nvstreammux is added to the pipeline.

Error occurs when:

  • resolution 1848x1173 format png nvbuf-memory-typ 3
  • resolution 1848x1171 format png nvbuf-memory-typ 3
  • resolution 1848x1173 format jpeg nvbuf-memory-typ 3
  • resolution 1848x1171 format jpeg nvbuf-memory-typ 3
  • resolution 1848x1173 format jpeg nvbuf-memory-typ 0
  • resolution 1848x1171 format jpeg nvbuf-memory-typ 0

No error when

  • resolution 1848x1173 format png nvbuf-memory-typ 0
  • resolution 1848x1172 format png nvbuf-memory-typ 0
  • resolution 1848x1171 format png nvbuf-memory-typ 0
  • resolution 1848x1172 format png nvbuf-memory-typ 3
  • resolution 1848x1172 format jpeg nvbuf-memory-typ 3
  • resolution 1848x1172 format jpeg nvbuf-memory-typ 0

Error log for the variant resolution 1848x1171 format png nvbuf-memory-typ 3. The error and the log are similar for other variants.

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstURIDecodeBin:source: source = "\(GstFileSrc\)\ source"
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = image/png
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0/GstPngDec:pngdec0.GstPad:sink: caps = image/png, width=(int)1848, height=(int)1171
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0/GstPngParse:pngparse0.GstPad:src: caps = image/png, width=(int)1848, height=(int)1171
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0/GstPngDec:pngdec0.GstPad:src: caps = video/x-raw, format=(string)RGBA, width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false
/GstPipeline:pipeline0/GstNvStreamMux:muxer.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1024, height=(int)1024, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false, batch-size=(int)1, num-surfaces-per-frame=(int)1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1024, height=(int)1024, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false, batch-size=(int)1, num-surfaces-per-frame=(int)1
/GstPipeline:pipeline0/GstNvStreamMux:muxer.GstNvStreamPad:sink_0: caps = video/x-raw(memory:NVMM), width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, format=(string)RGBA, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert0.GstPad:sink: caps = video/x-raw, format=(string)RGBA, width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstURIDecodeBin:source.GstGhostPad:src_0.GstProxyPad:proxypad2: caps = video/x-raw, format=(string)RGBA, width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstURIDecodeBin:source/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad1: caps = video/x-raw, format=(string)RGBA, width=(int)1848, height=(int)1171, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, framerate=(fraction)0/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.000225423
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Setting pipeline to NULL ...
Freeing pipeline ...

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 6.1
• NVIDIA GPU Driver Version (valid for GPU only): 510.73.05
• Issue Type: bugs
• How to reproduce the issue ?

  1. docker run -it --rm --gpus=all -v `pwd`/data/:/data nvcr.io/nvidia/deepstream:6.1-base
  2. gst-launch-1.0 -v uridecodebin3 name=source uri=file:///data/pic_1848x1171.jpeg ! nvvideoconvert nvbuf-memory-type=3 ! ‘video/x-raw(memory:NVMM), format=RGBA’ ! muxer.sink_0 nvstreammux name=muxer width=1024 height=1024 batch-size=1 live-source=False ! fakesink

test_pictures.zip (5.3 KB)

I will check. what is your GPU model?

GeForce RTX 3070

it is related to odd resolution scaling, for workaround, please set interpolation-method=6 when using your nvstreammux, like this:
gst-launch-1.0 -v uridecodebin3 name=source uri=file:///data/pic_1848x1171.jpeg ! nvvideoconvert nvbuf-memory-type=3 ! “video/x-raw(memory:NVMM), format=RGBA” ! muxer.sink_0 nvstreammux name=muxer width=1024 height=1024 batch-size=1 live-source=False interpolation-method=6 ! fakesink

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.