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.
Solved! Go to Solution.
Hi tugay
reason may be due to mixing different plugins, for example
imxvpuenc_h264 is part gstreamer-imx plugins described on
trac.gateworks.com/wiki/Yocto/gstreamer
imx-gst1.0-plugins are described in NXP documentation: attached Release Notes and
its usage in Linux Guide sect.7 Multimedia.
Also fsl-community-bsp linux-fslc usually is used with gstreamer-imx plugins,
while imx-gst1.0-plugin with official "linux-imx" nxp linux releases:
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.1.15_2.0.0_ga
Below on post dated "@ Andreas Geißler on Aug 30, 2018 8:44 AM" there is more description
about differencies between linux-fslc and linux-imx bsps:
i.MX6 PCIe interrupt mapping changes during runtime
https://community.nxp.com/message/402940#402940
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi tugay
reason may be due to mixing different plugins, for example
imxvpuenc_h264 is part gstreamer-imx plugins described on
trac.gateworks.com/wiki/Yocto/gstreamer
imx-gst1.0-plugins are described in NXP documentation: attached Release Notes and
its usage in Linux Guide sect.7 Multimedia.
Also fsl-community-bsp linux-fslc usually is used with gstreamer-imx plugins,
while imx-gst1.0-plugin with official "linux-imx" nxp linux releases:
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.1.15_2.0.0_ga
Below on post dated "@ Andreas Geißler on Aug 30, 2018 8:44 AM" there is more description
about differencies between linux-fslc and linux-imx bsps:
i.MX6 PCIe interrupt mapping changes during runtime
https://community.nxp.com/message/402940#402940
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov,
Thanks for your help. Unfortunately, it didn't work. I disabled imx-gst1.0-plugin and then I built yocto from scratch. I got the error below once in a while when "gst-launch-1.0 -ve videotestsrc ! imxvpuenc_h264 ! fakesink" starts to run:
Alignment trap: not handling instruction f4024aef at [<75e05290>]
Unhandled fault: alignment exception (0x811) at 0x75d065b8
pgd = d88e8000
[75d065b8] *pgd=68bc1831, *pte=1999f75f, *ppte=1999fc7f
From the links you shared I understand that NXP does not support fsl community bsp. Thus I gave up to solve this problem and I will use the yocto nxp officially supports. However, I bumped into another issue when I began to use nxp official yocto release.
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
repo sync
After I created a yocto build directory for machine imx6qdlsabresd, I realized that the default linux distro is linux-fslc-imx instead of linux-imx.
Here are my questions:
1. Does NXP officially support linux freescale community edition? If not, why does this yocto version use linux-fslc-imx as default linux distro?
2. Should I stick with linux-fslc-imx or should I switch back to linux-imx?
3. Since this yocto version uses linux-fslc-imx as default linux, can I say that NXP tested imx6qdlsabresd with this linux?
Thanks in advance.
Best regards.
Tugay
Hi Tugay
linux-fslc-imx is not supported by NXP, below part of i.MX6 PCIe interrupt mapping changes during runtime
"The fsl-community (which you have linked to in your reply) is supported by Octavio Salvador
and we, NXP, have no control on its content. Hence we do not support it."
>Should I stick with linux-fslc-imx or should I switch back to linux-imx?
it is matter of choice, there are different functionalities for both options and one can choose
which better suit custom design.
>Since this yocto version uses linux-fslc-imx as default linux, can I say that NXP tested imx6qdlsabresd with this linux?
no. NXP do not test linux-fslc-imx. NXP tests own BSPs (https://source.codeaurora.org/external/imx/) described on
Best regards
igor