Hang on disconnecting RTSP clients on Gstreamer 1.18.0 (using test-video-disconnect example)
I'm trying to upgrade our Gstreamer applications from Gstreamer 1.14.4 to 1.18.0. After this upgrade, I see a hang when using gst-rtsp-server, in gst_rtsp_client_close when closing active clients.
This issue is reproducible on our installation by running the test-video-disconnect example, in the call to gst_rtsp_client_close. The full GDB stacktrace is pasted below. It does not occur on every run, but is hit most times.
With 1.14.4, this issue was not seen - test-video-disconnect runs fine, disconnecting the client successfully and exiting cleanly.
Is this a known issue in 1.18?
0x0000007ff7207270 in syscall () from /lib/libc.so.6 (gdb) bt #0 0x0000007ff7207270 in syscall () from /lib/libc.so. #1 0x0000007ff75de3f0 in g_mutex_lock_slowpath (mutex=0x57bd60) at ../glib/gthread-posix.c:1458 #2 0x0000007ff757f82c in g_source_unref_internal.lto_priv.63 ( source=0x57bf60, context=0x57bd60, have_lock=0) at ../glib/gmain.c:2237 #3 0x0000007ff7c1503c in gst_rtsp_source_finalize (source=0x57d150) at ../gst-libs/gst/rtsp/gstrtspconnection.c:4152 #4 0x0000007ff757f824 in g_source_unref_internal.lto_priv.63 ( source=0x57d150, context=0x57bd60, have_lock=0) at ../glib/gmain.c:2235 #5 0x0000007ff7f6e984 in gst_rtsp_client_close (client=0x57c190) at ../gst/rtsp-server/rtsp-client.c:1307 #6 0x0000007ff7f88120 in gst_rtsp_server_client_filter ( server=server@entry=0x514910, func=func@entry=0x400f24 <client_filter>, user_data=0x422424b5b4a79e00, user_data@entry=0x0) at ../gst/rtsp-server/rtsp-server.c:1499 #7 0x0000000000401014 in shutdown_timeout (server=0x514910, server@entry=<error reading variable: value has been optimized out>) at test-video-disconnect.c:75 #8 0x0000007ff757da20 in g_timeout_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../glib/gmain.c:4800 #9 0x0000007ff758016c in g_main_dispatch (context=0x56d3b0) --Type <RET> for more, q to quit, c to continue without paging-- at ../glib/gmain.c:3309 #10 g_main_context_dispatch (context=context@entry=0x56d3b0) at ../glib/gmain.c:3974 #11 0x0000007ff7582d40 in g_main_context_iterate.isra.38 (context=0x56d3b0, block=block@entry=1, dispatch=dispatch@entry=1) at ../glib/gmain.c:4047 #12 0x0000007ff7584570 in g_main_loop_run (loop=loop@entry=0x431c10) at ../glib/gmain.c:4241 #13 0x00000000004010f4 in main (argc=<optimized out>, argv=<optimized out>) at test-video-disconnect.c:211
I've also raised this issue on the Gstreamer forums (http://gstreamer-devel.966125.n4.nabble.com/Hang-on-disconnecting-RTSP-clients-on-Gstreamer-1-18-0-using-test-video-disconnect-example-tt4695993.html#none) - but given this worked in 1.14.4 and now no longer works, I thought it made sense to raise a bug to track.