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 649617 - [rtp] Deadlock and other fixes for rtpssrcdemux
[rtp] Deadlock and other fixes for rtpssrcdemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-06 23:17 UTC by Olivier Crête
Modified: 2011-06-15 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpssrcdemux: Release lock before emitting signal (4.36 KB, patch)
2011-05-06 23:17 UTC, Olivier Crête
committed Details | Review
rtpssrcdemux: iterate pad function is only valid for src pads (2.85 KB, patch)
2011-05-06 23:17 UTC, Olivier Crête
committed Details | Review
ssrcdemux: Implement iterate internal links for sink pads (2.97 KB, patch)
2011-05-06 23:18 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2011-05-06 23:17:40 UTC
Here are some patches to fix some problems with rtpssrcdemux:

1. It emits signals with its lock held (causing deadlocks when used with the re-negotiate event patches)
2. There is no pad iterate for its sink pads

Also there is another potential problem for which I have no solution, I'm afraid there is a potential race if the "clear-ssrc" action signal is called while a chain function is being called.. It could free the "dpad" struct while it is being used by the chain functions. Refcounting the dpad struct would fix that.. But then you get into the problem of what happens if you are unlucky enough to try to re-add the src pad while it is being removed.. Like remove it from the list, release the lock, try to re-add it (but before the src pads have been removed from the object), it gets nasty...
Comment 1 Olivier Crête 2011-05-06 23:17:57 UTC
Created attachment 187398 [details] [review]
rtpssrcdemux: Release lock before emitting signal

If the lock is not released before emitting a signal, it may cause a deadlock
if any other function in the element is called.

Also removed an unused timestamp parameter
Comment 2 Olivier Crête 2011-05-06 23:17:59 UTC
Created attachment 187399 [details] [review]
rtpssrcdemux: iterate pad function is only valid for src pads

The iterate function is only used for src pads, so mark it as such and remove
dead code.
Comment 3 Olivier Crête 2011-05-06 23:18:01 UTC
Created attachment 187400 [details] [review]
ssrcdemux: Implement iterate internal links for sink pads
Comment 4 Sebastian Dröge (slomo) 2011-05-09 07:20:57 UTC
Comment on attachment 187399 [details] [review]
rtpssrcdemux: iterate pad function is only valid for src pads

The iterate internal links function for the sink pads is correct as is? Currently it would return all srcpads but I think instead it should return only the rtp src for the rtp sink and the rtcp src for the rtp sink
Comment 5 Sebastian Dröge (slomo) 2011-05-09 07:22:59 UTC
Comment on attachment 187400 [details] [review]
ssrcdemux: Implement iterate internal links for sink pads

Oh nevermind, I should've looked at the next patch first :)
Comment 6 Sebastian Dröge (slomo) 2011-05-17 07:24:40 UTC
commit b6bfc512e8c3781b272732b9b342a225bb32412a
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Fri May 6 19:09:17 2011 -0400

    ssrcdemux: Implement iterate internal links for sink pads
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649617

commit 23b6c8febc71b3303ae6bca19ae9ef9a7f2ca1e8
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Fri May 6 18:41:01 2011 -0400

    rtpssrcdemux: iterate pad function is only valid for src pads
    
    The iterate function is only used for src pads, so mark it as such and remov
    dead code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649617

commit 1bf94a92b04e4b0ff83fd015daa46e880cc4d920
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Fri May 6 18:12:53 2011 -0400

    rtpssrcdemux: Release lock before emitting signal
    
    If the lock is not released before emitting a signal, it may cause a deadloc
    if any other function in the element is called.
    
    Also removed an unused timestamp parameter
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649617