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 689597 - gst-rtsp-server: keep rtsp-media alive until bus watch is destroyed
gst-rtsp-server: keep rtsp-media alive until bus watch is destroyed
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
0.10.x
Other Linux
: Normal normal
: 0.10.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-04 09:29 UTC by Aleix Conchillo Flaqué
Modified: 2012-12-10 09:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ref/unref media in gsource creation/destruction (2.36 KB, patch)
2012-12-04 09:36 UTC, Aleix Conchillo Flaqué
none Details | Review
ref/unref media in gsource creation/destruction (2.36 KB, patch)
2012-12-04 10:02 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2012-12-04 09:29:42 UTC
It is possible that the thread than handles bus messages in rtsp-media is interrupted while rtsp-media is being destroyed. This will cause segmentation faults and/or memory corruption when the bus message thread gets control again (if it access the media element).

This is currently solved in gst-rtsp-server master branch by referencing media when the gsource is created and a GDestroyNotify function takes care of unreferencing media.
Comment 1 Aleix Conchillo Flaqué 2012-12-04 09:36:33 UTC
Created attachment 230631 [details] [review]
ref/unref media in gsource creation/destruction
Comment 2 Aleix Conchillo Flaqué 2012-12-04 10:02:34 UTC
Created attachment 230632 [details] [review]
ref/unref media in gsource creation/destruction

Updated file name (to avoid confusion). It was missing first digit in bug number.
Comment 3 Wim Taymans 2012-12-10 09:54:50 UTC
Author: Aleix Conchillo Flaque <aleix@oblong.com>  2012-12-04 10:32:46
Committer: Wim Taymans <wim.taymans@collabora.co.uk>  2012-12-10 10:51:40
Parent: 0f6d0c71990e5ac87ada503ba2ed9509400ba9cf (disable deprecation warnings)
Branches: 0.10, remotes/origin/0.10
Follows: RELEASE-0.10.8
Precedes: 

    keep rtsp-media alive until bus watch is destroyed
    
    * gst/rtsp-server/rtsp-media.c: media is now referenced by the
      GSource (bus message watch) and unreferenced when the GSource is
      destroyed (when media is unprepared). This avoids destroying media
      while bus message handle is being executed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=689597