Bug 77503 - Weston crashes (Segmentation fault) immediately on specifying seat
Summary: Weston crashes (Segmentation fault) immediately on specifying seat
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: Other All
: medium critical
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 21:52 UTC by Anu Reddy
Modified: 2014-04-30 19:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
bad-seat-gdb-backtrace.out (5.83 KB, text/plain)
2014-04-15 21:54 UTC, Anu Reddy
Details

Description Anu Reddy 2014-04-15 21:52:15 UTC
Weston crashes on specifying seat for output in weston.ini. Weston received signal SIGSEGV, Segmentation fault. I am able to reproduce this every time. See attached gdb_backtrace.  

Steps:
1. Configure Weston.ini with seat=back0

Example:
Output
name=HDMI2
seat=back0

2. Launch Weston
3. Notice, weston crashes immediately with segmentation fault.


Software stack:
wayland (HEAD) 1.4.91-0-g5e2cfd2
drm (HEAD) libdrm-2.4.52-0-g46d451c
mesa (HEAD) mesa-10.1-0-g4a86465
libva (HEAD) libva-1.2.1-0-g88ed1eb
intel-driver (HEAD) 1.2.2-0-g121e70d
cairo (HEAD) heads/1.12-0-g59e2a93
libinput (HEAD) remotes/origin/HEAD-0-gc5c503c
weston (HEAD) 1.4.91-0-g79d5a6e
Comment 1 Anu Reddy 2014-04-15 21:54:38 UTC
Created attachment 97428 [details]
bad-seat-gdb-backtrace.out
Comment 2 Ander Conselvan de Oliveira 2014-04-16 12:54:01 UTC
This one seems to be cause by an API change done for introducing libinput support. Commit 58e15865 changed the parameters for udev_get_seat_by_name() to receive a struct udev_input. However, when this gets called from create_output_for_connector() during initialization, we haven't initialized that udev_input structure, leading to the crash.
Comment 3 Kristian Høgsberg 2014-04-21 20:05:04 UTC
commit 6f4c63740bd6d360f74568501d3748adeb0e5e29
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Thu Apr 17 13:08:45 2014 +0300

    compositor-drm: Fix crash when setting up seat constrained by an output
    
    Commit 58e15865 changed the parameters for udev_get_seat_by_name() to
    receive a struct udev_input. However, when this gets called from
    create_output_from_connector() during initialization, the input struct
    is not yet initialized, leading to a crash. Previously, that function
    would take only a pointer to the compositor.
    
    This patch fixes the crash by initializing input before creating any
    outputs.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=77503


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.