parsebin/uridecodebin3: Segfault when decoding HLS from uridecodebin3
Hi,
Running into some segfaults when trying to stream HLS over to SRT, using the uridecodebin3 to decode the HLS. The segfault is somewhat easily reproducible and occurs every now and then. When debugging the segfault using GDB, the backtrace indicates some error from the parsebin, see line 10 in backtrace. The input is a master multi-bitrate HLS (live) with audio track.
Gstreamer Version: 1.20.1
OS: Ubuntu Jammy (22.04)
The gst-launch pipeline used:
gst-launch-1.0 mpegtsmux name=mux ! queue max-size-buffers=0 max-size-time=30000000000 max-size-bytes=0 min-threshold-time=1000000000 ! srtsink uri=srt://<ADDRESS>:<PORT> latency=125 wait-for-connection=false mode=caller streamsynchronizer name=synk uridecodebin3 uri=https://<ADDRESS>/playlist.m3u8 name=decode decode. ! video/x-raw ! synk. decode. ! audio/x-raw ! synk. synk. ! queue ! video/x-raw ! videoconvert ! x264enc tune=zerolatency bitrate=3072 bframes=0 key-int-max=60 ! video/x-h264, profile=main ! mux. synk. ! queue ! audio/x-raw ! audioconvert ! avenc_aac ! progressreport update-freq=5 name=progressstatus ! mux.
Backtrace when running the GDB:
(gdb) p (*g_signal_nodes[95]).itype
Python Exception <class 'TypeError'>: can only concatenate str (not "NoneType") to str
$11 =
(gdb) bt
#0 0x00007ffff7cef543 in g_signal_emit_valist (instance=0x7fff840cf8d0, signal_id=95, detail=203, var_args=var_args@entry=0x7fff9affb800) at ../../../gobject/gsignal.c:3316
#1 0x00007ffff7cf0863 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3587
#5 0x00007ffff7cf0863 in <emit signal ??? on instance ???> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3587
#2 0x00007ffff7cd2d2f in g_closure_invoke (closure=0x7fff8413eea0, return_value=0x0, n_param_values=2, param_values=0x7fff9affba70, invocation_hint=0x7fff9affb9f0) at ../../../gobject/gclosure.c:830
#3 0x00007ffff7ceec36 in signal_emit_unlocked_R (node=node@entry=0x555555599fb0, detail=detail@entry=203, instance=instance@entry=0x7fffc8055650, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fff9affba70) at ../../../gobject/gsignal.c:3777
#4 0x00007ffff7cf0614 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff9affbc40) at ../../../gobject/gsignal.c:3530
#6 0x00007ffff7cdd424 in g_object_dispatch_properties_changed (object=0x7fffc8055650, n_pspecs=<optimized out>, pspecs=<optimized out>) at ../../../gobject/gobject.c:1260
#7 0x00007ffff7e98db8 in gst_object_dispatch_properties_changed (object=0x7fffc8055650, n_pspecs=1, pspecs=0x7fff9affbdb0) at ../gst/gstobject.c:455
#8 0x00007ffff7ce11fa in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x7fffc8055650) at ../../../gobject/gobject.c:1353
#9 g_object_notify_by_pspec (object=0x7fffc8055650, pspec=<optimized out>) at ../../../gobject/gobject.c:1463
#10 0x00007ffff530e228 in gst_parse_pad_update_tags (tags=0x7fff90077050, parsepad=0x7fff90006250) at ../gst/playback/gstparsebin.c:3938
#11 gst_parse_pad_event (pad=pad@entry=0x7fffb000dae0, info=info@entry=0x7fff9affc040, user_data=<optimized out>) at ../gst/playback/gstparsebin.c:4035
#12 0x00007ffff7ee5366 in probe_hook_marshal (hook=0x7fffa800ae80, data=0x7fff9affbef0) at ../gst/gstpad.c:3664
#13 0x00007ffff7d58626 in g_hook_list_marshal (hook_list=0x7fffb000db78, may_recurse=1, marshaller=0x7ffff7ee4fd0 <probe_hook_marshal>, data=0x7fff9affbef0) at ../../../glib/ghook.c:672
#14 0x00007ffff7ee5915 in do_probe_callbacks (pad=pad@entry=0x7fffb000dae0, info=<optimized out>, defaultval=defaultval@entry=GST_FLOW_OK) at ../gst/gstpad.c:3848
#15 0x00007ffff7ee872d in gst_pad_send_event_unchecked (pad=pad@entry=0x7fffb000dae0, event=event@entry=0x7fffa0002d70, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gst/gstpad.c:5872
#16 0x00007ffff7ee930e in gst_pad_push_event_unchecked (pad=pad@entry=0x7fff8404cc20, event=0x7fffa0002d70, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gst/gstpad.c:5544
#17 0x00007ffff7ee97c8 in push_sticky (pad=pad@entry=0x7fff8404cc20, ev=ev@entry=0x7fff9affc1d0, user_data=user_data@entry=0x7fff9affc230) at ../gst/gstpad.c:4047
#18 0x00007ffff7edf670 in events_foreach (pad=0x7fff8404cc20, func=0x7ffff7ee9770 <push_sticky>, user_data=0x7fff9affc230) at ../gst/gstpad.c:608
#19 0x00007ffff7eec89a in check_sticky (event=0x7fffa0002d70, pad=0x7fff8404cc20) at ../gst/gstpad.c:4106
#20 gst_pad_push_event (pad=0x7fff8404cc20, event=0x7fffa0002d70) at ../gst/gstpad.c:5675
#21 0x00007ffff6322d90 in gst_base_parse_push_pending_events (parse=0x7fff90045c50) at ../libs/gst/base/gstbaseparse.c:2338
#22 0x00007ffff632c79e in gst_base_parse_push_frame (parse=0x7fff90045c50, frame=0x7fff900772d0) at ../libs/gst/base/gstbaseparse.c:2522
#23 0x00007fffebe2c10d in () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioparsers.so
#24 0x00007ffff6329238 in gst_base_parse_handle_buffer (parse=parse@entry=0x7fff90045c50, buffer=<optimized out>, skip=skip@entry=0x7fff9affc4e8, flushed=flushed@entry=0x7fff9affc4ec) at ../libs/gst/base/gstbaseparse.c:2253
#25 0x00007ffff6329e6e in gst_base_parse_chain (pad=<optimized out>, parent=0x7fff90045c50, buffer=<optimized out>) at ../libs/gst/base/gstbaseparse.c:3302
#26 0x00007ffff7ee768d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fff8404c9d0, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4447
#27 0x00007ffff7eeac29 in gst_pad_push_data (pad=pad@entry=0x7fffac00b3c0, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4711
#28 0x00007ffff7eeb04e in gst_pad_push (pad=0x7fffac00b3c0, buffer=0x7fffdc41c6c0) at ../gst/gstpad.c:4830
#29 0x00007ffff7ee768d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffac00b170, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4447
#30 0x00007ffff7eeac29 in gst_pad_push_data (pad=pad@entry=0x7fffb000ca40, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4711
#31 0x00007ffff7eeb04e in gst_pad_push (pad=0x7fffb000ca40, buffer=0x7fffdc41c6c0) at ../gst/gstpad.c:4830
#32 0x00007ffff7ed3143 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7fffdc41c6c0) at ../gst/gstghostpad.c:127
#33 0x00007ffff7ee768d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fff9c00c050, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4447
#34 0x00007ffff7eeac29 in gst_pad_push_data (pad=pad@entry=0x5555558682d0, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4711
#35 0x00007ffff7eeb04e in gst_pad_push (pad=0x5555558682d0, buffer=0x7fffdc41c6c0) at ../gst/gstpad.c:4830
#36 0x00007ffff7ed3143 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7fffdc41c6c0) at ../gst/gstghostpad.c:127
#37 0x00007ffff7ee768d in gst_pad_chain_data_unchecked (pad=pad@entry=0x55555586e060, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4447
#38 0x00007ffff7eeac29 in gst_pad_push_data (pad=pad@entry=0x55555586fda0, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4711
#39 0x00007ffff7eeb04e in gst_pad_push (pad=0x55555586fda0, buffer=0x7fffdc41c6c0) at ../gst/gstpad.c:4830
#40 0x00007ffff7ed3143 in gst_proxy_pad_chain_default (pad=<optimized out>, parent=<optimized out>, buffer=0x7fffdc41c6c0) at ../gst/gstghostpad.c:127
#41 0x00007ffff7ee768d in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fffb000c7e0, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4447
#42 0x00007ffff7eeac29 in gst_pad_push_data (pad=pad@entry=0x7fffac00af20, type=type@entry=4112, data=data@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4711
#43 0x00007ffff7eeb04e in gst_pad_push (pad=0x7fffac00af20, buffer=buffer@entry=0x7fffdc41c6c0) at ../gst/gstpad.c:4830
#44 0x00007ffff624fa68 in gst_queue2_push_one (queue=0x7fff9c008000) at ../plugins/elements/gstqueue2.c:3080
#45 gst_queue2_loop (pad=<optimized out>) at ../plugins/elements/gstqueue2.c:3205
#46 0x00007ffff7f11f37 in gst_task_func (task=0x7fffa0008710) at ../gst/gsttask.c:384
#47 0x00007ffff7da56b4 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../glib/gthreadpool.c:350
#48 0x00007ffff7da2a51 in g_thread_proxy (data=0x7fffb400b580) at ../../../glib/gthread.c:827
#49 0x00007ffff7a94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#50 0x00007ffff7b26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Is there something that is wrong inside the parsebin? caps not negotiated properly throughout? Please let know if more information is needed, or if there is any help on how to get around the issue, that would be much appreciated.
The full core dump can be uploaded on request.
Thanks.