Bug 78349 - SIGSEGV in weston-keyboard_set_focus during change_workspace when output seat is specified
Summary: SIGSEGV in weston-keyboard_set_focus during change_workspace when output 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-05-06 17:50 UTC by Anu Reddy
Modified: 2014-05-13 22:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
seat_gdbbacktrace (9.64 KB, text/plain)
2014-05-06 17:51 UTC, Anu Reddy
Details
unlock_gdb_backtrace (9.46 KB, text/plain)
2014-05-08 18:50 UTC, Anu Reddy
Details

Description Anu Reddy 2014-05-06 17:50:13 UTC
Weston crashes on switching to different workspace when output seat is specified in weston.ini. Weston received signal SIGSEGV, Segmentation fault. See attached gdb_backtrace.  


Steps to Reproduce:
1. Activate workspaces by un-commenting num-workspaces=6 in weston.ini
2. Configure Weston.ini with output seat=back0

Example:
Output
name=HDMI2
seat=back0

3. Launch Weston
4. Switch to different workspace via <mod> + <f2>
5. Notice weston crash with segmentation fault.


Software stack:
wayland (HEAD) 1.4.92-0-g4a4523f
drm (HEAD) libdrm-2.4.52-0-g46d451c
mesa (HEAD) remotes/origin/10.1-0-g340ebdb
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-g97af5c3
weston (HEAD) 1.4.92-0-gd7d71e8
Comment 1 Anu Reddy 2014-05-06 17:51:29 UTC
Created attachment 98576 [details]
seat_gdbbacktrace
Comment 2 Anu Reddy 2014-05-08 18:48:10 UTC
This is another way to reproduce SIGSEGV in weston_keyboard_set_focus.
When output seat is specified in weston.ini, unlock screen causes weston to crash with segmentation fault in weston_keyboard_set_focus.

Steps:
======
1. Describe output seat in Weston.ini
Example:
Output
name=HDMI2
seat=back0

2. Launch Weston: weston-launch -- –i5
3. Allow weston to lock 
4. Unlock screen. Observe Weston crash with Segmentation fault. See attached unlock_gdb_backtrace.
Comment 3 Anu Reddy 2014-05-08 18:50:22 UTC
Created attachment 98700 [details]
unlock_gdb_backtrace
Comment 4 Ander Conselvan de Oliveira 2014-05-09 06:35:52 UTC
I sent a patch to the mailing list to fix this bug:

http://lists.freedesktop.org/archives/wayland-devel/2014-May/014659.html
Comment 5 Kristian Høgsberg 2014-05-09 19:52:55 UTC
commit 6e56ab41d99197ca2b562b5bc1315800065763ae
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Wed May 7 11:57:28 2014 +0300

    shell: Fix crash when restoring focus state during workspace change
    
    The check to avoid calling weston_keyboard_set_focus() for a seat that
    didn't have a keyboard in restore_focus_state() was cheking the wrong
    seat (the one from the previous loop). That caused a crash when
    switching workspaces if there was an extra seat that didn't have a
    keyboard.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=78349


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.