Crash when processing matroska files: "corrupted double-linked list"
We are having crashes when processing some matroska files. The pipeline we are trying to run is:
gst-launch-1.0 filesrc location=RTxxxxxxxxxxxxxxxxxxx.mkv ! matroskademux ! avdec_h264 ! videorate ! videoscale ! deinterlace ! videoconvert ! video/x-raw,format=I420,width=320,height=180,framerate=28/1 ! filesink location=/dev/null
Maybe this is related to #80 (closed), although the crash dump is different.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7aea859 in __GI_abort () at abort.c:79
#2 0x00007ffff7b553ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7c7f285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff7b5d47c in malloc_printerr (str=str@entry=0x7ffff7c7d457 "corrupted double-linked list") at malloc.c:5347
#4 0x00007ffff7b5dacc in unlink_chunk (p=p@entry=0x7ffff03acbf0, av=0x7ffff0000020) at malloc.c:1460
#5 0x00007ffff7b60773 in _int_malloc (av=av@entry=0x7ffff0000020, bytes=bytes@entry=2560) at malloc.c:4041
#6 0x00007ffff7b62419 in __GI___libc_malloc (bytes=2560) at malloc.c:3066
#7 0x00007ffff7d93d80 in g_realloc () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007ffff6ede478 in realloc_tmplines (scale=scale@entry=0x7ffff03326e0, n_elems=<optimized out>, width=320) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-scaler.c:157
#9 0x00007ffff6ee0796 in gst_video_scaler_2d (hscale=0x7ffff03326e0, vscale=0x7ffff0412c60, format=<optimized out>, src=0x7ffff02f74a0, src_stride=320, dest=0x7ffff03e4090, dest_stride=320, x=0, y=0, width=<optimized out>, height=180) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-scaler.c:1532
#10 0x00007ffff6ec1f23 in convert_plane_hv_task (task=<optimized out>) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-converter.c:6305
#11 0x00007ffff6ebf149 in gst_parallelized_task_runner_run (self=self@entry=0x7ffff0023110, func=func@entry=0x7ffff6ec1ef0 <convert_plane_hv_task>, task_data=task_data@entry=0x7ffff529ca60) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-converter.c:297
#12 0x00007ffff6ec0abb in convert_plane_hv (convert=<optimized out>, src=<optimized out>, dest=<optimized out>, plane=<optimized out>) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-converter.c:6368
#13 0x00007ffff6ec91a9 in convert_scale_planes (convert=0x7ffff0014fc0, src=0x7ffff529cba0, dest=0x7ffff529ce40) at ../subprojects/gst-plugins-base/gst-libs/gst/video/video-converter.c:6381
#14 0x00007ffff52d28c3 in gst_video_scale_transform_frame (filter=0x555555808a10, in_frame=0x7ffff529cba0, out_frame=0x7ffff529ce40) at ../subprojects/gst-plugins-base/gst/videoscale/gstvideoscale.c:1177
#15 0x00007ffff6eafe5f in gst_video_filter_transform (trans=0x555555808a10, inbuf=<optimized out>, outbuf=0x7ffff040bb40) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideofilter.c:276
#16 0x00007ffff6fff435 in default_generate_output (trans=0x555555808a10, outbuf=0x7ffff529d150) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2188
#17 0x00007ffff6ffecd6 in gst_base_transform_chain (pad=<optimized out>, parent=0x555555808a10, buffer=<optimized out>) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2341
#18 0x00007ffff7f04602 in gst_pad_chain_data_unchecked (data=0x7ffff01fcb40, type=4112, pad=0x5555557a4ef0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#19 gst_pad_push_data (pad=pad@entry=0x5555557a4ca0, type=type@entry=4112, data=<optimized out>, data@entry=0x7ffff01fcb40) at ../subprojects/gstreamer/gst/gstpad.c:4655
#20 0x00007ffff7f0d032 in gst_pad_push (pad=0x5555557a4ca0, buffer=0x7ffff01fcb40) at ../subprojects/gstreamer/gst/gstpad.c:4774
#21 0x00007ffff52e27bd in gst_video_rate_transform_ip (trans=<optimized out>, buffer=0x7ffff01fab40) at ../subprojects/gst-plugins-base/gst/videorate/gstvideorate.c:1710
#22 0x00007ffff6fff4f6 in default_generate_output (trans=0x555555806250, outbuf=0x7ffff529d380) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2183
#23 0x00007ffff6ffecd6 in gst_base_transform_chain (pad=<optimized out>, parent=0x555555806250, buffer=<optimized out>) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2341
#24 0x00007ffff7f04602 in gst_pad_chain_data_unchecked (data=0x7ffff03af6c0, type=4112, pad=0x5555557a4a50) at ../subprojects/gstreamer/gst/gstpad.c:4399
#25 gst_pad_push_data (pad=pad@entry=0x5555557a4800, type=type@entry=4112, data=<optimized out>, data@entry=0x7ffff03af6c0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#26 0x00007ffff7f0d032 in gst_pad_push (pad=0x5555557a4800, buffer=buffer@entry=0x7ffff03af6c0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#27 0x00007ffff6e9e66e in gst_video_decoder_clip_and_push_buf (decoder=decoder@entry=0x5555557f2c10, buf=buf@entry=0x7ffff03af6c0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3465
#28 0x00007ffff6ea4041 in gst_video_decoder_finish_frame (decoder=0x5555557f2c10, frame=0x0, frame@entry=0x7ffff0352b80) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3316
#29 0x00007ffff6cd5763 in gst_ffmpegviddec_video_frame (ret=<optimized out>, frame=0x7ffff01fb3e0, ffmpegdec=<optimized out>) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1755
#30 gst_ffmpegviddec_frame (ffmpegdec=<optimized out>, frame=0x7ffff01fb3e0, ret=<optimized out>) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1796
#31 0x00007ffff6cd64e2 in gst_ffmpegviddec_handle_frame (decoder=0x5555557f2c10, frame=0x7ffff01fb3e0) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1927
#32 0x00007ffff6ea16f2 in gst_video_decoder_decode_frame (decoder=decoder@entry=0x5555557f2c10, frame=0x7ffff01fb3e0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3705
#33 0x00007ffff6ea1c28 in gst_video_decoder_chain_forward (decoder=decoder@entry=0x5555557f2c10, buf=buf@entry=0x7ffff0410360, at_eos=at_eos@entry=0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2340
#34 0x00007ffff6ea3311 in gst_video_decoder_chain (pad=<optimized out>, parent=<optimized out>, buf=0x7ffff0410360) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2655
#35 0x00007ffff7f04602 in gst_pad_chain_data_unchecked (data=0x7ffff0410360, type=4112, pad=0x5555557a45b0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#36 gst_pad_push_data (pad=pad@entry=0x55555582a770, type=type@entry=4112, data=<optimized out>, data@entry=0x7ffff0410360) at ../subprojects/gstreamer/gst/gstpad.c:4655
#37 0x00007ffff7f0d032 in gst_pad_push (pad=0x55555582a770, buffer=buffer@entry=0x7ffff0410360) at ../subprojects/gstreamer/gst/gstpad.c:4774
#38 0x00007ffff6f716bb in gst_matroska_demux_parse_blockgroup_or_simpleblock (demux=demux@entry=0x5555557aa000, ebml=ebml@entry=0x7ffff529dd00, cluster_time=<optimized out>, is_simpleblock=is_simpleblock@entry=1, cluster_offset=<optimized out>) at ../subprojects/gst-plugins-good/gst/matroska/matroska-demux.c:4843
#39 0x00007ffff6f78cea in gst_matroska_demux_parse_id (demux=demux@entry=0x5555557aa000, id=<optimized out>, length=<optimized out>, needed=<optimized out>) at ../subprojects/gst-plugins-good/gst/matroska/matroska-demux.c:5572
#40 0x00007ffff6f7f7c6 in gst_matroska_demux_loop (pad=<optimized out>) at ../subprojects/gst-plugins-good/gst/matroska/matroska-demux.c:5761
#41 0x00007ffff7f3aed1 in gst_task_func (task=0x5555557ac3b0) at ../subprojects/gstreamer/gst/gsttask.c:328
#42 0x00007ffff7db81d4 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff7db7931 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff7cc0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#45 0x00007ffff7be7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
As in #80 (closed), removing the caps from the pipeline makes this work without crashes
Full log is attached.