CuarzoSoftware / SRM

Simple Rendering Manager
MIT License
46 stars 5 forks source link

Crash in SRM call into gdm during initialize #14

Closed RogerDavenport closed 2 weeks ago

RogerDavenport commented 2 weeks ago

SRM_DEBUG=4 gdb -batch -ex "run" -ex "bt full" --args louvre-weston-clone

[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after fork from child process 22159] [Detaching after fork from child process 22160] LGraphicBackendDRM: backendInitialize SRM debug: [core] SRM version 0.6.2-1. [New Thread 0x7ffff4fa9640 (LWP 22161)] SRM debug: [core] Deallocator thread started. SRM debug: [/dev/dri/card0] Is boot VGA: YES. LGraphicBackendDRM: openRestricted /dev/dri/card0 libseat=YES SRM debug: [/dev/dri/card0] Is master: NO. SRM debug: [/dev/dri/card0] DRM Driver: i915. [New Thread 0x7fffeb297640 (LWP 22162)] [New Thread 0x7fffeaa96640 (LWP 22163)] [New Thread 0x7fffea295640 (LWP 22164)] [New Thread 0x7fffe9a94640 (LWP 22165)] [New Thread 0x7fffe9293640 (LWP 22166)] [New Thread 0x7fffe8a92640 (LWP 22167)] [New Thread 0x7fffd3fff640 (LWP 22168)] SRM debug: [/dev/dri/card0] EGL version: 1.5. SRM debug: [/dev/dri/card0] EGL vendor: Mesa Project. SRM debug: [/dev/dri/card0] EGL Extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync 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_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control 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_WL_bind_wayland_display . SRM debug: [/dev/dri/card0] EGL Device Extensions: EGL_EXT_device_drm EGL_EXT_device_drm_render_node. SRM debug: [/dev/dri/card0] EGL driver name: Unknown. [New Thread 0x7fffd37fe640 (LWP 22169)] [New Thread 0x7fffd2ffd640 (LWP 22170)] SRM debug: [/dev/dri/card0] Using medium priority EGL context. SRM debug: [/dev/dri/card0] OpenGL 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_draw_instanced GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor 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_NV_pack_subimage 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_pack_reverse_row_order 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_instanced_arrays GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_NV_generate_mipmap_sRGB GL_NV_pixel_buffer_object GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_debug_label GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_group_vote 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_NV_shader_noperspective_interpolation 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_EXT_texture_sRGB_R8 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_clear_texture 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_color_buffer_half_float GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_semaphore GL_EXT_semaphore_fd GL_EXT_texture_compression_bptc GL_EXT_texture_mirror_clamp_to_edge GL_KHR_parallel_shader_compile GL_NV_alpha_to_coverage_dither_control GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_shadow_lod GL_INTEL_blackhole_render 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 GL_MESA_bgra . [New Thread 0x7fffd27fc640 (LWP 22171)] [New Thread 0x7fffd1ffb640 (LWP 22172)] SRM debug: [/dev/dri/card0] Testing PRIME map CPU buffer allocation mode. SRM debug: [/dev/dri/card0] GL Texture (1) destroyed. SRM debug: [/dev/dri/card0] CPU buffer allocation test succeded 13x17. SRM debug: [core] Supported shared DMA formats: Format AB4H [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format XB4H [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format AB48 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format XB48 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format AR30 [LINEAR, X_TILED, Y_TILED, INVALID] Format XR30 [LINEAR, X_TILED, Y_TILED, INVALID] Format AB30 [LINEAR, X_TILED, Y_TILED, INVALID] Format AR24 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format AB24 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format XR24 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format XB24 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format AR15 [LINEAR, X_TILED, Y_TILED, INVALID] Format RG16 [LINEAR, X_TILED, Y_TILED, INVALID] Format R8 [LINEAR, X_TILED, Y_TILED, INVALID] Format R16 [LINEAR, X_TILED, Y_TILED, INVALID] Format GR88 [LINEAR, X_TILED, Y_TILED, INVALID] Format GR32 [LINEAR, X_TILED, Y_TILED, Y_TILED_CCS, INVALID] Format YUV9 [LINEAR, X_TILED, Y_TILED, INVALID] Format YU11 [LINEAR, X_TILED, Y_TILED, INVALID] Format YU12 [LINEAR, X_TILED, Y_TILED, INVALID] Format YU16 [LINEAR, X_TILED, Y_TILED, INVALID] Format YU24 [LINEAR, X_TILED, Y_TILED, INVALID] Format YVU9 [LINEAR, X_TILED, Y_TILED, INVALID] Format YV11 [LINEAR, X_TILED, Y_TILED, INVALID] Format YV12 [LINEAR, X_TILED, Y_TILED, INVALID] Format YV16 [LINEAR, X_TILED, Y_TILED, INVALID] Format YV24 [LINEAR, X_TILED, Y_TILED, INVALID] Format NV12 [LINEAR, X_TILED, Y_TILED, INVALID] Format NV21 [LINEAR, X_TILED, Y_TILED, INVALID] Format P010 [LINEAR, X_TILED, Y_TILED, INVALID] Format P012 [LINEAR, X_TILED, Y_TILED, INVALID] Format P016 [LINEAR, X_TILED, Y_TILED, INVALID] Format P030 [LINEAR, X_TILED, Y_TILED, INVALID] Format NV16 [LINEAR, X_TILED, Y_TILED, INVALID] Format AYUV [LINEAR, X_TILED, Y_TILED, INVALID] Format XYUV [LINEAR, X_TILED, Y_TILED, INVALID] Format Y410 [LINEAR, X_TILED, Y_TILED, INVALID] Format Y412 [LINEAR, X_TILED, Y_TILED, INVALID] Format Y416 [LINEAR, X_TILED, Y_TILED, INVALID] Format YUYV [LINEAR, X_TILED, Y_TILED, INVALID] Format YVYU [LINEAR, X_TILED, Y_TILED, INVALID] Format UYVY [LINEAR, X_TILED, Y_TILED, INVALID] Format VYUY [LINEAR, X_TILED, Y_TILED, INVALID] Format Y210 [LINEAR, X_TILED, Y_TILED, INVALID] Format Y212 [LINEAR, X_TILED, Y_TILED, INVALID] Format Y216 [LINEAR, X_TILED, Y_TILED, INVALID] LGraphicBackendDRM: initConnector SRM debug: [/dev/dri/card0] Connector (95) gamma size = 1024. [New Thread 0x7fffd1118640 (LWP 22173)] SRM debug: Connector 95 device /dev/dri/card0 render mode = ITSELF. [New Thread 0x7fffd0917640 (LWP 22174)] [New Thread 0x7fffaffff640 (LWP 22175)] SRM debug: [eDP-1] Using high priority EGL context. Unsupported modifier, resource creation failed. Unsupported modifier, resource creation failed. Unsupported modifier, resource creation failed.

Thread 14 "louvre-weston-c" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd1118640 (LWP 22173)] 0x00007ffff50fe114 in gbm_bo_get_handle_for_plane () from /lib/x86_64-linux-gnu/libgbm.so.1

0 0x00007ffff50fe114 in gbm_bo_get_handle_for_plane () at /lib/x86_64-linux-gnu/libgbm.so.1

1 0x00007ffff502a81f in createDRMFramebuffers (connector=connector@entry=0x555555d81c80) at ../lib/private/modes/SRMRenderModeItself.c:305

    boHandles = {0, 0, 0, 0}
    pitches = {0, 0, 2, 0}
    offsets = {4294959328, 32767, 4150719571, 32767}
    mods = {140736213453184, 0, 140736213453184, 140736213453184}
    i = 0
    data = 0x7fffb4000c10
    ret = <optimized out>

2 0x00007ffff502aa04 in initialize (connector=0x555555d81c80) at ../lib/private/modes/SRMRenderModeItself.c:516

3 0x00007ffff502435a in srmConnectorRenderThread (conn=0x555555d81c80) at ../lib/private/SRMConnectorPrivate.c:468

    connector = 0x555555d81c80
    renderMode = SRM_RENDER_MODE_ITSELF

4 0x00007ffff765eac3 in start_thread (arg=) at ./nptl/pthread_create.c:442

    ret = <optimized out>
    pd = <optimized out>
    unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737488347008, -4738192919874106298, 140736700974656, 2, 140737344038864, 140737488347360, 4738117238121434182, 4738174314507930694}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
    not_first_call = <optimized out>

5 0x00007ffff76f0850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

ehopperdietzel commented 2 weeks ago

Unsupported modifier, resource creation failed.

Hi, thanks for reporting this. I made some changes yesterday and forgot to add a check for modifier support. Could you please let me know if it is now fixed?

RogerDavenport commented 2 weeks ago

Yes it is no longer crashing. Still getting an issue but I might just need to reboot or something.

Louvre debug: [LLauncher::startDaemon] LLauncher daemon started successfully with PID: 33825. Louvre debug: [louvre-views] startDaemon finished

Louvre debug: [LCompositorPrivate::loadGraphicBackend] Graphic backend loaded successfully (/usr/local/lib/x86_64-linux-gnu/Louvre/backends/graphic/drm.so). Louvre debug: [LSeatPrivate::initLibseat] Using libseat. LGraphicBackendDRM: backendInitialize LGraphicBackendDRM: openRestricted /dev/dri/card0 libseat=YES LGraphicBackendDRM: initConnector Louvre debug: [LCompositorPrivate::initGraphicBackend] Graphic backend initialized successfully. Louvre debug: [LCompositorPrivate::initDMAFeedback] DMA Feedback formats table created successfully. Louvre debug: [LCompositorPrivate::loadInputBackend] Input backend loaded successfully (/usr/local/lib/x86_64-linux-gnu/Louvre/backends/input/libinput.so). Louvre debug: [LCompositorPrivate::initInputBackend] Input backend initialized successfully. Louvre debug: [LGlobal] wl_compositor created. Louvre debug: [LGlobal] wl_seat created. Louvre debug: [LGlobal] zwp_relative_pointer_manager_v1 created. Louvre debug: [LGlobal] zwp_pointer_constraints_v1 created. Louvre debug: [LGlobal] zwp_pointer_gestures_v1 created. Louvre debug: [LGlobal] wl_data_device_manager created. Louvre debug: [LGlobal] wl_subcompositor created. Louvre debug: [LGlobal] xdg_wm_base created. Louvre debug: [LGlobal] zwlr_foreign_toplevel_manager_v1 created. Louvre debug: [LGlobal] zxdg_output_manager_v1 created. Louvre debug: [LGlobal] zxdg_decoration_manager_v1 created. Louvre debug: [LGlobal] wp_fractional_scale_manager_v1 created. Louvre debug: [LGlobal] zwlr_gamma_control_manager_v1 created. Louvre debug: [LGlobal] zwp_linux_dmabuf_v1 created. Louvre debug: [LGlobal] wp_presentation created. Louvre debug: [LGlobal] ext_session_lock_manager_v1 created. Louvre debug: [LGlobal] wp_tearing_control_manager_v1 created. Louvre debug: [LGlobal] wp_viewporter created. Louvre debug: [LGlobal] zwlr_screencopy_manager_v1 created. Louvre debug: [LGlobal] zwlr_layer_shell_v1 created. Louvre debug: [LGlobal] wp_single_pixel_buffer_manager_v1 created. Louvre debug: [LGlobal] wp_content_type_manager_v1 created. Louvre debug: Font Inter or similar found: /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf Louvre debug: Font Inter Semi Bold or similar found: /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf SRM error: Failed o create DRM framebuffer 0 for device /dev/dri/card0 connector 95 (ITSELF MODE). SRM error: Failed to initialize render mode ITSELF for device /dev/dri/card0 connector 95. SRM error: Render mode interface initialize() failed /dev/dri/card0 connector 95. Louvre debug: [louvre-views] Compositor started

Louvre debug: [LLauncher::launch] Command dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=wlroots | systemctl --user restart xdg-desktop-portal executed successfuly. PID: 33841. Louvre debug: [LCompositorPrivate::unitInputBackend] Input backend uninitialized successfully. LGraphicBackendDRM: backendUninitialize LGraphicBackendDRM: uninitConnector LGraphicBackendDRM: uninitConnector LGraphicBackendDRM: uninitConnector LGraphicBackendDRM: uninitConnector LGraphicBackendDRM: closeRestricted libseat=YES Louvre debug: [LCompositorPrivate::unitGraphicBackend] Graphic backend uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] Keyboard uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] Pointer uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] Touch uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] DND Manager uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] Clipboard Manager uninitialized successfully. Louvre debug: [LCompositorPrivate::unitSeat] Seat uninitialized successfully. Louvre debug: [LGlobal] wp_content_type_manager_v1 destroyed. Louvre debug: [LGlobal] wp_single_pixel_buffer_manager_v1 destroyed. Louvre debug: [LGlobal] zwlr_layer_shell_v1 destroyed. Louvre debug: [LGlobal] zwlr_screencopy_manager_v1 destroyed. Louvre debug: [LGlobal] wp_viewporter destroyed. Louvre debug: [LGlobal] wp_tearing_control_manager_v1 destroyed. Louvre debug: [LGlobal] ext_session_lock_manager_v1 destroyed. Louvre debug: [LGlobal] wp_presentation destroyed. Louvre debug: [LGlobal] zwp_linux_dmabuf_v1 destroyed. Louvre debug: [LGlobal] zwlr_gamma_control_manager_v1 destroyed. Louvre debug: [LGlobal] wp_fractional_scale_manager_v1 destroyed. Louvre debug: [LGlobal] zxdg_decoration_manager_v1 destroyed. Louvre debug: [LGlobal] zxdg_output_manager_v1 destroyed. Louvre debug: [LGlobal] zwlr_foreign_toplevel_manager_v1 destroyed. Louvre debug: [LGlobal] xdg_wm_base destroyed. Louvre debug: [LGlobal] wl_subcompositor destroyed. Louvre debug: [LGlobal] wl_data_device_manager destroyed. Louvre debug: [LGlobal] zwp_pointer_gestures_v1 destroyed. Louvre debug: [LGlobal] zwp_pointer_constraints_v1 destroyed. Louvre debug: [LGlobal] zwp_relative_pointer_manager_v1 destroyed. Louvre debug: [LGlobal] wl_seat destroyed. Louvre debug: [LGlobal] wl_compositor destroyed. Louvre debug: [louvre-views] Compositor uninitialized.

RogerDavenport commented 2 weeks ago

Crash issue resolved

ehopperdietzel commented 2 weeks ago

Not sure why it is failing to create the DRM framebuffers. Just to be sure, I disabled explicit modifiers. Could you try once more? Also, could you provide me with the output of running drm_info?

ehopperdietzel commented 2 weeks ago

This should now be fixed in SRM v0.6.3-1.

RogerDavenport commented 2 weeks ago

Confirmed working on my machine. I can now run all the SRM test programs and Louvre programs successfully. Thanks!

RogerDavenport commented 2 weeks ago

Adding drm_info and srm-display-info outputs as requested. srm_display_info.txt drm_info.txt

ehopperdietzel commented 2 weeks ago

Glad to hear that and thanks for testing it!