<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal,#qt p.qt-MsoNoSpacing,#qt #qt-qt p.qt-qt-MsoNormal,#qt #qt-qt p.qt-qt-MsoNoSpacing{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Thu, May 9, 2019, at 13:25, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>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.<br></div></blockquote><div><br></div><div>I don't understand, what do you mean by interlocked ?<br></div><div>aout_DecNew() is called not locked. It's called directly from the input/decoder.c<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div>Well probably it could be separate for aout and vout. But it's still needed.<br></div><div><br></div><div class="qt-gmail_quote"><div>Le 9 mai 2019 14:10:33 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>I backported my "merge both locks" commit into 3.0 to reproduce the deadlock.<br></div><div><br></div><div>Indeed, it protected a deadlock when the following happened:<br></div><div><br></div><div>The GUI (Qt here) hold vouts while a vout is created from an other thread.<br></div><div>cf. <a href="https://code.videolan.org/tguillem/vlc/snippets/955/raw">https://code.videolan.org/tguillem/vlc/snippets/955/raw</a> for the backtrace<br></div><div><br></div><div>1/ A decoder thread request a vout, LOCK the input_resource mutex, and create a vout<br></div><div>2/ The GUI is on its mainloop and WAIT the input_resource mutex.<br></div><div>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<br></div><div><br></div><div>=> Deadlock<br></div><div><br></div><div>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.<br></div><div><br></div><div>I updated my vout-life/6 branch to fix some issues: <a href="https://code.videolan.org/tguillem/vlc/commits/vout-life/6">https://code.videolan.org/tguillem/vlc/commits/vout-life/6</a><br></div><div><br></div><div>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.<br></div><div><br></div><div>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.<br></div><div><br></div><div>On Thu, May 9, 2019, at 12:01, Thomas Guillem wrote:<br></div><blockquote id="qt-qt" type="cite"><div><br></div><div>On Thu, May 9, 2019, at 11:52, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt-qt-qt"><div>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.<br></div></blockquote><div><br></div><div>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.<br></div><div><br></div><blockquote type="cite" id="qt-qt-qt"><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>