1. We render stuff using OpenGL 2. eglSwapBuffers - This will call wl_surface_attach, i.e. send the buffer to server 3. Window resize happens 4. Mesa code does GEM close on all buffers 5. Server receives the buffer and tries to open it by name, but by that moment the buffer is no more and open fails Workaround: 1. Do not always close GEM on window resize, close it only if buffer is not locked 2. In platform_wayland.c:wl_buffer_release if buffer's dimensions don't match widow's dimensions then the buffer and the GEM must be destroyed
I would assume this is no longer a problem after we started using file descriptors instead of flink names in wl_drm? Is it even worth fixing the flink path, considering it's insecure to begin with?
Yes, really everything should be using dmabuf/create_prime_buffer, which is immune to this race. We could fix this for older flink systems, but on the other hand, they probably wouldn't even get the update, as they're running ancient Mesa anyway. The fix you have proposed seems correct to me, but again I'd be looking more towards just deleting flink. What system/version are you running on, that you are using create_buffer rather than create_prime_buffer?
I guess this is no longer an issue since it was reported years ago. Frankly speaking, I don't even remember in what scenario and under which circumstances did I face this...
Oh wow, so it was. :\ Thanks for the report anyway.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.