[vlc-devel] Handling deadlock between display:Open() and vout_window_ReportSize()
ajanni at videolabs.io
Fri Dec 13 18:23:25 CET 2019
On Fri, Dec 13, 2019 at 07:06:35PM +0200, Rémi Denis-Courmont wrote:
> Le perjantaina 13. joulukuuta 2019, 18.54.22 EET Alexandre Janniaux a écrit :
> > On Fri, Dec 13, 2019 at 06:08:38PM +0200, Rémi Denis-Courmont wrote:
> > > Hi,
> > >
> > > There's an obvious lock inversion in that patch that will break all
> > > platforms.
> > For the inversion lock, the inversion is obvious in the
> > current codebase, but is impossible if you enable with the
> > right state because of the ordering of events and state, as
> > far as I checked. It's not impossible that it's imperfect
> > though, I would have submitted a patch if I were sure of
> > what I was doing.
> We use strict lock ordering in VLC like pretty much everywhere else. Anything
> else will confuse developers, reviewers, sanitizers and analyzers too much to
I agree, that's why I'm posting, do you have any other idea?
The only other one that I had to break this cycle is having
a central eventloop for this, but it's backward as it boils
down to getting back to the previous state of vout_thread.
To sum up the issue, we shouldn't try locking the display
lock and resizing the display at all if it doesn't exist yet,
but still apply this state change as soon as the display is
I don't know how to achieve it without one of these two ways
which is why I asked here, so as to determine if more
refactoring is needed or if a better solution can be found.
More information about the vlc-devel