Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eglstream-kms] GLX clients in XWayland crash Mir #2061

Closed
RAOF opened this issue Jun 8, 2021 · 0 comments · Fixed by #2429 or #2562
Closed

[eglstream-kms] GLX clients in XWayland crash Mir #2061

RAOF opened this issue Jun 8, 2021 · 0 comments · Fixed by #2429 or #2562

Comments

@RAOF
Copy link
Contributor

RAOF commented Jun 8, 2021

Attempting to start glxgears from xterm when using the eglstream-kms platform results in Mir crashing, with

terminate called after throwing an instance of 'boost::wrapexcept<std::system_error>'
  what():  Failed to create EGLStream from Wayland buffer: EGL_BAD_ACCESS (0x3002)

The proximate cause is that the mge::BufferAllocator has an implementation of a Wayland interface not built using the wrapper-generator, and so exceptions bubble up into the C code of the Wayland main loop.

It's not entirely clear what the underlying cause is here, though. The relevant EGL extension doesn't list EGL_BAD_ACCESS as an error the call can generate (at least, not in the way we're calling it), and it's not clear how to gracefully handle a failure, as the relevant protocol has no support for failure events.

@bors bors bot closed this as completed in 23b7b57 May 16, 2022
Saviq pushed a commit that referenced this issue May 16, 2022
2429: eglstream-kms: Kill clients, not Mir, when they submit bad EGLStreams r=AlanGriffiths a=RAOF

This seems to particularly affect XWayland when clients try to use GLX.
It's not great to kill XWayland, but it's better than killing Mir.

We should probably additionally move this code to the mirwayland wrapper
generator, but this particular fix is simple.

Fixes: #2061

2430: eglstream-kms: Handle EGL errors in `devnum_for_device` r=AlanGriffiths a=RAOF

It seems that Mesa is now exposing rendernodes as EGLDevices, but using the EGL query to find the device node of such devices fails.

Handle those exceptions by assuming the device is unsuitable.

Fixes: #2426 

Co-authored-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
bors bot added a commit that referenced this issue Aug 30, 2022
2562: Release 2.9.0 r=AlanGriffiths a=AlanGriffiths

## ABI summary:
* miral ABI bumped to 5
* mircommon ABI unchanged at 9
* mircookie ABI unchanged at 2
* mircore ABI bumped to 2
* miroil ABI bumped to 2
* mirplatform ABI unchanged at 23
* mirserver ABI unchanged at 58
* mirwayland ABI unchanged at 3
* mirplatformgraphics ABI unchanged at 20
* mirinputplatform ABI unchanged at 8
## Enhancements:
* [Wayland] Implement zwp_idle_inhibit_manager_v1
* [Wayland] Implement zwlr_virtual_pointer_v1
* [Wayland] Implement zwp_text_input_manager_v1 (Electron works with OSK)
* [Wayland] Bump wl_seat to v8 and implement hi-res scrolling (Fixes: #2176, Fixes: #2499)
* [Wayland platform] improve failed to connect error
* [Wayland platform] Port to xdg-shell (Fixes #1903, Fixes: #2434)
* [MirAL] Allow `--add-wayland-extenions all`
* [MirAL] Allow servers to get repeated string options
* [MirAL] Improvement to ExternalClientLauncher: Don't force clients to split command lines themselves
* [MirAL] Tidy up event filtering API
* [MirAL] Expose miral::Zone::id()
* [Input] Filter 2 distinct bogus touch event scenarios (UBports)
* [gbm-kms] new driver quirk to disable KMS modeset probe
* [gbm-kms] Add defaults to driver-quirks for nvidia and evdi (Fixes: #2467)
* [gbm-kms] Add defaults to driver-quirks for vc4-drm and v3d
* [mir-smoke-test-runner] Enable working in a Wayland only environment
## Bugs fixed:
* Fix ABI breakage of libmircore.so.1 with v2.8.0 vs v1.8.2 (Fixes #2465)
* [Wayland] Text Input v2: do not use commit count as serial
* [Wayland] Send keyboard modifiers after keyboard enter (Fixes: #2535, Fixes: #2025)
* [Wayland] wlr-screencopy-v1: send .damage event as required (wayvnc fix)
* [Wayland] wlr-screencopy-v1: Waits until the copy area has been damaged in `.copy_with_damage` request (wayvnc fix)
* [MirAL] Unblock signals before execing child processes (Fixes: #1284)
* [eglstream-kms] Kill clients, not Mir, when they submit bad EGLStreams (Fixes: #2061)
* [eglstream-kms] Handle EGL errors in devnum_for_device (Fixes: #2426)
* [test clients] Explicitly ask for a GLESv2 context (Fixes: #2440)
* [renderers/gl] Clear framebuffer to opaque black (Fixes: #2427)
* CMake cleanup for locally built dependencies (Fixes: #2507, Fixes: #2261)
* Fix event timestamps (Fixes: #2577)

Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant