[PATCH weston] RDP compositor: make the seat dynamic and don't destroy it on removal

Pekka Paalanen ppaalanen at gmail.com
Tue Sep 29 02:29:15 PDT 2015


On Fri, 25 Sep 2015 16:07:12 -0500
Derek Foreman <derekf at osg.samsung.com> wrote:

> On 25/09/15 02:46 PM, Hardening wrote:
> > Le 25/09/2015 19:15, Derek Foreman a écrit :
> >> On 25/09/15 08:19 AM, Hardening wrote:
> >>> Le 25/09/2015 11:31, Pekka Paalanen a écrit :
> >>>> On Thu, 24 Sep 2015 23:40:26 +0200
> >>>> David FORT <rdp.effort at gmail.com> wrote:
> >>>>
> >>>>> This patch makes the seat dynamic and leak it on purpose during seat removal to
> >>>>> prevent the ghost object case.
> >>>>> ---
> > 
> > [...]
> > 
> >>>
> >>> Hello Pekka,
> >>> you're right I've not elaborated much.
> >>>
> >>> So the general problem was that wl_seat doesn't have a release request,
> >>> so we can't track the usage of a wl_seat by wayland clients. And as we
> >>> can't track the usage, we can't release it safely or we take the risk
> >>> that clients could address a released object. In the current situation
> >>> we can't safely release a seat object.
> >>
> >> Should we move forward with your patch to add seat release protocol first?

Yeah, that's a very good idea.

> >> Does that change this implementation at all?
> > 
> > Yeah this could be an idea. Once the "release seat patch" is passed, the
> > goal would be to not leak the seat at all, so the present patch would be
> > useless.
> 
> It looked like it needed only trivial changes to land (some version
> bumps...)
> 
> I don't know how to handle old clients (or buggy new ones) that don't
> bother sending the seat release request though...

And unfortunately this problem still won't go away. If you want to keep
everything working, you're going to have to implement both leaking and
non-leaking code paths.

But this holds true for all of Weston. All the wl_seat protocol stuff
is core stuff, so I can't see why everyone would not have this problem
already. It's just that RDP actually does also destroy seats often which
exposes the problem.

So, it might be useful to split the weston_seat_release() function in
Weston core into two: one that leaks, and one that doesn't. Who knows,
maybe we could hide all the leaking nastyness into the core?

I suspect it's getting hairy, so I'd probably prefer a solution in the
core to automatically leak things as necessary. (Up to client
disconnect, they won't be leaked forever.) Then we get to the topic of
inert objects...

Anyone brought a lawnmower for this yak? :-P


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150929/b1bf5b19/attachment-0001.sig>


More information about the wayland-devel mailing list