<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - wl_display_roundtrip() seems not thread-safe"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83304#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - wl_display_roundtrip() seems not thread-safe"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83304">bug 83304</a>
from <span class="vcard"><a class="email" href="mailto:courmisch@gmail.com" title="Remi Denis-Courmont <courmisch@gmail.com>"> <span class="fn">Remi Denis-Courmont</span></a>
</span></b>
<pre>Pekka, the mainloop is simplistic and tries to follow the documentation:
<a href="https://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/wl/shell_surface.c;hb=2.2.0-git-662-ge08f4fc#l48">https://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/wl/shell_surface.c;hb=2.2.0-git-662-ge08f4fc#l48</a>
(Admittedly the cleanup path may look unorthodox, but you can ignore it as the
deadlock predates it.) The deadlock is there, right below FIXME:
<a href="https://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/wl/shm.c;hb=2.2.0-git-662-ge08f4fc#l184">https://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/wl/shm.c;hb=2.2.0-git-662-ge08f4fc#l184</a>
(NOTE: I know that wl_shm is not the best option for media playback. In the
long term, we definitely want to avoid software scaling and colour space
conversion. But that is outside the scope of this bug.)
I tried to use wl_event_queue, but it gave me crashes in the mainloop after
destroying the supposedly no longer used queue. I guess I don't know how/when
it is safe to delete a queue.
So it does not seem to me that "it all works if all threads follow the polling
protocol documented".</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>