After display protocol error communication between wayland protocol and client is broken.

Pekka Paalanen ppaalanen at gmail.com
Tue Jan 1 12:41:25 UTC 2019


On Mon, 31 Dec 2018 20:08:24 +0530
Ikshwaku Chauhan <ikshwaku.ec2004 at gmail.com> wrote:

> Hello Pekka,
> 
> Thanks for your reply.
> Here we are trying to identify the exact root cause for the protocol error.
> we deliberately dumped the back trace by calling *abort in
> display_protocol_error* function and attaching backtrace for your
> reference.
> Could you please have a look and provide your inputs.

Hi,

sorry, I explained my guesses in my previous email, and if those
are true, backtrace of the protocol error is not helpful. You need
to look into when you create, skip creating, or destroy
wl_resources representing ivi_controller_surface objects.

The bug likely happens before the protocol error: when you are
processing ivi_controller.surface_create or between that and a
request that triggers the protocol error.

> We have one more query,
> As per the wayland client logs I have attached in the last mail, we
> observed that after getting surface created event, usually we get
> configuration event and then if we set any property of surface (ex:
> set_source_rectangle), the protocol communication seems to be fine.
> But, when surface created event received and without configuration event,
> if we try to set any property of surface, the protocol communication seems
> to be stuck.

I suppose the compositor is not sending the configuration event for
some reason? Maybe the underlying surface was destroyed immediately
after it was created?

That is not upstream Weston code, so I cannot know.

> Is this the expected behavior for "Protocol error"?  Please provide you
> inputs for this as well.

As said, all protocol errors are instantly fatal and cause the
Wayland connection to become dead. No further messaging will be
possible on a dead connection.

Events that have been written into the socket before the protocol
error will remain, but the socket is already disconnected.


Thanks,
pq

> On Sun, Dec 30, 2018 at 2:42 PM Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> > If I had to guess, you have a compositor-side bug. Either the
> > wl_resource for id 22 in the ivi_controller.surface_create call is
> > not created at all, or it is created and then destroyed unwarranted
> > by the protocol.
> >
> > Whenever a protocol message is creating a new object, the message
> > handler in the compositor cannot ever choose to not create the
> > wl_resource for it. Likewise, wl_resources cannot be destroyed
> > without an explicit warrant from protocol exchange, e.g. a destroy
> > request.
> >
> > I'm guessing that you use global identifiers (the argument 80) to
> > identify surfaces, that "surface 80" does not exist anymore, so you
> > skip creating the wl_resource. That would be a bug.
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190101/3467d5f2/attachment.sig>


More information about the wayland-devel mailing list