Signal handler disconnection race when finalising GCancellableSource
Hi!
I stumbled upon subj error on a program which was perfectly stable on old glib and broken on newer ones.
Steps to reproduce:
- Launch test gstreamer pipeline with
gst-launch-1.0 videotestsrc ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency key-int-max=6 ! mpegtsmux ! tcpserversink timeout=1000000000 port=55555 host=0.0.0.0
-
Rename attached file to tcp_ddos.py. Run with python. It basically launches 4 individual process which connect to 127.0.0.1:55555 reads 4096 bytes from socket for random time and then restarts the connection.
-
Observe described error as:
root@cholpon:/opt/videoserver# gst-launch-1.0 videotestsrc ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency key-int-max=6 ! mpegtsmux ! tcpserversink timeout=1000000000 port=55555 host=0.0.0.0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
(gst-launch-1.0:22683): GLib-GObject-WARNING **: 00:41:33.519: ../../../../gobject/gsignal.c:2641: instance '0x55cde72a9310' has no handler with id '11864'
Caught SIGSEGV
#0 0x00007fabd1dcebf9 in __GI___poll (fds=0x55cde72c0590, nfds=2, timeout=-1)
#1 0x00007fabd23165c9 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fabd2316962 in g_main_loop_run ()
#3 0x00007fabd287a8b3 in gst_bus_poll ()
#4 0x000055cde62f3bb3 in ?? ()
#5 0x000055cde62f2cb7 in ?? ()
#6 0x00007fabd1cdbb97 in __libc_start_main (main=0x55cde62f2460, argc=16,
#7 0x000055cde62f30da in ?? ()
Spinning. Please run 'gdb gst-launch-1.0 22683' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
Related gstreamer issue I created:
https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/414
Thanks in advance!
Edited by Philip Withnall