Xorg crashes when tapping Unity system tray icons

Bug #1755232 reported by krzychoocpp on 2018-03-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Medium
Timo Aaltonen

Bug Description

This bug requires some prerequisites to reproduce:

0. Make sure you've got multitouch-enable display
1. Start Unity+xorg session
2. Verify that four-finger tap gesture works (shows unity app search tool)
3. Wait some time for this gesture to stop working - this is another bug, not necessarily xorg one, already known and thought to be connected with Google Chrome running.
4. Once it stops working, quickly tap all icons in the Unity system tray like you would be pretending to play a piano (tapping them individually or slowly does not cause any problems).
5. Xorg crashes immediately.

This scenario is 100% reproducible on my setup.

I recompiled xorg with debug info enabled and got this nice trace:

[ 22705.385] (EE)
[ 22705.385] (EE) Backtrace:
[ 22705.385] (EE) 0: /usr/lib/xorg/Xorg (OsSigHandler+0x3b) [0x562a36b6f25f]
[ 22705.387] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (__restore_rt+0x0) [0x7f382f64414f]
[ 22705.389] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0xcb) [0x7f382f2880bb]
[ 22705.391] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x16d) [0x7f382f289f5d]
[ 22705.393] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (__fsetlocking+0x2fd) [0x7f382f2d22bd]
[ 22705.395] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (_IO_str_seekoff+0xa3a) [0x7f382f2d9f7a]
[ 22705.397] (EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (_IO_str_seekoff+0x2b2e) [0x7f382f2de0fe]
[ 22705.399] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (cfree+0x6e) [0x7f382f2e044e]
[ 22705.400] (EE) 8: /usr/lib/xorg/Xorg (FreeGrab+0xb8) [0x562a3699ac32]
[ 22705.400] (EE) 9: /usr/lib/xorg/Xorg (DeactivatePointerGrab+0x279) [0x562a3698428f]
[ 22705.400] (EE) 10: /usr/lib/xorg/Xorg (DeleteWindowFromAnyEvents+0x70) [0x562a3698ea8b]
[ 22705.401] (EE) 11: /usr/lib/xorg/Xorg (UnrealizeTree+0x100) [0x562a369bc371]
[ 22705.401] (EE) 12: /usr/lib/xorg/Xorg (UnmapWindow+0x195) [0x562a369bc689]
[ 22705.402] (EE) 13: /usr/lib/xorg/Xorg (ProcUnmapWindow+0x74) [0x562a3696e488]
[ 22705.402] (EE) 14: /usr/lib/xorg/Xorg (Dispatch+0x21e) [0x562a3696d2d9]
[ 22705.402] (EE) 15: /usr/lib/xorg/Xorg (dix_main+0x651) [0x562a3697c4e3]
[ 22705.403] (EE) 16: /usr/lib/xorg/Xorg (main+0x28) [0x562a3695cf22]
[ 22705.405] (EE) 17: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf1) [0x7f382f2721c1]
[ 22705.405] (EE) 18: /usr/lib/xorg/Xorg (_start+0x2a) [0x562a3695ce1a]
[ 22705.407] (EE) 19: ? (?+0x2a) [0x2a]

Looks like FreeGrab tries to free pGrab for the second time (some multithreading issue?)

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: xorg 1:7.7+19ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-36.40-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity:Unity7:ubuntu
Date: Mon Mar 12 17:03:34 2018
DistroCodename: artful
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation HD Graphics 620 [8086:5916] (rev 02) (prog-if 00 [VGA controller])
   Subsystem: Lenovo HD Graphics 620 [17aa:2245]
InstallationDate: Installed on 2017-09-01 (192 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: LENOVO 20HES2130Q
ProcEnviron:
 LANGUAGE=pl_PL
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.13.0-36-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro quiet splash acpi.ec_freeze_events=Y acpi.ec_suspend_yield=Y intel_pstate=skylake_hwp i915.enable_guc_loading=1 i915.enable_guc_submission=1 vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg crash
UpgradeStatus: Upgraded to artful on 2018-02-11 (29 days ago)
dmi.bios.date: 05/23/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: N1QET55W (1.30 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20HES2130Q
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrN1QET55W(1.30):bd05/23/2017:svnLENOVO:pn20HES2130Q:pvrThinkPadT470:rvnLENOVO:rn20HES2130Q:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad T470
dmi.product.name: 20HES2130Q
dmi.product.version: ThinkPad T470
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.13.1+17.10.20170901-0ubuntu1
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.8-0ubuntu0~17.10.1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.8-0ubuntu0~17.10.1
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

krzychoocpp (krzychoocpp) wrote :
krzychoocpp (krzychoocpp) wrote :

I tried adding critical section to DeactivatePointerGrab. Xorg was working, including multitouch.
 After some time, when I touched the screen (single finger) it deadlocked. So it really looks like a multithreading issue.

Jean-Noël AVILA (jnavila) wrote :

Maybe something similar to what I experience. See https://bugs.freedesktop.org/show_bug.cgi?id=105557

krzychoocpp (krzychoocpp) wrote :

@jnavila: It looks like it could be related, but I couldn't reproduce your crash (or at least I think so). With context menu opened in chrome I tried tapping on the window border, Unity bar and system tray - both when Chrome was maximized and when it wasn't. No crash. Should I do something else?

This is fixed in https://gitlab.freedesktop.org/xorg/xserver/commit/35e5a76cc1d02801fadd49d12e60664b02e4bebc

Will be in next xorg revision (if not cherry-picked earlier)

Changed in xorg (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Timo Aaltonen (tjaalton)
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.