<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Firefox/Wayland] multithread deadlock at eglSwapBuffers() / wl_display_dispatch_queue()"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106753#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Firefox/Wayland] multithread deadlock at eglSwapBuffers() / wl_display_dispatch_queue()"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106753">bug 106753</a>
              from <span class="vcard"><a class="email" href="mailto:jadahl@gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
        <pre>So what it looks like is that:

1. Firefox creates two surfaces, wl_surface@39 and wl_surface@40
2. Firefox turn wl_surface@40 into a desynchronous subsurface on top of
wl_surface@39
3. Firefox turn wl_surface@39 into a xdg_toplevel and commits the initial
(empty) state
4. The compositor sends the configure event to the xdg_toplevel
5. Firefox replies immediately with ack_configure() without attaching a buffer

This will probably consume any compositor: you just mapped a window, asked to
configure it (draw the first frame), but what happened is that no content was
posted even though the configure event was acknowledged

6. Firefox asks for a frame callback, attaches a new buffer to the subsurface
and commits it

When Firefox tries to do eglSwapBuffers() again

When it does this, it waits for the frame callback, but that will never happen
because the toplevel was never mapped, meaning the subsurface never has a
chance to be displayed, meaning the frame callback will never be invoked.

The xdg_surface interface states the following:

      For an xdg_surface to be mapped by the compositor, the following
      conditions must be met:
      (1) the client has assigned an xdg_surface-based role to the surface
      (2) the client has set and committed the xdg_surface state and the
          role-dependent state to the surface
      (3) the client has committed a buffer to the surface

The third condition here was never met.

This raises the question, what is the intended content of the subsurface and
what is the intended content of the toplevel?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>