Crash when processing some matroska files
Crash when processing some matroska files
We are having crashes when processing some matroska files. The pipeline we are trying to run is:
gst-launch-1.0 filesrc location=[RTzzzzzzzzzzzzzzzzzzzzzz.tgz](/uploads/490af73ac8b7a7063776757fcd0a1909/RTzzzzzzzzzzzzzzzzzzzzzz.tgz).mkv ! matroskademux ! avdec_h264 ! videorate ! videoscale ! deinterlace ! videoconvert ! video/x-raw,format=I420,width=320,height=180,framerate=28/1 ! filesink location=/dev/null
Running the same pipeline without the caps works.
#0 _int_malloc (av=av@entry=0x7ffff0000020, bytes=bytes@entry=97) at malloc.c:3856
#1 0x00007ffff7b60fdf in _int_realloc (av=av@entry=0x7ffff0000020, oldp=oldp@entry=0x7ffff001e880, oldsize=oldsize@entry=64, nb=112) at malloc.c:4600
#2 0x00007ffff7b632d6 in __GI___libc_realloc (oldmem=0x7ffff001e890, bytes=96) at malloc.c:3235
#3 0x00007ffff7d93d80 in g_realloc () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff7f5ce89 in __gst_vasnprintf (resultbuf=resultbuf@entry=0x0, lengthp=lengthp@entry=0x7ffff529ced0, format=<optimized out>, args=args@entry=0x7ffff529d030) at ../subprojects/gstreamer/gst/printf/vasnprintf.c:346
#5 0x00007ffff7f5e4fb in __gst_vasprintf (result=result@entry=0x7ffff529d020, format=<optimized out>, args=args@entry=0x7ffff529d030) at ../subprojects/gstreamer/gst/printf/printf.c:154
#6 0x00007ffff7ef4860 in gst_debug_message_get (message=0x7ffff529d020) at ../subprojects/gstreamer/gst/gstinfo.c:602
#7 0x00007ffff7ef48a2 in _gst_debug_log_preamble (message=<optimized out>, object=object@entry=0x0, file=file@entry=0x7ffff529cf88, message_str=message_str@entry=0x7ffff529cfa0, obj_str=obj_str@entry=0x7ffff529cf98, elapsed=elapsed@entry=0x7ffff529cf90) at ../subprojects/gstreamer/gst/gstinfo.c:1151
#8 0x00007ffff7ef5d73 in gst_debug_log_default (category=0x55555556d4c0, level=GST_LEVEL_TRACE, file=<optimized out>, function=0x7ffff7f78b30 <__func__.22420> "gst_mini_object_lock", line=221, object=0x0, message=0x7ffff529d020, user_data=0x7ffff7cb15c0 <_IO_2_1_stderr_>) at ../subprojects/gstreamer/gst/gstinfo.c:1293
#9 0x00007ffff7ef4f66 in gst_debug_log_valist (category=0x55555556d4c0, level=GST_LEVEL_TRACE, file=0x7ffff7f78490 "../subprojects/gstreamer/gst/gstminiobject.c", function=0x7ffff7f78b30 <__func__.22420> "gst_mini_object_lock", line=221, object=0x0, format=0x7ffff7f78520 "lock %p: state %08x, access_mode %d", args=0x7ffff529d0a0) at ../subprojects/gstreamer/gst/gstinfo.c:580
#10 0x00007ffff7ef50bb in gst_debug_log (category=<optimized out>, level=level@entry=GST_LEVEL_TRACE, file=file@entry=0x7ffff7f78490 "../subprojects/gstreamer/gst/gstminiobject.c", function=function@entry=0x7ffff7f78b30 <__func__.22420> "gst_mini_object_lock", line=line@entry=221, object=object@entry=0x0, format=0x7ffff7f78520 "lock %p: state %08x, access_mode %d") at ../subprojects/gstreamer/gst/gstinfo.c:512
#11 0x00007ffff7efe9af in gst_mini_object_lock (object=object@entry=0x7ffff03ae490, flags=flags@entry=GST_LOCK_FLAG_EXCLUSIVE) at ../subprojects/gstreamer/gst/gstminiobject.c:220
#12 0x00007ffff7ec82cc in _memory_get_exclusive_reference (mem=0x7ffff03ae490) at ../subprojects/gstreamer/gst/gstbuffer.c:430
#13 gst_buffer_copy_into (dest=0x5555557ac6c0, src=0x7ffff03fe360, flags=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY), offset=0, size=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.c:638
#14 0x00007ffff7ec868f in gst_buffer_copy_with_flags (buffer=0x7ffff03fe360, flags=(GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_META | GST_BUFFER_COPY_MEMORY)) at ../subprojects/gstreamer/gst/gstbuffer.c:713
#15 0x00007ffff7000f9a in gst_buffer_copy (buf=0x7ffff03fe360) at ../subprojects/gstreamer/gst/gstbuffer.h:485
#16 default_prepare_output_buffer (trans=0x555555806250, inbuf=0x7ffff03fe360, outbuf=0x7ffff529d380) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:1678
#17 0x00007ffff6fff344 in default_generate_output (trans=0x555555806250, outbuf=0x7ffff529d380) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2159
#18 0x00007ffff6ffecd6 in gst_base_transform_chain (pad=<optimized out>, parent=0x555555806250, buffer=<optimized out>) at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2341
#19 0x00007ffff7f04602 in gst_pad_chain_data_unchecked (data=0x7ffff03fe360, type=4112, pad=0x5555557a4a50) at ../subprojects/gstreamer/gst/gstpad.c:4399
#20 gst_pad_push_data (pad=pad@entry=0x5555557a4800, type=type@entry=4112, data=<optimized out>, data@entry=0x7ffff03fe360) at ../subprojects/gstreamer/gst/gstpad.c:4655
#21 0x00007ffff7f0d032 in gst_pad_push (pad=0x5555557a4800, buffer=buffer@entry=0x7ffff03fe360) at ../subprojects/gstreamer/gst/gstpad.c:4774
#22 0x00007ffff6e9e66e in gst_video_decoder_clip_and_push_buf (decoder=decoder@entry=0x5555557f2c10, buf=buf@entry=0x7ffff03fe360) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3465
#23 0x00007ffff6ea4041 in gst_video_decoder_finish_frame (decoder=0x5555557f2c10, frame=0x0, frame@entry=0x7ffff0352a60) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3316
#24 0x00007ffff6cd5763 in gst_ffmpegviddec_video_frame (ret=<optimized out>, frame=0x7ffff04055c0, ffmpegdec=<optimized out>) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1755
#25 gst_ffmpegviddec_frame (ffmpegdec=<optimized out>, frame=0x7ffff04055c0, ret=<optimized out>) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1796
#26 0x00007ffff6cd64e2 in gst_ffmpegviddec_handle_frame (decoder=0x5555557f2c10, frame=0x7ffff04055c0) at ../subprojects/gst-libav/ext/libav/gstavviddec.c:1927
#27 0x00007ffff6ea16f2 in gst_video_decoder_decode_frame (decoder=decoder@entry=0x5555557f2c10, frame=0x7ffff04055c0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3705
#28 0x00007ffff6ea1c28 in gst_video_decoder_chain_forward (decoder=decoder@entry=0x5555557f2c10, buf=buf@entry=0x7ffff04065a0, at_eos=at_eos@entry=0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2340
#29 0x00007ffff6ea3311 in gst_video_decoder_chain (pad=<optimized out>, parent=<optimized out>, buf=0x7ffff04065a0) at ../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2655
#30 0x00007ffff7f04602 in gst_pad_chain_data_unchecked (data=0x7ffff04065a0, type=4112, pad=0x5555557a45b0) at ../subprojects/gstreamer/gst/gstpad.c:4399
#31 gst_pad_push_data (pad=pad@entry=0x55555582a770, type=type@entry=4112, data=<optimized out>, data@entry=0x7ffff04065a0) at ../subprojects/gstreamer/gst/gstpad.c:4655
#32 0x00007ffff7f0d032 in gst_pad_push (pad=0x55555582a770, buffer=buffer@entry=0x7ffff04065a0) at ../subprojects/gstreamer/gst/gstpad.c:4774
#33 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
#34 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
#35 0x00007ffff6f7f7c6 in gst_matroska_demux_loop (pad=<optimized out>) at ../subprojects/gst-plugins-good/gst/matroska/matroska-demux.c:5761
#36 0x00007ffff7f3aed1 in gst_task_func (task=0x5555557ac3b0) at ../subprojects/gstreamer/gst/gsttask.c:328
#37 0x00007ffff7db81d4 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007ffff7db7931 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007ffff7cc0609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#40 0x00007ffff7be7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Full log is attached.