AnsweredAssumed Answered

SIGSEGV problem when gstreamer pipeline starts to run

Question asked by tugay ilbay on Sep 13, 2018
Latest reply on Sep 18, 2018 by igorpadykov

Hi,

 

Sometimes I randomly get a SIGSEGV error when gstreamer pipeline starts to run if I use vpu or ipu related plugins in the pipeline.

 

For example, I tested these pipelines below and these pipelines sometimes generate SIGSEGV error:

gst-launch-1.0 -ve videotestsrc ! imxvpuenc_h264 ! fakesink

gst-launch-1.0 -ve videotestsrc ! vpuenc_h264 ! fakesink

gst-launch-1.0 -ve videotestsrc ! textoverlay text=test ! vpuenc_h264 ! fakesink

gst-launch-1.0 -ve videotestsrc ! "video/x-raw, format=UYVY, width=320, height=240, framerate=25/1" ! imxvideoconvert_ipu ! "video/x-raw, format=I420, width=320, height=240, framerate=25/1" ! textoverlay text=deneme ! fakesink

gst-launch-1.0 -ve videotestsrc ! "video/x-raw, format=UYVY, width=320, height=240, framerate=25/1" ! imxvideoconvert_ipu ! "video/x-raw, format=I420, width=320, height=240, framerate=25/1" ! textoverlay text=test ! vpuenc_h264 ! matroskamux ! filesink location=test.mkv

gst-launch-1.0 -ve imxv4l2src !  textoverlay text=test ! vpuenc_h264 ! matroskamux ! filesink location=test.mkv

Since the pipelines containing vpu/ipu plugins do not always generate SIGSEGV error, I wrote a bash script like the one below:

#!/bin/sh

while [ 1 ]; do

   gst-launch-1.0 -ve videotestsrc ! imxvpuenc_h264 ! fakesink &

   sleep 10

   pkill -SIGINT gst-launch-1.0

   sleep 5

done

This is the error I get once in a while:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
[INFO]    ringBufferEnable 0, chromaInterleave 0, mapType 0, linear2TiledEnable 1
Caught SIGSEGV
#0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
#1  0x76d21bb0 in __GI___poll (fds=0x2155978, nfds=2, timeout=-1)
#2  0x76dde58c in ?? () from /usr/lib/libglib-2.0.so.0
Spinning.  Please run 'gdb gst-launch-1.0 931' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
handling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
free(): corrupted unsorted chunks

The information of my system:

yocto fsl-community-bsp version: rocko

gstreamer: 1.12.2

imx-gst1.0-plugin: 4.1.6

gstreamer1.0-plugins-imx: 0.13.0

linux-fslc-imx: 4.1-2.0.x-imx

 

PS: In yocto fsl-release-bsp imx-4.1.15-1.0.0_ga I did not have this kind of problem. So I tried to downgrade imx-gst1.0-plugin from v4.1.6 to v4.0.9 to see if the problem is about the version 4.1.6 of imx-gst1.0-plugin; but unfortunately the same problem occurred again and again. Thus I am suspicious that the problem stems from a bug in linux-fslc-imx v4.1-2.0.x-imx.


Please could you help me to find a way to solve this problem.

 

Best Regards.

Outcomes