GNOME Bugzilla – Bug 771628
With mutter 3.21.92, gnome-shell segfaults in libwacom2 when any graphics tablet is plugged in
Last modified: 2016-09-19 21:30:12 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.
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.
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.
Indeed. My touchscreen ID is 056a:503f.
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.
Review of attachment 335863 [details] [review]: right, this seems to be the only place where we use info->wacom_device without NULL checking it
I tested that patch with my tablet and it fixes the issue.
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!
Attachment 335863 [details] pushed as 3137ddb - backends: Handle tablet settings lookups with no backing libwacom info