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 630452 - rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe
rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-23 17:59 UTC by Håvard Graff (hgr)
Modified: 2010-09-24 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.01 KB, patch)
2010-09-23 17:59 UTC, Håvard Graff (hgr)
none Details | Review

Description Håvard Graff (hgr) 2010-09-23 17:59:40 UTC
Created attachment 170948 [details] [review]
patch

Using _foreach_remove on the hashtable, while releasing the lock protecting
that table inside the callback is not a good idea. The hashtable might
then change (a source removed or added) while signals like on_timeout
are being sent.
Comment 1 Wim Taymans 2010-09-24 13:39:29 UTC
commit ca6a512b5eef7434a2a09310317944b08323578b
Author: Pascal Buhler <pascal.buhler@tandberg.com>
Date:   Fri Sep 24 15:33:40 2010 +0200

    rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe
    
    Using _foreach_remove on the hashtable, while releasing the lock protecting
    that table inside the callback is not a good idea. The hashtable might
    then change (a source removed or added) while signals like on_timeout
    are being sent.
    
    This solution makes a copy of the table, performs the _foreach without
    actually removing any sources, but marks them for removal on a second
    iteration with the real list, but this time not letting go of the lock.
    
    Fixes #630452