After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771628 - With mutter 3.21.92, gnome-shell segfaults in libwacom2 when any graphics tablet is plugged in
With mutter 3.21.92, gnome-shell segfaults in libwacom2 when any graphics tab...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.21.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-09-18 17:09 UTC by Andrew Chadwick
Modified: 2016-09-19 21:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backends: Handle tablet settings lookups with no backing libwacom info (1.51 KB, patch)
2016-09-19 14:44 UTC, Carlos Garnacho
committed Details | Review

Description Andrew Chadwick 2016-09-18 17:09:45 UTC
As of gnome-shell 3.21.91 and mutter 3.21.92, connecting a graphics tablet (or starting with one already plugged in) causes a segfault in gnome-shell. Several different tablets from different manufacturers, using different Xorg drivers, are affected.

* Wacom Graphire 2
* Wacom Intuos 5 (both USB-cabled and USB-wireless)
* Huion H610PRO
* Genius EasyPen i405X (especially bad, *also* kills Wayland sessions doing gdm3's gnome-shell)

Mostly they only take out gnome-shell in an Xorg session, but the Genius tablet manages to kill gdm3 Wayland sessions too.

libwacom2 seems implicated, but upgrading it alone to 0.22 did not fix this segfault:

Sep 16 23:50:42 spatula kernel: [16572.424150] gnome-shell[18532]: segfault at 10 ip 00007fbbe5ff06c4 sp 00007ffccd1e7a20 error 4 in libwacom.so.2.4.6[7fbbe5fed000+9000]
Sep 17 00:19:29 spatula kernel: [18299.436938] gnome-shell[24167]: segfault at 10 ip 00007fcf014466c4 sp 00007ffd46c16320 error 4 in libwacom.so.2.4.6[7fcf01443000+9000]
Sep 17 00:27:21 spatula kernel: [18771.298889] gnome-shell[26390]: segfault at 10 ip 00007f49369546c4 sp 00007ffe56fd70b0 error 4 in libwacom.so.2.4.6[7f4936951000+9000]

[   12.990227] gnome-shell[1168]: segfault at 10 ip 00007f35122ab844 sp
00007ffd8efd9be0 error 4 in libwacom.so.2.5.0[7f35122a8000+9000]
[   14.569733] gnome-shell[1239]: segfault at 10 ip 00007f724d4e6844 sp
00007fffda2ec150 error 4 in libwacom.so.2.5.0[7f724d4e3000+9000]
[   14.884694] gnome-shell[1245]: segfault at 10 ip 00007fe7d7128844 sp
00007ffc5c90e4b0 error 4 in libwacom.so.2.5.0[7fe7d7125000+9000]

Noticed in the recent Debian builds. Replicable with Debian unstable as of now, or with the following package versions:

gnome-shell    3.21.91-2
gnome-session  3.20.2-1
libwacom2      0.22-1
xserver-xorg   1:7.7+16
xwayland       2:1.18.4-1
mutter         3.21.92-1   <<< *** gnome-shell segfaults

Downgrading mutter (& its lib and -common package) to 3.21.91 in this picture fixes the fault in both Xorg and Xwayland.

mutter         3.21.91-2   <<< +++ no segfaults, all tablets OK

However this seems to be mainly gnome-shell at fault, according to the logs. To my poor programmer's eyes, anyway.

See downstream bugs and X server logs:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838050
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838047

Please advise on how downstream can debug this one properly, if needed.
Comment 1 Rann Bar-On 2016-09-18 21:24:53 UTC
This occurs on touchscreen laptops like my Lenovo X1 Yoga as well. Symptoms and versions identical to the ones above. Downgrading mutter to 3.21.91-2 does indeed fix it.
Comment 2 Andrew Chadwick 2016-09-19 00:10:49 UTC
Note that the X1 Yoga's touchscreen ships with a Wacom stylus pen, which presumably becomes known to Wayland/gnome-shell/mutter as a tablet when it starts.

Regular touchscreens like that of my Dell XPS13 seem not to be affected by this. Its USB ID is 06cb:0af8, a Synaptics multitouch thing.
Comment 3 Rann Bar-On 2016-09-19 01:34:18 UTC
Indeed. My touchscreen ID is 056a:503f.
Comment 4 Carlos Garnacho 2016-09-19 14:44:31 UTC
Created attachment 335863 [details] [review]
backends: Handle tablet settings lookups with no backing libwacom info

Those will be unseen by g-s-d/g-c-c, so no settings will be written on
disk for those. Still, look up an ID correctly in this case instead of
crashing.
Comment 5 Rui Matos 2016-09-19 15:00:46 UTC
Review of attachment 335863 [details] [review]:

right, this seems to be the only place where we use info->wacom_device without NULL checking it
Comment 6 brandonjsnider 2016-09-19 15:31:48 UTC
I tested that patch with my tablet and it fixes the issue.
Comment 7 Andrew Chadwick 2016-09-19 18:45:44 UTC
I can confirm that attachment 335863 [details] [review] fixes the Debian mutter build of 3.21.92-1. Using this, gnome-shell no longer segfaults in the presence of any of my test tablets.

Thanks, Carlos!
Comment 8 Carlos Garnacho 2016-09-19 20:57:55 UTC
Attachment 335863 [details] pushed as 3137ddb - backends: Handle tablet settings lookups with no backing libwacom info