Gstreamer 1.20.3 and nvcompositor with intervideo SIGSEGV Fault

I have a problem with nvcompositor, after installing the new version of deepstream 6.4 and the new version of gstreamer 1.20.3. I have a SIGSEGV crash when I run the following command:

gst-launch-1.0  videotestsrc pattern=smpte ! nvvidconv ! video/x-raw,format=RGBA ! intervideosink channel=cv_mire intervideosrc name=intervideosrc_0 channel=cv_mire ! nvvidconv ! video/x-raw,format=RGBA ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! comp.sink_0 intervideosrc name=intervideosrc_1 channel=cv_mire ! nvvidconv ! video/x-raw,format=RGBA ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! queue ! comp.sink_1 nvcompositor name=comp sink_0::xpos=0   sink_0::ypos=0 sink_0::width=320 sink_0::height=320 sink_1::xpos=320 sink_1::ypos=0 sink_1::width=320 sink_1::height=320 ! nvvidconv ! video/x-raw,format=RGBA ! nv3dsink

Hardware Platform : Jetson Orin nano / nx
DeepStream Version - Deepstream-6.4
R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023
Linux : Linux ubuntu 22.04.3 LTS 5.10.120-tegra #1 SMP PREEMPT Tue Aug 1 12:32:50 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux
GStreamer : 1.20.3

But the same command works with
R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023
Linux : Linux ubuntu 20.04.6 TLS 5.10.120-tegra #1 SMP PREEMPT Tue Aug 1 12:32:50 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux
GStreamer : 1.16.3

Could you help?
Thanks in advance.

I thought these patches were applied in this new version of gstreamer 1.20.3 … but no

Modified file gstnvcompositor.c
@@ -526,10 +526,7 @@ gst_nvcompositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
    GstVideoAggregator * vagg, GstBuffer * buffer,
    GstVideoFrame * prepared_frame)
{
-  return
-      GST_VIDEO_AGGREGATOR_PAD_CLASS
-      (gst_nvcompositor_pad_parent_class)->prepare_frame (pad, vagg, buffer,
-      prepared_frame);
+  return TRUE;
}
/**

and

@@ -769,7 +769,11 @@ gst_nvcompositor_fixate_caps (GstAggregator * agg, GstCaps * caps)
    nvcompositor_pad->input_width = GST_VIDEO_INFO_WIDTH (&vaggpad->info);
    nvcompositor_pad->input_height = GST_VIDEO_INFO_HEIGHT (&vaggpad->info);
-    if (!get_nvcolorformat (&vaggpad->info, &nvcompositor_pad->comppad_pix_fmt)) {
+    if (vaggpad->info.finfo == NULL) {
+        GST_WARNING_OBJECT (vagg, "This pad is invalid");
+        continue;
+    }
+    else if (!get_nvcolorformat (&vaggpad->info, &nvcompositor_pad->comppad_pix_fmt)) {
      GST_ERROR_OBJECT (vagg, "Failed to get nvcompositorpad input NvColorFormat");
      return ret;
    }

There is an improvement… the code goes further and stops here:

Thread 94 "13_14_v:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xfffeade0f0c0 (LWP 637171)]
0x0000fffec6f5a7d0 in ?? () from /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurftransform.so.1.0.0
(gdb) where
#0  0x0000fffec6f5a7d0 in  () at /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurftransform.so.1.0.0
#1  0x0000fffec6f5b640 in  () at /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurftransform.so.1.0.0
#2  0x0000ffff843a5d70 in do_nvcomposite (vagg=0xaaaaaaffccf0 [GstVideoAggregator|13_14_v], out_dmabuf_fd=172) at gstnvcompositor.c:1203
#3  0x0000ffff843a602c in gst_nvcompositor_aggregate_frames (vagg=0xaaaaaaffccf0 [GstVideoAggregator|13_14_v], outbuf=0xfffee0032c60) at gstnvcompositor.c:1251
#4  0x0000fffff55fee34 in  () at /lib/aarch64-linux-gnu/libgstvideo-1.0.so.0
#5  0x0000fffff5809038 in  () at /lib/aarch64-linux-gnu/libgstbase-1.0.so.0
#6  0x0000fffff7f0070c in  () at /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0
#7  0x0000fffff7cf7658 in  () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#8  0x0000fffff7cf4980 in  () at /lib/aarch64-linux-gnu/libglib-2.0.so.0
#9  0x0000fffff78dd5c8 in start_thread (arg=0x0) at ./nptl/pthread_create.c:442
#10 0x0000fffff7945d5c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79
(gdb)
ret = NvBufSurfaceFromFd(out_dmabuf_fd, (void**)(&dst_nvbuf_surf));
  if (ret != 0) {
    GST_ERROR ("NvBufSurfaceFromFd failed");
    return FALSE;
  }

  ret = NvBufSurfTransformMultiInputBufCompositeBlend(input_nvbuf_surfs, dst_nvbuf_surf, &nvcomp->comp_params);      <--- signal SIGSEGV
  if (ret != 0) {
    GST_ERROR ("NvBufSurfTransformMultiInputBufComposite failed");
    return FALSE;
  }

  return TRUE;
}

Hi,
This would need other user to share experience. For better stability, we would suggest use the plugin with default getreamer 1.16.3. This is tested and validated in each Jetpack 5 release.

Thank you for your reply,

I want to use gstreamer 1.20.3 to use the latest developments of gstreamer, and I just modified nvcompositor to use the new function “sizing-policy=keep-aspect-ratio” in the pads :-))

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