After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748175 - gst_rtsp_server_client_filter hangs
gst_rtsp_server_client_filter hangs
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
1.4.5
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-20 10:19 UTC by James Stevenson
Modified: 2018-02-01 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible fix for gst_rtsp_server_client_filter hang (561 bytes, patch)
2015-09-30 13:55 UTC, Nikita Bobkov
none Details | Review

Description James Stevenson 2015-04-20 10:19:11 UTC
When calling gst_rtsp_server_client_filter with a function which always returns GST_RTSP_FILTER_REMOVE and clients are connected to the rtsp will cause random hangs in the application and the function gst_rtsp_server_client_filter will never return.

Example code:

static GstRTSPFilterResult KickAllFilter (GstRTSPServer *server, GstRTSPClient *client, gpointer user_data)
{
        return GST_RTSP_FILTER_REMOVE;
}

GList *lst = gst_rtsp_server_client_filter(m_server, KickAllFilter, NULL);
g_list_free(lst);


Stack Trace:

Thread 7 (Thread 0x7ffff1bfb700 (LWP 28114))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_mutex_lock_slowpath
    at /build/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1314
  • #2 g_mutex_lock
    at /build/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1338
  • #3 g_source_unref_internal
    at /build/buildd/glib2.0-2.42.1/./glib/gmain.c line 2018
  • #4 gst_rtsp_server_client_filter
  • #5 RTSPServer::KickAll
    at RTSPServer.cpp line 76

Comment 1 Nikita Bobkov 2015-09-30 13:55:10 UTC
Created attachment 312430 [details] [review]
possible fix for gst_rtsp_server_client_filter hang

It looks like that GMainContext of GSource can be destroyed prematurely somewhere inside gst_rtsp_watch_unref. Not sure how exactly it happens but this seems to help at least in my case.
Comment 2 Kseniya Vasilchuk 2016-09-14 13:15:11 UTC
Fixed by commit below:

commit 17f5785638edd7af241dc028ccb91331498b2cfb
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Mon Sep 22 13:32:06 2014 +0200

rtsp-client: do not free main context before rtsp watch
    
https://bugzilla.gnome.org/show_bug.cgi?id=737110
Comment 3 Tim-Philipp Müller 2018-02-01 17:48:03 UTC
Looks like this should be fixed in newer versions of GStreamer.

Please re-open if it's still a problem with recent versions, thanks!