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 796895 - pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too
pad: Ensure that the pad is blocked for IDLE probes if they are called from t...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.14.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-30 15:55 UTC by Sebastian Dröge (slomo)
Modified: 2018-08-02 07:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too (1.70 KB, patch)
2018-07-30 15:55 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2018-07-30 15:55:34 UTC
See commit message
Comment 1 Sebastian Dröge (slomo) 2018-07-30 15:55:40 UTC
Created attachment 373221 [details] [review]
pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too

IDLE probes that are directly called when being added will increase /
decrease the "number of IDLE probes running" counter around the call,
but when running from the streaming thread this won't happen.

This has the effect that when running from a streaming thread it is
possible to push serialized events or data out of the pad without
problems, but otherwise it would deadlock because serialized data would
wait for the IDLE probe to finish first (it is blocking after all!).

With this change it will now always consistently deadlock instead of
just every once in a while, which should make it obvious why this
happens and prevent racy deadlocks in application code.
Comment 2 Tim-Philipp Müller 2018-07-30 17:01:27 UTC
should we be adding anything to the docs somewhere about what's not ok to do from an IDLE probe then? e.g. to the IDLE flag docs?
Comment 3 Sebastian Dröge (slomo) 2018-07-30 19:25:44 UTC
IMHO that's already clear from the docs, it's a blocking probe. It was surprising for me that it actually worked, it was an accident that I ran into this :)
Comment 4 Sebastian Dröge (slomo) 2018-08-01 14:29:20 UTC
Attachment 373221 [details] pushed as c3d3cf0 - pad: Ensure that the pad is blocked for IDLE probes if they are called from the streaming thread too