Bug 1394489 - Xorg crashes with Wacom attached
Summary: Xorg crashes with Wacom attached
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-wacom
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hutterer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-12 14:09 UTC by makruiten
Modified: 2017-05-23 23:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-23 23:26:48 UTC
Type: Bug


Attachments (Terms of Use)
Xorg backtrace (517.69 KB, application/x-xz)
2016-11-28 12:00 UTC, makruiten
no flags Details
evemu right click event (19.96 KB, text/plain)
2016-11-29 11:45 UTC, makruiten
no flags Details

Description makruiten 2016-11-12 14:09:48 UTC
Description of problem:
Xorg crashes I right click on a tray icon to show the menu. All packages are from the Fedora 25 repo (not testing). Fedora was upgraded from Fedora 24. It seems to happen only when my Wacom graphics tablet is attached.

Version-Release number of selected component (if applicable):
libgtk-3.so.0.2200.2

How reproducible:
It happens occasionally, sometimes multiple times a day.

Steps to Reproduce:
1. Have Wacom tablet attached
2. Logged in to Xorg session
3. Right click on icon in tray with Wacom pen (Topicons Plus installed)

Actual results:
Xorg session crashes

Expected results:
Show the menu of the program.

Additional info:
DMESG: segfault at 0 ip 00007fa0a30e41b9 sp 00007ffd11a0cc60 error 4 in libgtk-3.so.0.2200.2[7fa0a2e06000+6f0000]

Comment 1 makruiten 2016-11-18 09:26:01 UTC
I downgraded xorg-x11-server-Xorg and its dependencies to Fedora 24 versions and I didn't experience any crashes yet. Although I need one or two extra days to know for sure, I suspect the new Xorg together with the Wacom driver causes this bug. 

It always happens when I click something, but not something in particular (in contrast to what I said before). It can be a program I'm trying to launch, but it can also be any other action, as long as I click with my Wacom pen.

Comment 2 makruiten 2016-11-22 15:43:58 UTC
This bug is still present with the official release of Fedora 25 today. To be clear: when I posted my first comment above I was clueless about what was happening and therefore I attached the wrong information. My second post is about the real issue: Xorg 1.19 together with the newest Wacom driver causes Xorg to crash very often when (right) clicking on something with the Wacom pen. When I downgrade to Xorg 1.18, the problem completely disappears.

Comment 3 makruiten 2016-11-25 12:48:27 UTC
I realize that the information I provided is scarce and vague. However, I'm willing to run on Xorg 1.19 until the bug is triggered, I only need to know which logs I need to include.

Comment 4 Peter Hutterer 2016-11-28 06:24:14 UTC
do you have a backtrace for me? should be in the journal, best use
   journalctl  _COMM=gdm-x-session 

to get the X log of a crash and attach it here please, thanks

Comment 5 makruiten 2016-11-28 12:00:17 UTC
Created attachment 1225267 [details]
Xorg backtrace

There is a lot of Xorg 1.18 in there, but I think the last time I had a crash with Xorg 1.19 was around 21:15 yesterday, before I switched to Xorg 1.18 again. Another crash I remember was October 31 around 23:00.

Comment 6 Peter Hutterer 2016-11-28 21:41:51 UTC
First: if the problem is there with 1.19 but not with 1.18 there's a high chance it's a race condition triggered by the new input thread in the server.
https://who-t.blogspot.com.au/2016/09/input-threads-in-x-server.html

I've tried reproducing this with my I5 here but I failed so far. Please attach an evemu-record from your wacom device while you right-click, it may be that there's something different that triggers it and if I set up some script to replay I may be able to reproduce it.

The backtraces in the log are mostly all over the place, there's no smoking gun here.

Also, if you remove the xorg-x11-drv-wacom driver and let libinput handle the tablet, do you get the crashes?

Comment 7 makruiten 2016-11-29 11:45:22 UTC
Created attachment 1225792 [details]
evemu right click event

This is a recording of a right click event. It did not trigger a bug. Just in case it matters, I will see if I can get a recording of one that did trigger a bug.

Comment 8 makruiten 2016-11-29 11:47:36 UTC
> Also, if you remove the xorg-x11-drv-wacom driver and let libinput handle the tablet, do you get the crashes?

I need at least a full day to be absolutely sure if it's stable without it. I will report back!

Comment 9 makruiten 2016-11-30 17:02:18 UTC
Are there any downsides to not having xorg-x11-drv-wacom installed? Besides not being able to configure the tablet in GNOME Settings, I do not notice any difference. I did not have any crashes yet. Another 24 hours and we can be fairly certain that it only occurs with xorg-x11-drv-wacom.

Comment 10 Peter Hutterer 2016-11-30 21:16:14 UTC
(In reply to Martijn Kruiten from comment #9)
> Are there any downsides to not having xorg-x11-drv-wacom installed?

that's what I'm trying to figure out too ;)

the libinput driver works a bit differently but is technically 'better' since it doesn't carry cruft from the last 10 years. So it largely depends on whether applications rely on specific behaviours of the wacom driver or not and I'm not sure which ones do. So far my testing has been successful and all the special cases tend to be more niche anyway (e.g. touch strips work differently). I expect at least the stylus + basic buttons to be fully compatible though.

The GNOME configuration is a big ticket item though, there are some patches in the works but we're not ready yet to have everything exposed that GNOME needs to expose tablet configuration through libinput.

either way, if it only occurs with the wacom driver then we most likely have a threaded race condition. Which is bad...

Comment 11 makruiten 2016-12-03 12:23:50 UTC
(In reply to Peter Hutterer from comment #10)
> either way, if it only occurs with the wacom driver then we most likely have
> a threaded race condition. Which is bad...

Then I think this is the case, as libinput has been rock solid for me. My plan is to install the Wacom driver again and use evemu to record clicks until a crash occurs. Hopefully there is some chain of events that will reliably trigger a race condition. Or is this too optimistic?

Comment 12 Peter Hutterer 2016-12-06 01:10:29 UTC
Optimistic - yes. Too optimistic - I'm not sure ;) let's see how we go.

Comment 13 makruiten 2017-05-23 12:26:39 UTC
Okay, I didn't follow through with this, but I can confirm that this bug is gone in Fedora 26.

Comment 14 Peter Hutterer 2017-05-23 23:26:48 UTC
Thanks!


Note You need to log in before you can comment on or make changes to this bug.