crash with SIGBUS in videoconvert
Describe your issue
Program crashes with SIGBUS inside videoconvert when processing decoded camera stream.
(image/jpeg) -> queue -> videorate -> imxvpudec -> (video/x-raw) -> videoconvert -> tee
Setup
- Platform: i.mx6 ARM processor, Quad-Core, 1G RAM
- gstreamer versions: 1.18.2 and 1.18.4
- gstreamer-imx: 0.13.1
- Yocto 3.1 (Dunfell)
- meta-gstreamer(dunfell)
How reproducible is the bug?
- Heisenbug, I can not reproduce it on commandline or with
gdb
. But it occurs regularly in our software when started as systemd service. - does not happen with
gst-launch
Additional Information
Stack dump from core
[...]
Core was generated by `/tmp/CalumaTouch'.
Program terminated with signal SIGBUS, Bus error.
#0 0x74b7fe94 in ?? ()
[Current thread is 1 (LWP 23010)]
(gdb) set sysroot[...]
[...]
(gdb) bt
#0 memcpy () at ../sysdeps/arm/armv7/multiarch/memcpy_impl.S:365
#1 0x5d8a5910 in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>)
at /usr/include/bits/string_fortified.h:34
#2 orc_program_compile_full (program=program@entry=0x5e1def38, target=<optimized out>, flags=<optimized out>)
at ../orc-0.4.32/orc/orccompiler.c:455
#3 0x5d8a5ac4 in orc_program_compile_for_target (program=program@entry=0x5e1def38, target=<optimized out>)
at ../orc-0.4.32/orc/orccompiler.c:234
#4 0x5d8a5ad8 in orc_program_compile (program=program@entry=0x5e1def38) at ../orc-0.4.32/orc/orccompiler.c:211
#5 0x5e2476f8 in video_orc_planar_chroma_422_420 (d1=0x57908358 "", d1_stride=400,
s1=0x577a5c00 <error: Cannot access memory at address 0x577a5c00>, s1_stride=800,
s2=0x577a5d90 <error: Cannot access memory at address 0x577a5d90>, s2_stride=800, n=400, m=m@entry=300)
at gst-libs/gst/video/video-orc.c:15775
#6 0x5e26f3f0 in convert_plane_v_halve_task (task=<error reading variable: value has been optimized out>)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/video-converter.c:6129
#7 0x5e26d17e in gst_parallelized_task_runner_run (self=0x5e1cc6b0, self@entry=0x5e274a67 <convert_scale_planes+46>,
func=<optimized out>, task_data=task_data@entry=0x0)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/video-converter.c:297
#8 0x5e26e2f6 in convert_plane_v_halve (convert=<optimized out>, src=<optimized out>, dest=<optimized out>,
plane=<optimized out>) at ../gst-plugins-base-1.18.4/gst-libs/gst/video/video-converter.c:6176
#9 0x5e274a66 in convert_scale_planes (convert=0x5e1d5800, src=0x5c3dfc4c, dest=0x5c3dfdbc)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/video-converter.c:6379
#10 0x5e202c08 in gst_video_convert_transform_frame (filter=0x11a8760, in_frame=0x5c3dfc4c, out_frame=0x5c3dfdbc)
at ../gst-plugins-base-1.18.4/gst/videoconvert/gstvideoconvert.c:730
#11 0x5e26190a in gst_video_filter_transform (trans=0x11a8760, inbuf=<optimized out>, outbuf=0x5e1ce800)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideofilter.c:276
#12 0x6f6011f4 in default_generate_output (trans=0x11a8760, outbuf=0x5c3dffb0)
at ../gstreamer-1.18.4/libs/gst/base/gstbasetransform.c:2188
#13 0x6f600ae2 in gst_base_transform_chain (pad=<optimized out>, parent=0x11a8760, buffer=<optimized out>)
at ../gstreamer-1.18.4/libs/gst/base/gstbasetransform.c:2341
#14 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11aa630, type=type@entry=4112, data=<optimized out>,
data@entry=0x11b5738) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#15 0x745bbefa in gst_pad_push_data (pad=pad@entry=0x1193658, type=type@entry=4112, data=data@entry=0x11b5738)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
#16 0x745c1982 in gst_pad_push (pad=pad@entry=0x1193658, buffer=buffer@entry=0x11b5738)
at ../gstreamer-1.18.4/gst/gstpad.c:4774
#17 0x745abd0e in gst_proxy_pad_chain_default (pad=0x11a75f8, parent=<optimized out>, buffer=0x11b5738)
at ../gstreamer-1.18.4/gst/gstghostpad.c:127
#18 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11a75f8, type=type@entry=4112, data=<optimized out>,
data@entry=0x11b5738) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#19 0x745bbefa in gst_pad_push_data (pad=0x11aae40, type=type@entry=4112, data=data@entry=0x11b5738)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
#20 0x745c1982 in gst_pad_push (pad=<optimized out>, buffer=buffer@entry=0x11b5738)
at ../gstreamer-1.18.4/gst/gstpad.c:4774
#21 0x5e253710 in gst_video_decoder_clip_and_push_buf (decoder=decoder@entry=0x5e1c61d0, buf=buf@entry=0x11b5738)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideodecoder.c:3357
#22 0x5e2596f0 in gst_video_decoder_finish_frame (decoder=decoder@entry=0x5e1c61d0, frame=0x0, frame@entry=0x11b5690)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideodecoder.c:3208
#23 0x5adf39be in gst_imx_vpu_decoder_handle_frame (decoder=0x5e1c61d0, input_frame=<optimized out>)
at ../git/src/vpu/decoder.c:766
#24 0x5e25309a in gst_video_decoder_decode_frame (decoder=decoder@entry=0x5e1c61d0, frame=0x11b5690)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideodecoder.c:3567
#25 0x5e2552f2 in gst_video_decoder_chain_forward (decoder=decoder@entry=0x5e1c61d0, buf=buf@entry=0x5e1cebf0,
at_eos=at_eos@entry=0) at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideodecoder.c:2273
#26 0x5e2557c8 in gst_video_decoder_chain (pad=<optimized out>, parent=0x5e1c61d0, buf=0x5e1cebf0)
at ../gst-plugins-base-1.18.4/gst-libs/gst/video/gstvideodecoder.c:2588
#27 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11aace8, type=type@entry=4112, data=<optimized out>,
data@entry=0x5e1cebf0) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#28 0x745bbefa in gst_pad_push_data (pad=0x11aa4d8, type=4112, data=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
#29 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11aa380, type=type@entry=4112, data=<optimized out>,
data@entry=0x5e1cebf0) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#30 0x745bbefa in gst_pad_push_data (pad=pad@entry=0x11a71c0, type=type@entry=4112, data=data@entry=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
--Type <RET> for more, q to quit, c to continue without paging--
#31 0x745c1982 in gst_pad_push (pad=pad@entry=0x11a71c0, buffer=buffer@entry=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4774
#32 0x745abd0e in gst_proxy_pad_chain_default (pad=0x11a61a0, parent=<optimized out>, buffer=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstghostpad.c:127
#33 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11a61a0, type=type@entry=4112, data=<optimized out>,
data@entry=0x5e1cebf0) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#34 0x745bbefa in gst_pad_push_data (pad=0x11aa228, type=type@entry=4112, data=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
#35 0x745c1982 in gst_pad_push (pad=<optimized out>, buffer=<optimized out>) at ../gstreamer-1.18.4/gst/gstpad.c:4774
#36 0x5d81a888 in gst_video_rate_push_buffer (videorate=videorate@entry=0x11a8418, outbuf=<optimized out>,
duplicate=duplicate@entry=0, next_intime=next_intime@entry=18446744073709551615)
at ../gst-plugins-base-1.18.4/gst/videorate/gstvideorate.c:730
#37 0x5d81c1de in gst_video_rate_transform_ip (trans=0x11a8418, buffer=0x5e1cebf0)
at /usr/include/gstreamer-1.0/gst/gstbuffer.h:417
#38 0x6f601178 in default_generate_output (trans=0x11a8418, outbuf=0x5c3e0aa0)
at ../gstreamer-1.18.4/libs/gst/base/gstbasetransform.c:2183
#39 0x6f600ae2 in gst_base_transform_chain (pad=<optimized out>, parent=0x11a8418, buffer=<optimized out>)
at ../gstreamer-1.18.4/libs/gst/base/gstbasetransform.c:2341
#40 0x745ba422 in gst_pad_chain_data_unchecked (pad=pad@entry=0x11aa0d0, type=type@entry=4112, data=<optimized out>,
data@entry=0x5e1cebf0) at ../gstreamer-1.18.4/gst/gstpad.c:4399
#41 0x745bbefa in gst_pad_push_data (pad=0x1196db0, type=type@entry=4112, data=data@entry=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4655
#42 0x745c1982 in gst_pad_push (pad=<optimized out>, buffer=buffer@entry=0x5e1cebf0)
at ../gstreamer-1.18.4/gst/gstpad.c:4774
#43 0x5cd6951a in gst_queue_push_one (queue=0x11a23a8) at ../gstreamer-1.18.4/plugins/elements/gstqueue.c:1386
#44 gst_queue_loop (pad=<optimized out>) at ../gstreamer-1.18.4/plugins/elements/gstqueue.c:1539
#45 0x745e6ca8 in gst_task_func (task=0x11b50d0) at ../gstreamer-1.18.4/gst/gsttask.c:384
#46 0x7447bb14 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib-2.62.6/glib/gthreadpool.c:308
#47 0x7447b58a in g_thread_proxy (data=0x1162b50) at ../glib-2.62.6/glib/gthread.c:805
#48 0x74ca9898 in start_thread (arg=0x100551a7) at pthread_create.c:477
#49 0x74bb8f3c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:73
from /home/stiller/sdks/fpc-04/stable_2022-11/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
dot file created in SIGBUS signal handler: sigbus_CameraVideoIn.dot