[Bug 792341] pad: Deadlock after upgrade from 1.12.2 to 1.12.4 (regression)

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jan 16 09:24:23 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=792341

--- Comment #12 from Edward Hervey <bilboed at bilboed.com> ---
Created attachment 366874
  --> https://bugzilla.gnome.org/attachment.cgi?id=366874&action=edit
gstpad: Avoid stream-dead-lock on deactivation

The following case can happen when two thread try to activate and
deactivate a pad at the same time:
T1: starts to deactivate, calls pre_activate(), sets in_activation
    to TRUE and carries on
T2: starts to activate, calls pre_activate(), in_activation is TRUE
    so it waits on the GCond
T1: calls post_activate(), tries to acquire the streaming lock ..
    but can't because T1 is currently holding it

With this patch, the deadlock will no longer happen but does not
solve the problem that:
T2: will resume activation of the pad, set the pad mode to the target
   one (PUSH or PULL) and eventually the streaming lock gets released.
T1: is able to finish calling post_activate() ... but ... the pad
   wasn't deactivated (T2 was the last one to "activate" the pad.

-- 
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