Nvcompositor segfaults

Hello, I have a Jetson Orin Industrial, FRESHLY FLASHED.
Running JetPack 6 - L4T r36.3.0

And the nvcompositor GStreamer element simply doesnt work.

For example a very simple pipeline fails:

gst-launch-1.0   nvarguscamerasrc sensor-id=2 ! nvvidconv ! "video/x-raw(memory:NVMM),format=RGBA" ! nvcompositor ! fakesink

Log:

gst-launch-1.0   nvarguscamerasrc sensor-id=2 ! nvvidconv ! "video/x-raw(memory:NVMM),format=RGBA" ! nvcompositor ! fakesink
0:00:00.048356512  1902 0xaaaaebb728a0 WARN               vadisplay gstvadisplay.c:287:_va_warning:<vadisplaydrm0> VA error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
0:00:00.048401536  1902 0xaaaaebb728a0 WARN               vadisplay gstvadisplay.c:347:gst_va_display_initialize:<vadisplaydrm0> vaInitialize: unknown libva error
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.644022016  1901 0xaaab0aa80000 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.644111872  1901 0xaaab0aa80060 WARN         videoaggregator gstvideoaggregator.c:1140:gst_video_aggregator_find_best_format:<nvcompositor0> Nothing compatible with video/x-raw(memory:NVMM), format=(string){ RGBA }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.644173280  1901 0xaaab0aa80060 WARN            nvcompositor gstnvcompositor.c:826:gst_nvcompositor_fixate_caps:<nvcompositor0> This pad is invalid
0:00:00.644226272  1901 0xaaab0aa80060 FIXME               basesink gstbasesink.c:3395:gst_base_sink_default_event:<fakesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Redistribute latency...
GST_ARGUS: Creating output stream
Caught SIGSEGV
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 118000, max 33333000;

GST_ARGUS: Running with following settings:
   Camera index = 2 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Spinning.  Please run 'gdb gst-launch-1.0 1901' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

nvvidconv clearly supports NV12->RGBA conversion:



using the regular compositor works:

nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,format=RGBA" ! queue ! compositor name=comp ! queue ! fakesink


But converting video/x-raw,format=RGBA back to "video/x-raw(memory:NVMM),format=NV12 doesnt work :

gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,format=RGBA" ! queue ! compositor name=comp ! queue ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink

log:

GST_DEBUG=3 env -u DISPLAY env -u DISPLAY gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,foGST_DEBUG=3 env -u DISPLAY env -u DISPLAY gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,format=RGBA" ! queue ! compositor name=comp ! queue ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.344051123  2806 0xaaaae2683120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.345290969  2806 0xaaaae2683000 FIXME               basesink gstbasesink.c:3395:gst_base_sink_default_event:<fakesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Redistribute latency...
GST_ARGUS: Creating output stream
nvbufsurface: NvBufSurfaceCopy: buffer param mismatch
nvbufsurface: NvBufSurfaceCopy: failed to copy
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4754: => NvVicCompose Failed

gst_nvvconv_transform: NvBufSurfTransform Failed 
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 118000, max 33333000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Redistribute latency...
0:00:00.427569058  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: Internal data stream error.
0:00:00.427626565  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue1: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue1:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.083551057
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...rmat=RGBA" ! queue ! compositor name=comp ! queue ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.344051123  2806 0xaaaae2683120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.345290969  2806 0xaaaae2683000 FIXME               basesink gstbasesink.c:3395:gst_base_sink_default_event:<fakesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Redistribute latency...
GST_ARGUS: Creating output stream
nvbufsurface: NvBufSurfaceCopy: buffer param mismatch
nvbufsurface: NvBufSurfaceCopy: failed to copy
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4754: => NvVicCompose Failed

gst_nvvconv_transform: NvBufSurfTransform Failed 
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 118000, max 33333000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Redistribute latency...
0:00:00.427569058  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: Internal data stream error.
0:00:00.427626565  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue1: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue1:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.083551057
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

Clearly something is wrong and such simple pipelines should work with no issue, thats not ok.

Hi,
Here are some suggestions for the common issues:

1. Performance

Please run the below command before benchmarking deep learning use case:

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

2. Installation

Installation guide of deep learning frameworks on Jetson:

3. Tutorial

Startup deep learning tutorial:

4. Report issue

If these suggestions don’t help and you want to report an issue to us, please attach the model, command/step, and the customized app (if any) with us to reproduce locally.

Thanks!

Hello, I have a Jetson Orin Industrial, FRESHLY FLASHED.
Running JetPack 6 - L4T r36.3.0

commands: See above

Any feedback?

Hi,
You would need to configure some parameters to nvcompositor. Please refer to the examples in gstreamer user guide:

Accelerated GStreamer — NVIDIA Jetson Linux Developer Guide 1 documentation

Hey @DaneLLL thanks for your answer,
Indeed I was not using the nvcompositor correctly.
But the nvcompositor segfaults, regardless of my mistake this is not an acceptable failure state. I would expect the element to report a meaningful error message and return an error during NULL->READY or READY->NULL state transition.


About this other pipeline,converting video/x-raw,format=RGBA back to "video/x-raw(memory:NVMM),format=NV12, why doest it work ?

gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   \
  nvvidconv ! videoconvert ! "video/x-raw,format=RGBA" ! queue ! \
  compositor name=comp ! queue ! \
  videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink

log:

GST_DEBUG=3 env -u DISPLAY env -u DISPLAY gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,foGST_DEBUG=3 env -u DISPLAY env -u DISPLAY gst-launch-1.0   nvarguscamerasrc ! "video/x-raw(memory:NVMM),format=NV12" !   nvvidconv ! videoconvert ! "video/x-raw,format=RGBA" ! queue ! compositor name=comp ! queue ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.344051123  2806 0xaaaae2683120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.345290969  2806 0xaaaae2683000 FIXME               basesink gstbasesink.c:3395:gst_base_sink_default_event:<fakesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Redistribute latency...
GST_ARGUS: Creating output stream
nvbufsurface: NvBufSurfaceCopy: buffer param mismatch
nvbufsurface: NvBufSurfaceCopy: failed to copy
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4754: => NvVicCompose Failed

gst_nvvconv_transform: NvBufSurfTransform Failed 
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 118000, max 33333000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Redistribute latency...
0:00:00.427569058  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: Internal data stream error.
0:00:00.427626565  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue1: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue1:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.083551057
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...rmat=RGBA" ! queue ! compositor name=comp ! queue ! videoconvert ! nvvidconv ! "video/x-raw(memory:NVMM),format=NV12" ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.344051123  2806 0xaaaae2683120 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nvarguscamerasrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.345290969  2806 0xaaaae2683000 FIXME               basesink gstbasesink.c:3395:gst_base_sink_default_event:<fakesink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
Redistribute latency...
GST_ARGUS: Creating output stream
nvbufsurface: NvBufSurfaceCopy: buffer param mismatch
nvbufsurface: NvBufSurfaceCopy: failed to copy
/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4754: => NvVicCompose Failed

gst_nvvconv_transform: NvBufSurfTransform Failed 
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1080 FR = 29,999999 fps Duration = 33333334 ; Analog Gain range min 1,000000, max 31,622776; Exposure Range min 118000, max 33333000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Redistribute latency...
0:00:00.427569058  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: Internal data stream error.
0:00:00.427626565  2806 0xaaaae2683060 WARN                   queue gstqueue.c:992:gst_queue_handle_sink_event:<queue1> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue1: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(992): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue1:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.083551057
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

Hi,
For further debugging, please dowload source code of the nv plugins:

Jetson Linux 36.3 | NVIDIA Developer
Driver Package (BSP) Sources

You can add debug prints and rebuild the plugins to check why it fails. Ideally if you follow the examples in gstreamer user guide, it is supposed to work well.

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