RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
143 stars 64 forks source link

Interpipesink sends SIGSEGV upstream and causes segmentation fault on GST 1.19.2 #107

Closed keivanh closed 2 years ago

keivanh commented 2 years ago

Only on latest version of GStreamer 1.19.2:

Interpipesink sends SIGSEGV on src pad of first element before it and cause the segmentation fault.

For example:

audiotestsrc ! audioconvert ! queue ! interpipesink sync=false async=false

back trace in gdb:

Thread 2 "queue0:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff495b700 (LWP 98051)]
0x0000555555acf7c0 in ?? ()
(gdb) bt
#0  0x0000555555acf7c0 in  ()
#1  0x00007ffff4967eaf in gst_app_sink_event (sink=0x555555ad3780 [GstBaseSink|outputSinkEnsoniq_AudioPCI], event=0x555555ad1920) at ../subprojects/gst-plugins-base/gst-libs/gst/app/gstappsink.c:901
#2  0x00007ffff64e4b29 in gst_inter_pipe_sink_event (base=0x555555ad3780 [GstBaseSink|outputSinkEnsoniq_AudioPCI], event=0x555555ad1920) at ../gst/interpipe/gstinterpipesink.c:586
#3  0x00007ffff6d21522 in gst_base_sink_event (pad=<optimized out>, parent=0x555555ad3780 [GstObject|outputSinkEnsoniq_AudioPCI], event=0x555555ad1920) at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c:3677
#4  0x00007ffff7ea5ae7 in gst_pad_send_event_unchecked (pad=pad@entry=0x555555ac4c30 [GstPad|sink], event=event@entry=0x555555ad1920, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
    at ../subprojects/gstreamer/gst/gstpad.c:5900
#5  0x00007ffff7ea6024 in gst_pad_push_event_unchecked (pad=pad@entry=0x555555ac49e0 [GstPad|src], event=0x555555ad1920, type=type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../subprojects/gstreamer/gst/gstpad.c:5544
#6  0x00007ffff7ea6494 in push_sticky (pad=pad@entry=0x555555ac49e0 [GstPad|src], ev=ev@entry=0x7ffff495ab30, user_data=user_data@entry=0x7ffff495aba0) at ../subprojects/gstreamer/gst/gstevent.h:425
#7  0x00007ffff7ea3ee8 in events_foreach (pad=pad@entry=0x555555ac49e0 [GstPad|src], func=func@entry=0x7ffff7ea6440 <push_sticky>, user_data=user_data@entry=0x7ffff495aba0) at ../subprojects/gstreamer/gst/gstpad.c:608
#8  0x00007ffff7eb0b81 in check_sticky (event=0x555555ad1920, pad=0x555555ac49e0 [GstPad|src]) at ../subprojects/gstreamer/gst/gstpad.c:4106
#9  0x00007ffff7eb0b81 in gst_pad_push_event (pad=0x555555ac49e0 [GstPad|src], event=event@entry=0x555555ad1920) at ../subprojects/gstreamer/gst/gstpad.c:5675
#10 0x00007ffff49b6093 in gst_queue_push_one (queue=0x555555aca080 [GstQueue|queue0]) at ../subprojects/gstreamer/plugins/elements/gstqueue.c:1459
#11 0x00007ffff49b6093 in gst_queue_loop (pad=<optimized out>) at ../subprojects/gstreamer/plugins/elements/gstqueue.c:1541
#12 0x00007ffff7edf211 in gst_task_func (task=0x555555ad9050 [GstTask|queue0:src]) at ../subprojects/gstreamer/gst/gsttask.c:384
#13 0x00007ffff7d24bb3 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff7d24215 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff7793164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#16 0x00007ffff7516def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

No matter the source (video or audio) or pads capabilities same happens.

callumbrieske commented 2 years ago

I have encountered this issue too.

michaelgruner commented 2 years ago

Hello, thanks for reporting. Let me reproduce and analyze the problem and get back to you.

karas84 commented 2 years ago

Same on GStreamer 1.19.3. Is there any news @michaelgruner ?

michaelgruner commented 2 years ago

@jafet-chaves please provide an update regarding this issue as soon as you have something. Thanks!

jafet-chaves commented 2 years ago

Hello all. There is a proposed fix for this on the PR #112. Currently it is under review but you can try it out on your end in the meantime.