Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 972
    • Issues 972
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 105
    • Merge requests 105
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #1519
Closed (duplicated) (duplicated)
Open
Issue created Feb 01, 2021 by Ognyan Tonchev@redstar

rtmp2sink: segfault on invalid meta pointer

Perhaps related to 1470 but not sure. In my case i am getting the crash below whenever i am sending data to youtube, video source does not matter. GStreamer version 1.18.2. G_SLICE=always-malloc makes the crash disappear.

Thread 2 "task0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 18590.18738]
0x76c1a4be in _gst_buffer_free (buffer=0x5335e8) at ../../libs/gstreamer/gst/gstbuffer.c:780
780	    const GstMetaInfo *info = meta->info;
(gdb) bt
#0  0x76c1a4be in _gst_buffer_free (buffer=0x5335e8) at ../../libs/gstreamer/gst/gstbuffer.c:780
#1  0x76c52452 in gst_mini_object_unref (mini_object=0x5335e8) at ../../libs/gstreamer/gst/gstminiobject.c:671
#2  0x76c525da in gst_mini_object_replace (olddata=0x74c0e050, newdata=0x0) at ../../libs/gstreamer/gst/gstminiobject.c:741
#3  0x741691b0 in gst_buffer_replace (obuf=0x74c0e050, nbuf=0x0) at /home/ognyan/acap/rtmp/buildenv/acap/mybuild/sysroot/usr/include/gstreamer-1.0/gst/gstbuffer.h:602
#4  0x741693f8 in chunk_stream_clear (cstream=0x74c0e050) at ../gst/rtmp2/rtmp/rtmpchunkstream.c:101
#5  0x7416b83a in gst_rtmp_chunk_stream_serialize_start (cstream=0x74c0e050, buffer=0x533690, chunk_size=128) at ../gst/rtmp2/rtmp/rtmpchunkstream.c:645
#6  0x7416b9b6 in gst_rtmp_chunk_stream_serialize_all (cstream=0x74c0e050, buffer=0x533690, chunk_size=128) at ../gst/rtmp2/rtmp/rtmpchunkstream.c:675
#7  0x7416efc0 in gst_rtmp_connection_start_write (self=0x5331f8) at ../gst/rtmp2/rtmp/rtmpconnection.c:519
#8  0x74170732 in start_write (user_data=0x5331f8) at ../gst/rtmp2/rtmp/rtmpconnection.c:1072
#9  0x76f137f4 in g_main_context_invoke_full (context=0x74c07108, priority=0, function=0x74170721 <start_write>, data=0x5331f8, notify=0x76e8b931 <g_object_unref>) at ../../libs/glib/glib/gmain.c:5827
#10 0x741707f2 in gst_rtmp_connection_queue_message (self=0x5331f8, buffer=0x533690) at ../gst/rtmp2/rtmp/rtmpconnection.c:1083
#11 0x74170ce6 in gst_rtmp_connection_set_chunk_size (connection=0x5331f8, chunk_size=128) at ../gst/rtmp2/rtmp/rtmpconnection.c:1203
#12 0x7416405c in set_chunk_size (self=0x4fb258) at ../gst/rtmp2/gstrtmp2sink.c:1138
#13 0x74163dea in connect_task_done (object=0x4fb258, result=0x46aad8, user_data=0x0) at ../gst/rtmp2/gstrtmp2sink.c:1069
#14 0x76d92474 in g_task_return_now (task=0x46aad8) at ../../libs/glib/gio/gtask.c:1209
#15 0x76d92568 in g_task_return (task=0x46aad8, type=G_TASK_RETURN_SUCCESS) at ../../libs/glib/gio/gtask.c:1278
#16 0x76d92dc2 in g_task_return_pointer (task=0x46aad8, result=0x5331f8, result_destroy=0x7416eb35 <gst_rtmp_connection_close_and_unref>) at ../../libs/glib/gio/gtask.c:1683
#17 0x7416361c in start_publish_done (source=0x5331f8, result=0x74c076d0, user_data=0x46aad8) at ../gst/rtmp2/gstrtmp2sink.c:985
#18 0x76d92474 in g_task_return_now (task=0x74c076d0) at ../../libs/glib/gio/gtask.c:1209
#19 0x76d92568 in g_task_return (task=0x74c076d0, type=G_TASK_RETURN_SUCCESS) at ../../libs/glib/gio/gtask.c:1278
#20 0x76d930e0 in g_task_return_boolean (task=0x74c076d0, result=1) at ../../libs/glib/gio/gtask.c:1795
#21 0x7416df86 in on_publish_or_play_status (command_name=0x74c10ff0 "onStatus", args=0x74c01978, user_data=0x74c076d0) at ../gst/rtmp2/rtmp/rtmpclient.c:1270
#22 0x74170698 in gst_rtmp_connection_handle_cm (sc=0x5331f8, buffer=0x5333f0) at ../gst/rtmp2/rtmp/rtmpconnection.c:1058
#23 0x7416f5bc in gst_rtmp_connection_handle_message (sc=0x5331f8, buffer=0x5333f0) at ../gst/rtmp2/rtmp/rtmpconnection.c:701
#24 0x7416f534 in gst_rtmp_connection_do_read (sc=0x5331f8) at ../gst/rtmp2/rtmp/rtmpconnection.c:678
#25 0x7416f3ba in gst_rtmp_connection_try_read (connection=0x5331f8) at ../gst/rtmp2/rtmp/rtmpconnection.c:618
#26 0x7416ee26 in gst_rtmp_connection_input_ready (is=0x74c06108, user_data=0x5331f8) at ../gst/rtmp2/rtmp/rtmpconnection.c:477
#27 0x76d761e8 in pollable_source_dispatch (source=0x74c0bac0, callback=0x7416ebed <gst_rtmp_connection_input_ready>, user_data=0x5331f8) at ../../libs/glib/gio/gpollableutils.c:50
#28 0x76f11070 in g_main_dispatch (context=0x74c07108) at ../../libs/glib/glib/gmain.c:3189
#29 0x76f11bb4 in g_main_context_dispatch (context=0x74c07108) at ../../libs/glib/glib/gmain.c:3854
#30 0x76f11cf8 in g_main_context_iterate (context=0x74c07108, block=1, dispatch=1, self=0x4d5e60) at ../../libs/glib/glib/gmain.c:3927
#31 0x76f120aa in g_main_loop_run (loop=0x74c073c8) at ../../libs/glib/glib/gmain.c:4123
#32 0x74163340 in gst_rtmp2_sink_task_func (user_data=0x4fb258) at ../gst/rtmp2/gstrtmp2sink.c:914
#33 0x76c8d20a in gst_task_func (task=0x4fb828) at ../../libs/gstreamer/gst/gsttask.c:328
#34 0x76c8e0ec in default_func (tdata=0x4ff508, pool=0x4ee1c0) at ../../libs/gstreamer/gst/gsttaskpool.c:70
#35 0x76f39312 in g_thread_pool_thread_proxy (data=0x4d5c38) at ../../libs/glib/glib/gthreadpool.c:308
#36 0x76f38dd0 in g_thread_proxy (data=0x4d5e60) at ../../libs/glib/glib/gthread.c:805
#37 0x765fb898 in ?? () from ./mybuild/sysroot/usr/lib/libpthread.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) f 0
#0  0x76c1a4be in _gst_buffer_free (buffer=0x5335e8) at ../../libs/gstreamer/gst/gstbuffer.c:780
780	    const GstMetaInfo *info = meta->info;
(gdb) print meta
$1 = (GstMeta *) 0x1e
(gdb) print meta->info
(gdb) print *buffer
$2 = {mini_object = {type = 4613104, refcount = 0, lockstate = 0, flags = 16384, copy = 0x76c1a39d <_gst_buffer_copy>, dispose = 0x76c1a3d1 <_gst_buffer_dispose>, free = 0x76c1a455 <_gst_buffer_free>, 
    priv_uint = 1, priv_pointer = 0x0}, pool = 0x0, pts = 18446744073709551615, dts = 18446744073709551615, duration = 18446744073709551615, offset = 18446744073709551615, offset_end = 18446744073709551615}
Edited Feb 01, 2021 by Ognyan Tonchev
Assignee
Assign to
Time tracking