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

2018-12-28 Thread Ikshwaku Chauhan
Hello Pekka, Hello Dima,

Thanks for your prompt responce.
After analyzing the below wayland client logs we concluded that we are
getting the *Protocol Error: Invalid Object*, because we are trying to set
the property of a destroyed surface.

[216074.552] ivi_controller@6.surface(80)
[216074.635]  -> ivi_controller@6.surface_create(80, new id
ivi_controller_surface@23)
[216074.710] ivi_input@7.input_acceptance(80, "default", 1)
[216075.760] ivi_controller_surface@23.opacity(1.00)
[216075.861] ivi_controller_surface@23.source_rectangle(0, 0, 0, 0)
[216075.940] ivi_controller_surface@23.destination_rectangle(0, 0, 1, 1)
[216076.018] ivi_controller_surface@23.orientation(0)
[216076.052] ivi_controller_surface@23.visibility(0)
[216076.085] ivi_controller_surface@23.layer(nil)
[216076.119] ivi_controller_surface@23.configuration(800, 480)
[216120.940] ivi_controller_surface@23.destroyed()
[216121.038]  -> ivi_controller_surface@23.destroy(1)
[216123.417]  -> wl_disp...@1.sync(new id wl_callback@22)
[216124.103] wl_display@1.delete_id(23)
[216124.153] wl_display@1.delete_id(22)
[216124.191] wl_callb...@22.done(0)
[216620.312] ivi_controller@6.surface(80)
[216620.417]  -> ivi_controller@6.surface_create(80, new id
ivi_controller_surface@22)
[216620.520] ivi_input@7.input_acceptance(80, "default", 1)
[216620.770] ivi_controller_surface@22.opacity(1.00)
[216620.817] ivi_controller_surface@22.source_rectangle(0, 0, 0, 0)
[216620.895] ivi_controller_surface@22.destination_rectangle(0, 0, 1, 1)
[216620.971] ivi_controller_surface@22.orientation(0)
[216640.269] ivi_controller_surface@22.visibility(0)
[216640.391] ivi_controller_surface@22.layer(nil)
[216640.430] ivi_controller_surface@22.configuration(800, 480)
[216640.525]  -> wl_disp...@1.sync(new id wl_callback@23)
[216660.432] wl_display@1.delete_id(23)
[216660.593] ivi_controller_surface@22.destroyed()
[216660.658]  -> ivi_controller_surface@22.destroy(1)
[216660.707] wl_callb...@23.done(0)
[216690.474]  -> wl_disp...@1.sync(new id wl_callback@23)
[216692.259] wl_display@1.delete_id(22)
[216692.324] wl_display@1.delete_id(23)
[216692.359] wl_callb...@23.done(0)
[217191.471] ivi_controller@6.surface(80)
[217191.544]  -> ivi_controller@6.surface_create(80, new id
ivi_controller_surface@23)
[217191.609] ivi_input@7.input_acceptance(80, "default", 1)
[217192.321] ivi_controller_surface@23.opacity(1.00)
[217192.380] ivi_controller_surface@23.source_rectangle(0, 0, 0, 0)
[217192.458] ivi_controller_surface@23.destination_rectangle(0, 0, 1, 1)
[217192.532] ivi_controller_surface@23.orientation(0)
[217192.565] ivi_controller_surface@23.visibility(0)
[217192.599] ivi_controller_surface@23.layer(nil)
[217192.632] ivi_controller_surface@23.configuration(800, 480)
[217193.993] ivi_controller_surface@23.source_rectangle(0, 0, 800, 480)
[217194.291] ivi_controller_surface@23.destination_rectangle(0, 0, 800, 480)
[217236.738] ivi_controller_surface@23.destroyed()
[217236.852]  -> ivi_controller_surface@23.destroy(1)
[217237.306]  -> wl_disp...@1.sync(new id wl_callback@22)
[217237.627] wl_display@1.delete_id(23)
[217237.678] wl_display@1.delete_id(22)
[217237.715] wl_callb...@22.done(0)
[217753.952] ivi_controller@6.surface(80)
[217759.719]  -> ivi_controller@6.surface_create(80, new id
ivi_controller_surface@22)
[217759.822] ivi_input@7.input_acceptance(80, "default", 1)
[217763.257]  -> wl_disp...@1.sync(new id wl_callback@23)
[217764.394] wl_display@1.delete_id(23)
[217764.456] wl_callb...@23.done(0)
[217765.170]  -> wl_disp...@1.sync(new id wl_callback@23)
[217765.660] wl_display@1.delete_id(23)
[217765.871] wl_callb...@23.done(0)
[217765.921]  -> ivi_controller_surface@22.set_source_rectangle(0, 0, 800,
480)
[217766.272]  -> wl_disp...@1.sync(new id wl_callback@23)
[217773.004] wl_display@1.error(wl_display@1, 0, "invalid object 22")
Error communicating with wayland: Invalid argument
[217773.310]  -> wl_disp...@1.sync(new id wl_callback@24)
Error communicating with wayland: Invalid argument
[217773.416]  -> wl_disp...@1.sync(new id wl_callback@25)
Error communicating with wayland: Invalid argument
[218279.632]  -> wl_disp...@1.sync(new id wl_callback@26)
Error communicating with wayland: Invalid argument
[218279.776]  -> wl_disp...@1.sync(new id wl_callback@27)

Could you please have a look and share your inputs about our findings.
Attaching the complete logs.

Here we have a use case, where we are creating and destroying the surfaces
very quickly.
One more thing this is an some time issue.

Thanks in advance.

Regards,
Ikshwaku


On Fri, Dec 28, 2018 at 3:09 PM Pekka Paalanen  wrote:

> On Thu, 27 Dec 2018 11:55:03 -0800
> Dima Ryazanov  wrote:
>
> > Hello,
> >
> > Yes, that's expected. From the documentation
> > <
> https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_display-event-error
> >:
> > "The error event is sent out when a fatal (non-recoverable) error has
> > occurred"
> > It indicates a bug in the code, so there's no point in handling

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

2018-12-28 Thread Pekka Paalanen
On Thu, 27 Dec 2018 11:55:03 -0800
Dima Ryazanov  wrote:

> Hello,
> 
> Yes, that's expected. From the documentation
> :
> "The error event is sent out when a fatal (non-recoverable) error has
> occurred"
> It indicates a bug in the code, so there's no point in handling the error.

Correct. After any protocol error, the Wayland connetion is dead.
The only way to recover is to clean up the old connection and make
a new one, starting from scratch.

Of course, runtime recovery is just a band-aid, and you really
should fix the underlying bug that caused the protocol error in the
first place. A protocol error is conceptually not much different
from a segmentation fault or a crash - it should never happen.


Thanks,
pq


> On Thu, Dec 27, 2018 at 6:40 AM Ikshwaku Chauhan 
> wrote:
> 
> > Hello All,
> >
> > We are facing an issue where we are not receiving any surface/layer
> > creation/distortion notifications from Layermanager.
> >
> > We debugged and found that, once we get "*display protocol error :
> > Invalid Object XX" i.e, (wl_display@1.error(wl_display@1, 0, "invalid
> > object XX"))* on wayland client side, there is No further communication
> > between Wayland Protocol and Client to and from both.
> >
> > Is this an expected behavior or any recovery is possible?
> >
> > We are using wayland/weston/wayland-ivi-extension 1.11.0 with drm-backend
> > on TI's Soc.
> >
> > Thanks you in advance.
> >
> >
> > Regards,
> >
> > Ikshwaku


pgp5HzvO6M8TS.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel