Bug 74035 - weston-launch freezes the system
Summary: weston-launch freezes the system
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: 1.2.1
Hardware: Other Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-25 01:28 UTC by iquequeisso
Modified: 2014-02-01 09:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description iquequeisso 2014-01-25 01:28:04 UTC
weston-launch does not start and freezes the system. This happens in X or outside X. I can just restart the system.

1) I don't have systemd
2) llvm is compiled without ncurses (I was having terminfo issues)
3) I can launch weston inside X

Since the command weston works I'll put at least the output of that command if it helps.

~ $ weston
Date: 2014-01-25 Local time zone must be set--see zic manual page
[01:25:56.019] weston 1.2.1
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.2.1
               Build:  
[01:25:56.019] OS: Linux, 3.12.0-gentoo, #13 SMP PREEMPT Wed Nov 13 15:11:06 BRST 2013, x86_64
[01:25:56.032] Loading module '/usr/lib64/weston/x11-backend.so'
[01:25:56.060] initializing x11 backend
[01:25:56.321] Using gl renderer
[01:25:56.321] launching '/usr/libexec/weston-keyboard'
[01:25:56.338] XCB-XKB not available during build
[01:25:56.368] Chosen EGL config details:
               RGBA bits: 8 8 8 0
               swap interval range: 0 - 1000
[01:25:56.419] EGL version: 1.4 (DRI2)
[01:25:56.419] EGL vendor: Mesa Project
[01:25:56.419] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 OpenGL_ES3 
[01:25:56.419] EGL extensions: EGL_MESA_drm_image EGL_WL_bind_wayland_display
               EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_image
               EGL_KHR_gl_renderbuffer_image EGL_KHR_surfaceless_context
               EGL_KHR_create_context EGL_NOK_swap_region
               EGL_NOK_texture_from_pixmap EGL_NV_post_sub_buffer
[01:25:56.419] GL version: OpenGL ES 3.0 Mesa 10.0.2
[01:25:56.419] GLSL version: OpenGL ES GLSL ES 3.0
[01:25:56.419] GL vendor: X.Org
[01:25:56.419] GL renderer: Gallium 0.4 on AMD PALM
[01:25:56.419] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_format_BGRA8888 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_npot
               GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_vertex_array_object GL_EXT_texture_rg
               GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer
               GL_EXT_map_buffer_range GL_OES_depth_texture_cube_map
               GL_OES_surfaceless_context GL_EXT_color_buffer_float
[01:25:56.420] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[01:25:56.420] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[01:25:56.420] x11 output 1024x640, window id 18874373
[01:25:56.420] Loading module '/usr/lib64/weston/desktop-shell.so'
[01:25:56.423] Loading module '/usr/lib64/weston/xwayland.so'
[01:25:56.440] xserver listening on display :1
[01:25:56.440] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[01:25:56.440] libwayland: using socket /tmp/1000-runtime-dir/wayland-0
[01:25:56.475] launching '/usr/libexec/weston-desktop-shell'
Comment 1 U. Artie Eoff 2014-01-25 03:37:58 UTC
Could you try to capture the weston log with something like:

weston-launch -- --log=weston.log

I don't recall the quality of weston-launch in 1.2.1... but I know it was in a state of flux/experimental for a while.  Could you try a newer version?  FWIW, Weston just released 1.4.0.

Also I won't be able to help much for an AMD + gentoo setup, but someone else might have more knowledge of it than I.
Comment 2 iquequeisso 2014-01-25 15:31:50 UTC
tried weston-launch -- --log=weston.log
and weston-launch --log=weston.log
neither worked (for some reason the freezing prevents the log being created/saved)

I was trying this version because it's last in official tree. But I'll follow your advice and add x11 overlay to try weston-1.3.91 with wayland-1.4
Comment 3 iquequeisso 2014-01-25 16:10:27 UTC
Seems like the problem is in my weston.ini, for some reason weston-launch works for keymap_layout=us but it doesn't for keymap_layout=br or keymap_layout=br-abnt2 (I tested in weston 1.3.91 and there is the same problem
Comment 4 Ander Conselvan de Oliveira 2014-01-31 15:42:18 UTC
Looks like Weston does the wrong thing if it can't compile the specified keymap. I just sent a patch to the mailing list that should make it handle the failure without crashing.

But given the fact that the 'br' layout fails to compile for you indicates that there might be something wrong with your installation. Perhaps libxkbcommon wasn't configured to look for the xkb files in the right place.
Comment 5 iquequeisso 2014-02-01 01:08:36 UTC
Ander Conselvan de Oliveira, I removed weston 1.2.1 and installed 1.4. In this version I'm able to set any keyboard layout I want so I think it's a 1.2.1 problem.
Comment 6 Kristian Høgsberg 2014-02-01 09:14:42 UTC
commit 4d363cfcf6025db2277005845957e0b0e956ebd0
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Fri Jan 31 17:35:45 2014 +0200

    input: Fix weston_seat_init_keyboard() error path
    
    The pointer seat->keyboard was set before some possible error returns.
    That pointer was left unchanged in case of failure, pointing to an
    uninitialized keyboard struct (that was also leaked). If a client sent
    a wl_seat::get_keyboard request, that would cause Weston to crash.
    
    Fix this by setting the seat->keyboard pointer only after the keymap
    initialization is done and there is no more possibilities for failure.
    Also plug the memory leaks on the error path.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=74035


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.