[vlc-devel] [PATCH 00/20] MR: Finishing vout life cycle work

Rémi Denis-Courmont remi at remlab.net
Thu May 9 13:24:54 CEST 2019


It will still deadlock because vout_Request() and aout_DecNew() still need to be interlocked, for the same reason as Laurent put the lock in the first place. Without it, we cannot sequence outputs creation/deletion as expected.

Well probably it could be separate for aout and vout. But it's still needed.

Le 9 mai 2019 14:10:33 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>I backported my "merge both locks" commit into 3.0 to reproduce the
>deadlock.
>
>Indeed, it protected a deadlock when the following happened:
>
>The GUI (Qt here) hold vouts while a vout is created from an other
>thread.
>cf. https://code.videolan.org/tguillem/vlc/snippets/955/raw for the
>backtrace
>
>1/ A decoder thread request a vout, LOCK the input_resource mutex, and
>create a vout
>2/ The GUI is on its mainloop and WAIT the input_resource mutex.
>3/ From the decoder thread, The vout_Request() load a "vout window"
>plugin, that will emit and wait for the getVideoSlot() that need to be
>executed in the GUI thread
>
>=> Deadlock
>
>But this won't happen on VLC 4.0 (I tested it to made sure) since
>vout_Request() is called unlocked. Only the vout_Create() is locked,
>but this call only load the "vout window" plugin without enabling it.
>
>I updated my vout-life/6 branch to fix some issues:
>https://code.videolan.org/tguillem/vlc/commits/vout-life/6
>
>Mainly related to the "es_out: terminate free vout in more places"
>commit. The window was not disabled when I was disabled video tracks
>from the UI.
>
>Also, this branch do revert a commit from Rémi: "resource: atomically
>return vout on failure (fixes #22284)" only to fix the issue in a
>diffrent way from the "resource: respect vout order" commit.
>
>On Thu, May 9, 2019, at 12:01, Thomas Guillem wrote:
>> 
>> On Thu, May 9, 2019, at 11:52, Rémi Denis-Courmont wrote:
>>> No. Plugins are supposed to be reentrant, and at least the Qt window
>provider was before you disabled it. Besides, the resource lock cannot
>prevent reentry into a vout window activation callback anyway.
>> 
>> The Qt window provider is protected by the resource lock since it's
>created from vout_Create() that is locked. Indeed this lock is not
>enough since there can be several input_resource.
>> 
>>> -- 
>>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser ma brièveté. 
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190509/2894c75a/attachment.html>


More information about the vlc-devel mailing list