[Bug 732226] New: Races when sessions time out
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jun 25 04:25:03 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=732226
GStreamer | gst-rtsp-server | git
Summary: Races when sessions time out
Classification: Platform
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-rtsp-server
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: ognyan.tonchev at axis.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
I am having trouble because of a race in gst-rtsp-server when expired sessions
are being removed. In my case the GSource responsible for cleaning up the
timed-out sessions is attached to the application default context. The GSource
is set up the following way:
source = gst_rtsp_session_pool_create_watch ()
g_source_set_callback (source, (GSourceFunc) session_timeout_cb, NULL, NULL);
And the GSource callback looks like this:
session_timeout_cb(pool) {
gst_rtsp_session_pool_filter (pool, remove_expired_session, NULL);
}
remove_expired_session() {
if (gst_rtsp_session_is_expired (session)) {
return GST_RTSP_FILTER_REMOVE;
}
return GST_RTSP_FILTER_KEEP;
}
And this code introduces a race in rtsp-client.c. The race is between the week
reference callback client_session_finalized () run in the main context and the
rest of the functions in RTSPClient manipulating the internal sessions list
(the code does not even keep hard references to the sessions) from clients own
context.
The result I am getting is segmentation faults of different kind when the
server is under high load and sessions start to expire.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list