Bug 72839 - SIGSEGV in Weston run_touch_binding
Summary: SIGSEGV in Weston run_touch_binding
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: 2013-12-18 18:43 UTC by U. Artie Eoff
Modified: 2014-01-06 20:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
weston log (6.52 KB, text/plain)
2013-12-18 18:44 UTC, U. Artie Eoff
Details
gdb backtrace (14.99 KB, text/plain)
2013-12-18 18:44 UTC, U. Artie Eoff
Details
udev rules (235 bytes, text/plain)
2013-12-18 18:44 UTC, U. Artie Eoff
Details

Description U. Artie Eoff 2013-12-18 18:43:52 UTC
Weston crashes when touch down or touch move occurs in the extreme corners of the device.  I was also able to get it to crash occasionally when touching in other random, non-edge locations.

Reproduced with the following setup:

A calibrated single touchscreen device.
$ lsusb
  Bus 002 Device 005: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen

kernel 3.11.10-301.fc20.x86_64
systemd (master) heads/master-0-g63966da
wayland (master) 1.3.91-0-g01bde63
drm (master) libdrm-2.4.50-0-g4c5de72
mesa (master) heads/master-0-ga9bf599
libva (master) libva-1.2.1-0-g88ed1eb
intel-driver (master) 1.2.1-0-g8f306e3
weston (master) heads/master-0-gdf42a80

See attached artifacts for more details.
Comment 1 U. Artie Eoff 2013-12-18 18:44:15 UTC
Created attachment 90941 [details]
weston log
Comment 2 U. Artie Eoff 2013-12-18 18:44:33 UTC
Created attachment 90942 [details]
gdb backtrace
Comment 3 U. Artie Eoff 2013-12-18 18:44:57 UTC
Created attachment 90943 [details]
udev rules
Comment 4 U. Artie Eoff 2013-12-18 20:00:28 UTC
I was able to reproduce this with a multitouch touch device too:

$ lsusb
  Bus 002 Device 005: ID 2149:2122 Advanced Silicon S.A. CoolTouch(TM) System
Comment 5 Kristian Høgsberg 2014-01-03 07:05:00 UTC
Those touch coordinates in the backtrace look really out of place, that may be a different problem in itself.  But there are a few corner cases where we can legitimately fail to touch a surface, so we need to check for NULL in touch_to_activate_binding().

commit 0ed6750541eac94af7083fabe5911c20e6ca31f9
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Jan 2 23:00:11 2014 -0800

    shell: Only assign focus on touch if there is a touch focus surface
    
    Similar to 7c4f6cc145daf66cd9624f1e70dd5278241f5858, if we don't have
    a background image from the desktop-shell client or the touch point
    for some other reason doesn't hit a surface we trigger a
    segfault as we try to deref the seat->touch->focus NULL pointer.
    
    For touch, another problem could be fudgey calibration that ends up
    giving touch coordinates outside the output space.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=72839


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.