I can now debug this from within Mir. Almost disappointingly I can't see any incorrect frame ordering within Mir. The client (XMir) always gets frame 0,1,2,0,1,2,... and the server always composites frame 0,1,2,0,1,2... starting with the latest one released by the client. So everything looks correct from within the server.
Next week I will come at it with fresh eyes, and also try to devise some logical assertions to verify ordering.
I can now debug this from within Mir. Almost disappointingly I can't see any incorrect frame ordering within Mir. The client (XMir) always gets frame 0,1,2,0,1,2,... and the server always composites frame 0,1,2,0,1,2... starting with the latest one released by the client. So everything looks correct from within the server.
Next week I will come at it with fresh eyes, and also try to devise some logical assertions to verify ordering.