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

When confined (in mir-test-tools) GLMark2Xwayland.* "succeeds" without displaying anything #1722

Closed
AlanGriffiths opened this issue Jul 27, 2020 · 9 comments · Fixed by #1723
Assignees

Comments

@AlanGriffiths
Copy link
Contributor

[Mir 2.0] We just get the black mir_demo_server window while each of the tests run...

$ mir-test-tools.performance-test --gtest_filter=GLMark2Xwayland.* --logging on
/snap/mir-test-tools/3467/bin/desktop-launch: line 51: /home/alan/.config/user-dirs.dirs: Permission denied
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.applications.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.keyboard.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.magnifier.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.mouse.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.app-folders.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.background.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.calendar.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.datetime.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.default-applications.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.enums.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.input-sources.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.lockdown.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.media-handling.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.notifications.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.peripherals.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.privacy.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.screensaver.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.search-providers.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.session.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.sound.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.thumbnail-cache.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.thumbnailers.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.sudoku.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.system.locale.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.system.location.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gnome.system.proxy.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gtk.Settings.ColorChooser.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gtk.Settings.EmojiChooser.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml': File exists
ln: failed to create symbolic link '/home/alan/snap/mir-test-tools/3467/.local/share/glib-2.0/schemas/10_gsettings-desktop-schemas.gschema.override': File exists
Running main() from main.cpp
Note: Google Test filter = GLMark2Xwayland.*
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from GLMark2Xwayland
[ RUN      ] GLMark2Xwayland.fullscreen
[2020-07-27 08:54:30.145918] <information> mircommon: Loading modules from: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform
[2020-07-27 08:54:30.145968] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.17
[2020-07-27 08:54:30.146180] < -warning- > mircommon: Failed to load module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.17 (error was:libnvidia-egl-wayland.so.1: cannot open shared object file: No such file or directory)
[2020-07-27 08:54:30.146200] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-gbm-kms.so.17
[2020-07-27 08:54:30.146210] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-wayland.so.17
[2020-07-27 08:54:30.146219] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/server-x11.so.17
[2020-07-27 08:54:30.146227] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.16
[2020-07-27 08:54:30.146419] < -warning- > mircommon: Failed to load module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.16 (error was:libnvidia-egl-wayland.so.1: cannot open shared object file: No such file or directory)
[2020-07-27 08:54:30.146437] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/input-evdev.so.7
[2020-07-27 08:54:30.147371] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-dummy.so
[2020-07-27 08:54:30.147390] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/input-stub.so
[2020-07-27 08:54:30.147625] < - debug - > mirserver: Not trying logind: "DISPLAY" is set and X need not have claimed the VT
[2020-07-27 08:54:30.147704] < - debug - > mirserver: Not using Linux VT subsystem for session management: Failed to find the current VT
[2020-07-27 08:54:30.147756] < - debug - > mirserver: No session management supported
[2020-07-27 08:54:30.153377] <information> gbm-kms: EGL platform does not support EGL_KHR_platform_gbm extension
[2020-07-27 08:54:30.153646] <information> gbm-kms: Failed to acquire DRM master: Operation not permitted
[2020-07-27 08:54:30.153802] <information> mirserver: Found graphics driver: mir:gbm-kms (version 2.0.0) Support priority: 0
[2020-07-27 08:54:30.153819] <information> mirserver: Found graphics driver: mir:wayland (version 2.0.0) Support priority: 0
[2020-07-27 08:54:30.154563] <information> mirserver: Found graphics driver: mir:x11 (version 2.0.0) Support priority: 192
[2020-07-27 08:54:30.154637] <information> mirserver: Found graphics driver: mir:stub-graphics (version 2.0.0) Support priority: 1
[2020-07-27 08:54:30.154792] <information> mirserver: Selected driver: mir:x11 (version 2.0.0)
[2020-07-27 08:54:30.155389] <information> mirserver: Starting
[2020-07-27 08:54:30.155490] <information> VT switch key handler: No VT switching support available: MinimalConsoleServices does not support VT switching
[2020-07-27 08:54:31.467338] <information> display: Screen resolution = 1920x1080
[2020-07-27 08:54:31.467375] <information> display:  ... is smaller than the requested size (1280x1024) plus border (150). Clipping to (1280x930).
[2020-07-27 08:54:31.467401] <information> display: 1 visual(s) found
[2020-07-27 08:54:31.467415] <information> display: Using the first one :
[2020-07-27 08:54:31.467425] <information> display: ID		:	36
[2020-07-27 08:54:31.467435] <information> display: screen	:	0
[2020-07-27 08:54:31.467446] <information> display: depth		:	24
[2020-07-27 08:54:31.467457] <information> display: red_mask	:	0xFF0000
[2020-07-27 08:54:31.467468] <information> display: green_mask	:	0xFF00
[2020-07-27 08:54:31.467478] <information> display: blue_mask	:	0xFF
[2020-07-27 08:54:31.467488] <information> display: colormap_size	:	256
[2020-07-27 08:54:31.467498] <information> display: bits_per_rgb	:	8
[2020-07-27 08:54:31.504564] <information> mirserver: Using software cursor
[2020-07-27 08:54:31.506076] <information> mirserver: Selected input driver: mir:x11-input (version: 2.0.0)
[2020-07-27 08:54:31.507254] <information> mirserver: Mir version 2.0.0
[2020-07-27 08:54:31.515476] <information> GLRenderer: EGL vendor: Mesa Project
[2020-07-27 08:54:31.515500] <information> GLRenderer: EGL version: 1.4
[2020-07-27 08:54:31.515528] <information> GLRenderer: EGL client APIs: OpenGL OpenGL_ES 
[2020-07-27 08:54:31.515539] <information> GLRenderer: EGL extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_CHROMIUM_sync_control EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_NOK_texture_from_pixmap EGL_WL_bind_wayland_display 
[2020-07-27 08:54:31.515553] <information> GLRenderer: GL vendor: Intel Open Source Technology Center
[2020-07-27 08:54:31.515562] <information> GLRenderer: GL renderer: Mesa DRI Intel(R) UHD Graphics 630 (CFL GT2)
[2020-07-27 08:54:31.515570] <information> GLRenderer: GL version: OpenGL ES 3.2 Mesa 20.0.8
[2020-07-27 08:54:31.515578] <information> GLRenderer: GLSL version: OpenGL ES GLSL ES 3.20
[2020-07-27 08:54:31.515746] <information> GLRenderer: GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_render_snorm GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_EXT_texture_view GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_NV_fragment_shader_interlock GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_clip_control GL_EXT_texture_compression_bptc GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_sRGB_R8 GL_EXT_texture_shadow_lod GL_MESA_framebuffer_flip_y GL_NV_compute_shader_derivatives GL_EXT_demote_to_helper_invocation GL_EXT_depth_clamp GL_EXT_texture_query_lod 
[2020-07-27 08:54:31.515773] <information> GLRenderer: GL max texture size = 16384
[2020-07-27 08:54:31.517668] <information> GLRenderer: GL framebuffer bits: RGBA=8888, depth=0, stencil=0
[2020-07-27 08:54:31.523459] < -warning- > xwayland: Failed to bind socket @/tmp/.X11-unix/X5
[2020-07-27 08:54:31.523714] <information> xwayland: XWayland started on X11 display :5
[2020-07-27 08:54:31.523785] <information> mirserver: Initial display configuration:
[2020-07-27 08:54:31.523801] <information> mirserver: * Output 1: unknown connected, used
[2020-07-27 08:54:31.523815] <information> mirserver: . |_ Physical size 16.5" 338x246mm
[2020-07-27 08:54:31.523824] <information> mirserver: . |_ Power is on
[2020-07-27 08:54:31.523834] <information> mirserver: . |_ Current mode 1280x930 60.00Hz
[2020-07-27 08:54:31.523842] <information> mirserver: . |_ Preferred mode 1280x930 60.00Hz
[2020-07-27 08:54:31.523871] <information> mirserver: . |_ Orientation normal
[2020-07-27 08:54:31.523882] <information> mirserver: . |_ Logical size 1280x930
[2020-07-27 08:54:31.523891] <information> mirserver: . |_ Logical position +0+0
[2020-07-27 08:54:31.523901] <information> mirserver: . |_ Scaling factor: 1.00
Saving GLMark2 detailed results to: /tmp/GLMark2Xwayland_fullscreen.log
[2020-07-27 08:54:31.533528] <information> xwayland: Starting XWayland
glamor: EGL version 1.4:
[2020-07-27 08:54:31.635906] < -warning- > xwayland: Failed to load any default cursor
[2020-07-27 08:54:31.636681] < - ERROR - > xwayland: No default cursor loaded
[2020-07-27 08:54:31.636813] <information> xwayland: XWayland is running
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[2020-07-27 08:54:41.688530] <information> mirserver: Stopping
[2020-07-27 08:54:41.689209] <information> xwayland: Deiniting xwayland server
[2020-07-27 08:54:41.789379] <information> xwayland: Xwayland didn't close, killing it
[2020-07-27 08:54:41.789470] <information> xwayland: XWayland stopped
[       OK ] GLMark2Xwayland.fullscreen (11669 ms)
[ RUN      ] GLMark2Xwayland.windowed
[2020-07-27 08:54:41.819629] <information> mircommon: Loading modules from: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform
[2020-07-27 08:54:41.819726] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.17
[2020-07-27 08:54:41.819932] < -warning- > mircommon: Failed to load module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.17 (error was:libnvidia-egl-wayland.so.1: cannot open shared object file: No such file or directory)
[2020-07-27 08:54:41.819970] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-gbm-kms.so.17
[2020-07-27 08:54:41.819991] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-wayland.so.17
[2020-07-27 08:54:41.820008] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/server-x11.so.17
[2020-07-27 08:54:41.820025] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.16
[2020-07-27 08:54:41.820301] < -warning- > mircommon: Failed to load module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-eglstream-kms.so.16 (error was:libnvidia-egl-wayland.so.1: cannot open shared object file: No such file or directory)
[2020-07-27 08:54:41.820335] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/input-evdev.so.7
[2020-07-27 08:54:41.821663] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-dummy.so
[2020-07-27 08:54:41.821688] <information> mircommon: Loading module: /snap/mir-test-tools/3467/usr/lib/x86_64-linux-gnu/mir/server-platform/input-stub.so
[2020-07-27 08:54:41.821907] < - debug - > mirserver: Not trying logind: "DISPLAY" is set and X need not have claimed the VT
[2020-07-27 08:54:41.821966] < - debug - > mirserver: Not using Linux VT subsystem for session management: Failed to find the current VT
[2020-07-27 08:54:41.821987] < - debug - > mirserver: No session management supported
[2020-07-27 08:54:41.822690] <information> gbm-kms: EGL platform does not support EGL_KHR_platform_gbm extension
[2020-07-27 08:54:41.822869] <information> gbm-kms: Failed to acquire DRM master: Operation not permitted
[2020-07-27 08:54:41.823003] <information> mirserver: Found graphics driver: mir:gbm-kms (version 2.0.0) Support priority: 0
[2020-07-27 08:54:41.823025] <information> mirserver: Found graphics driver: mir:wayland (version 2.0.0) Support priority: 0
[2020-07-27 08:54:41.823507] <information> mirserver: Found graphics driver: mir:x11 (version 2.0.0) Support priority: 192
[2020-07-27 08:54:41.823568] <information> mirserver: Found graphics driver: mir:stub-graphics (version 2.0.0) Support priority: 1
[2020-07-27 08:54:41.823712] <information> mirserver: Selected driver: mir:x11 (version 2.0.0)
[2020-07-27 08:54:41.824267] <information> mirserver: Starting
[2020-07-27 08:54:41.824402] <information> VT switch key handler: No VT switching support available: MinimalConsoleServices does not support VT switching
[2020-07-27 08:54:41.835644] <information> display: Screen resolution = 1920x1080
[2020-07-27 08:54:41.835697] <information> display:  ... is smaller than the requested size (1280x1024) plus border (150). Clipping to (1280x930).
[2020-07-27 08:54:41.835746] <information> display: 1 visual(s) found
[2020-07-27 08:54:41.835763] <information> display: Using the first one :
[2020-07-27 08:54:41.835777] <information> display: ID		:	36
[2020-07-27 08:54:41.835792] <information> display: screen	:	0
[2020-07-27 08:54:41.835806] <information> display: depth		:	24
[2020-07-27 08:54:41.835836] <information> display: red_mask	:	0xFF0000
[2020-07-27 08:54:41.835872] <information> display: green_mask	:	0xFF00
[2020-07-27 08:54:41.835888] <information> display: blue_mask	:	0xFF
[2020-07-27 08:54:41.835900] <information> display: colormap_size	:	256
[2020-07-27 08:54:41.835928] <information> display: bits_per_rgb	:	8
[2020-07-27 08:54:41.880658] <information> mirserver: Using software cursor
[2020-07-27 08:54:41.881927] <information> mirserver: Selected input driver: mir:x11-input (version: 2.0.0)
[2020-07-27 08:54:41.882455] <information> mirserver: Mir version 2.0.0
[2020-07-27 08:54:41.889702] <information> GLRenderer: EGL vendor: Mesa Project
[2020-07-27 08:54:41.889726] <information> GLRenderer: EGL version: 1.4
[2020-07-27 08:54:41.889734] <information> GLRenderer: EGL client APIs: OpenGL OpenGL_ES 
[2020-07-27 08:54:41.889741] <information> GLRenderer: EGL extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_CHROMIUM_sync_control EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_NOK_texture_from_pixmap EGL_WL_bind_wayland_display 
[2020-07-27 08:54:41.889750] <information> GLRenderer: GL vendor: Intel Open Source Technology Center
[2020-07-27 08:54:41.889759] <information> GLRenderer: GL renderer: Mesa DRI Intel(R) UHD Graphics 630 (CFL GT2)
[2020-07-27 08:54:41.889791] <information> GLRenderer: GL version: OpenGL ES 3.2 Mesa 20.0.8
[2020-07-27 08:54:41.889798] <information> GLRenderer: GLSL version: OpenGL ES GLSL ES 3.20
[2020-07-27 08:54:41.889946] <information> GLRenderer: GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_render_snorm GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_EXT_texture_view GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_NV_fragment_shader_interlock GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_clip_control GL_EXT_texture_compression_bptc GL_KHR_parallel_shader_compile GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_sRGB_R8 GL_EXT_texture_shadow_lod GL_MESA_framebuffer_flip_y GL_NV_compute_shader_derivatives GL_EXT_demote_to_helper_invocation GL_EXT_depth_clamp GL_EXT_texture_query_lod 
[2020-07-27 08:54:41.889971] <information> GLRenderer: GL max texture size = 16384
[2020-07-27 08:54:41.891651] <information> GLRenderer: GL framebuffer bits: RGBA=8888, depth=0, stencil=0
[2020-07-27 08:54:41.897589] < -warning- > xwayland: Failed to bind socket @/tmp/.X11-unix/X5
[2020-07-27 08:54:41.897852] <information> xwayland: XWayland started on X11 display :5
[2020-07-27 08:54:41.897953] <information> mirserver: Initial display configuration:
[2020-07-27 08:54:41.897966] <information> mirserver: * Output 1: unknown connected, used
[2020-07-27 08:54:41.898000] <information> mirserver: . |_ Physical size 16.5" 338x246mm
[2020-07-27 08:54:41.898035] <information> mirserver: . |_ Power is on
[2020-07-27 08:54:41.898045] <information> mirserver: . |_ Current mode 1280x930 60.00Hz
[2020-07-27 08:54:41.898055] <information> mirserver: . |_ Preferred mode 1280x930 60.00Hz
[2020-07-27 08:54:41.898064] <information> mirserver: . |_ Orientation normal
[2020-07-27 08:54:41.898093] <information> mirserver: . |_ Logical size 1280x930
[2020-07-27 08:54:41.898120] <information> mirserver: . |_ Logical position +0+0
[2020-07-27 08:54:41.898152] <information> mirserver: . |_ Scaling factor: 1.00
Saving GLMark2 detailed results to: /tmp/GLMark2Xwayland_windowed.log
[2020-07-27 08:54:41.908356] <information> xwayland: Starting XWayland
glamor: EGL version 1.4:
[2020-07-27 08:54:42.010281] < -warning- > xwayland: Failed to load any default cursor
[2020-07-27 08:54:42.010574] < - ERROR - > xwayland: No default cursor loaded
[2020-07-27 08:54:42.010712] <information> xwayland: XWayland is running
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
[2020-07-27 08:54:53.330425] <information> mirserver: Stopping
[2020-07-27 08:54:53.331094] <information> xwayland: Deiniting xwayland server
[2020-07-27 08:54:53.431304] <information> xwayland: Xwayland didn't close, killing it
[2020-07-27 08:54:53.431400] <information> xwayland: XWayland stopped
[       OK ] GLMark2Xwayland.windowed (11640 ms)
[----------] 2 tests from GLMark2Xwayland (23309 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (23309 ms total)
[  PASSED  ] 2 tests.

The non-snap version [mir_performance_tests --gtest_filter=GLMark2Xwayland.* --logging on] works fine.

@AlanGriffiths AlanGriffiths self-assigned this Sep 9, 2020
@AlanGriffiths
Copy link
Contributor Author

I don't yet know the reasons, but nothing appears because Xwayland doesn't draw any surfaces.

The odd thing is that occasionally things do get drawn.

@AlanGriffiths
Copy link
Contributor Author

AlanGriffiths commented Sep 9, 2020

OK, so Mir creates the endpoint in the spoof /tmp and glmark2 connects:

$ grep "X5" mir-test-tools.performance-test.strace
[pid 111233] openat(AT_FDCWD, "/tmp/.X5-lock", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0444) = 28
[pid 111233] access("/tmp/.X11-unix/X5", F_OK) = -1 ENOENT (No such file or directory)
[pid 111233] bind(28, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X5"}, 20) = -1 EACCES (Permission denied)
[pid 111233] unlink("/tmp/.X11-unix/X5") = -1 ENOENT (No such file or directory)
[pid 111233] bind(28, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X5"}, 20) = 0
[pid 111247] connect(3, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X5"}, 20) = -1 ECONNREFUSED (Connection refused)
[pid 111247] connect(3, {sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X5"}, 110) = 0
[pid 111247] <... getpeername resumed>{sa_family=AF_UNIX, sun_path="/tmp/.X11-unix/X5"}, [124->20]) = 0
[pid 111248] openat(AT_FDCWD, "/etc/X5.hosts", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 111233] unlink("/tmp/.X5-lock")    = 0
[pid 111233] unlink("/tmp/.X11-unix/X5") = 0

(I think that arrangement was working a few weeks ago, but I no longer have working code to compare with.)

@AlanGriffiths
Copy link
Contributor Author

AlanGriffiths commented Sep 10, 2020

The one difference I'm seeing with working runs outside confinement is:

WARNING: Kernel has no file descriptor comparison support: Operation not permitted

That's from the Xwayland process...

$ grep --before 20 "Kernel has no file descriptor" mir-test-tools.performance-test.strace.111248
[pid 111248] poll([{fd=34, events=POLLOUT}], 1, 5 <unfinished ...>
[pid 111248] <... poll resumed>)        = 1 ([{fd=34, revents=POLLOUT}])
[pid 111248] epoll_wait(3,  <unfinished ...>
[pid 111248] <... epoll_wait resumed>[{EPOLLIN, {u32=1927004880, u64=94809035096784}}], 256, 599749) = 1
[pid 111248] setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=5000}, it_value={tv_sec=0, tv_usec=5000}},  <unfinished ...>
[pid 111248] <... setitimer resumed>NULL) = 0
[pid 111248] recvmsg(7,  <unfinished ...>
[pid 111248] <... recvmsg resumed>{msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\224\7\20\0\5\0@\0\2\0@\0\1\0\0\0 \3X\2\0\16\0\0\0\0\0\0\0\0\0\0"..., iov_len=16384}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[9, 10]}], msg_controllen=24, msg_flags=0}, 0) = 80
[pid 111248] ioctl(5, DRM_IOCTL_PRIME_FD_TO_HANDLE <unfinished ...>
[pid 111248] <... ioctl resumed>, 0x7ffdbfb564ac) = 0
[pid 111248] lseek(9, 0, SEEK_END <unfinished ...>
[pid 111248] <... lseek resumed>)       = 2621440
[pid 111248] ioctl(5, DRM_IOCTL_I915_GEM_SET_TILING <unfinished ...>
[pid 111248] <... ioctl resumed>, 0x7ffdbfb56470) = 0
[pid 111248] getpid( <unfinished ...>
[pid 111248] <... getpid resumed>)      = 111248
[pid 111248] kcmp(111248, 111248, KCMP_FILE, 4, 5 <unfinished ...>
[pid 111248] <... kcmp resumed>)        = -1 EPERM (Operation not permitted)
[pid 111248] write(2, "WARNING: ", 9WARNING:  <unfinished ...>
[pid 111248] <... write resumed>)       = 9
[pid 111248] write(2, "Kernel has no file descriptor co"..., 74Kernel has no file descriptor comparison support: Operation not permitted

However, this is probably unrelated: running --devmode prevents this message, but doesn't get anything on the display.

@AlanGriffiths
Copy link
Contributor Author

AlanGriffiths commented Sep 10, 2020

Test scenario:

  1. Start two ("server" and "client") terminals running mir-test-tools.bash in both
  2. In "server" start a Mir server by running performance-env.sh mir_demo_server --enable-x11
  3. In "client" start a client by running DISPLAY=:5 glmark2-es2 -b jellyfish --fullscreen

Most of the time, nothing will be displayed on the server. But sometimes it will be.

Repeatedly running the client (without restarting the server) will either not display or display the same as the first run.

Most of the time after restarting the server nothing will be displayed, but sometimes it will be. (And repeated runs of the client are consistent.)

(Actually been testing with a local "core20" build.)

@AlanGriffiths
Copy link
Contributor Author

Note of a utility script and incantation:

$ cat ./glmark2-es2 
#!/bin/bash
DISPLAY=:5

socket=${DISPLAY/://tmp/.X11-unix/X}
while [ ! -e "${socket}" ]
do inotifywait "$(dirname $socket)" &> /dev/null
done

exec glmark2-es2 -b build
$ mir_demo_server --enable-x11 --test-client ./glmark2-es2 --test-timeout 5

Running this 10 times showed the glmark2 output twice.

@AlanGriffiths
Copy link
Contributor Author

window command
server WAYLAND_DEBUG=server MIR_X11_VERBOSE_LOG=1 performance-env.sh mir_demo_server --enable-x11 --window-management-trace
client DISPLAY=:5 xtrace -sn glmark2-es2 -b jellyfish --fullscreen

It looks very much as though the glmark2 <-> Xwayland communications are fine.

As noted above, Mir doesn't see anything being drawn by Xwayland, the relevant part of the server output:

[2020-09-10 16:27:44.623896] <information> xwayland: XWayland is running
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
^C[2020-09-10 16:28:25.603374] < - debug - > xwayland: Closing 0 XWayland surface(s)...

I.e. there is nothing there: no X11 WM message, no Wayland messages and no windows created.

@AlanGriffiths
Copy link
Contributor Author

AlanGriffiths commented Sep 10, 2020

Another data point: starting a separate Xwayland server (in a third terminal window) works reliably.

This looks increasingly like something in the X11 WM/X server setup is racy.

[edit] In support of the "racy" theory: it seems impossible to get an "strace" of a run where output occurs.

@AlanGriffiths
Copy link
Contributor Author

Tracing through the XWaylandWM everything looks fine and we can use the connection based on server->wm_fd().

BUT in the failure mode we never get into the on_readable lambda of the ReadableFd based on the same FD. (The ThreadedDispatcher thread is happily sitting in its dispatch loop.)

@AlanGriffiths
Copy link
Contributor Author

AlanGriffiths commented Sep 11, 2020

[edit] In support of the "racy" theory: it seems impossible to get an "strace" of a run where output occurs.

Not impossible, I left this running in the background: it took 193 iterations.


miral-system-compositor&
count=0
while ! grep mir::frontend::XWaylandWM::handle_events mir-test-tools.performance-test.strace
do
    snap run --strace mir-test-tools.performance-test --wayland-host wayland-0 --gtest_filter=GLMark2Xwayland.windowed &> mir-test-tools.performance-test.strace
    let count=count+1
    echo $count
done

@AlanGriffiths AlanGriffiths changed the title GLMark2Xwayland.* "succeeds" without displaying anything When confined (in mir-test-tools) GLMark2Xwayland.* "succeeds" without displaying anything Sep 21, 2020
@AlanGriffiths AlanGriffiths transferred this issue from canonical/mir-test-tools Sep 21, 2020
bors bot added a commit that referenced this issue Sep 22, 2020
1726: Create event dispatcher before running server r=AlanGriffiths a=wmww

Related to #1722 and #1723. In combination with #1725, I think this fixes the race condition (though I haven't tested in a confined snap yet). This moves socket pair creation out of the `XWaylandServer` constructor, and creates the event dispatcher before creating the window manager or spawning the server. Because `XWaylandConnector`'s mutex is locked, any events will be blocked on the window manager being created and wont be dropped.

Co-authored-by: William Wold <wm@wmww.sh>
@bors bors bot closed this as completed in ad737b8 Sep 22, 2020
bors bot added a commit that referenced this issue Sep 23, 2020
1725: Manage X11 windows that existed before window manager started r=AlanGriffiths a=wmww

Related to #1722 and #1723. It's a lot of code because XCB is messy, but all it's doing is going through the list of windows, getting their properties and setting up a `XWaylandSurface` for them the same way we do on newly created windows. This alone is not enough to fix the race condition because we don't get the `WL_SURFACE_ID` client message. See next PR for fixing that.

Co-authored-by: William Wold <wm@wmww.sh>
Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant