<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On 23 November 2017 at 16:13, Olivier Fourdan <span dir="ltr"><<a href="mailto:fourdan@gmail.com" target="_blank">fourdan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>FWIW, it seems we have that issue with more than just wl_output, in downstream bug 1516859 [1] this occurs with wl_seat on VT switch as well.</div><div><br></div><div>That's pretty easy to reproduce, issue several VT switches back and forth (I use "chvt" from a remote connection) until the race occurs, here it doesn't take long.</div><div><br></div><div>Cheers,</div><div>Olivier</div><div><br></div><div>[1]   <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1516859" target="_blank">https://bugzilla.redhat.com/<wbr>show_bug.cgi?id=1516859</a></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">So, to be clear, the race here is between wl_seat capabilities and wl_pointer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">On VT switch, the compositor notifies the clients of the changes in wl_seat capabilities, Xwayland creates and releases the pointer based on these capabilities, and when switching quickly between VTs, by the time the get_pointer() is processed by the compositor, the pointer has been released from a previous capability change.</div><div class="gmail_extra"><br></div><div class="gmail_extra">For clarity, I added a trace in Xwayland's init_pointer() and release_pointer(), the following in a excerpt of the logs at the time of the issue:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"> *** Xserver-Message *** release_pointer: release pointer</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868330.603]  -> wl_pointer@53.release()</div><div class="gmail_extra">[1868330.643]  -> zwp_relative_pointer_v1@54.destroy()</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868330.683] wl_seat@13.capabilities(2)</div><div class="gmail_extra">[1868330.687]  -> wl_seat@13.get_keyboard(new id wl_keyboard@55)</div><div class="gmail_extra">[1868330.704] wl_seat@13.capabilities(3)</div><div class="gmail_extra"><br></div><div class="gmail_extra"> *** Xserver-Message *** init_pointer: create pointer</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868330.709]  -> wl_seat@13.get_pointer(new id wl_pointer@56)</div><div class="gmail_extra">[1868330.726]  -> zwp_relative_pointer_manager_v1@16.get_relative_pointer(new id zwp_relative_pointer_v1@57, wl_pointer@56)</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868330.745] wl_seat@13.capabilities(1)</div><div class="gmail_extra">[1868330.749]  -> wl_keyboard@55.release()</div><div class="gmail_extra">[1868330.789] wl_seat@13.capabilities(0)</div><div class="gmail_extra"><br></div><div class="gmail_extra"> *** Xserver-Message *** release_pointer: release pointer</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868330.794]  -> wl_pointer@56.release()</div><div class="gmail_extra">[1868330.830]  -> zwp_relative_pointer_v1@57.destroy()</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1868381.340] wl_seat@13.get_pointer(new id wl_pointer@18)</div><div class="gmail_extra">[1868381.379]  -> wl_display@1.error(wl_display@1, 0, "invalid object 18")</div><div class="gmail_extra">[1868381.416] wl_display@1.error(wl_display@1, 0, "invalid object 18")</div><div class="gmail_extra"><br></div><div class="gmail_extra">Unfortunately, I am not sure how to avoid this...</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">Olivier</div></div></div>