Xorg crashed with SIGSEGV in InputReady() from ospoll_wait() from InputThreadDoWork()

Bug #1760104 reported by Alan Pope 🍺🐧🐱 🦄 on 2018-03-30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Ubuntu)
xorg-server (Ubuntu)

Bug Description



Installed a snap, immediately after I installed it, the machine froze and then x crashed.

ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: xserver-xorg-core 2:1.19.6-1ubuntu3
ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10
Uname: Linux 4.15.0-13-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 390.42 Sat Mar 3 04:10:22 PST 2018
 GCC version: gcc version 7.3.0 (Ubuntu 7.3.0-12ubuntu1)
 Your system is not currently configured to drive a VGA console
 on the primary VGA device. The NVIDIA Linux graphics driver
 requires the use of a text-mode VGA console. Use of other console
 drivers including, but not limited to, vesafb, may result in
 corruption and stability problems, and is not supported.

ApportVersion: 2.20.9-0ubuntu2
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
Date: Fri Mar 30 14:15:35 2018
Disassembly: => 0x7f6b00000008: Cannot access memory at address 0x7f6b00000008
DistUpgraded: Fresh install
DistroCodename: bionic
DistroVariant: ubuntu
ExecutablePath: /usr/lib/xorg/Xorg
 NVIDIA Corporation GM204M [GeForce GTX 980M] [10de:13d7] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: CLEVO/KAPOK Computer GM204M [GeForce GTX 980M] [1558:6541]
InstallationDate: Installed on 2018-02-13 (44 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
MachineType: Notebook P65_P67RGRERA
ProcCmdline: /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-13-generic root=UUID=d6c2bf6a-9191-40b5-b3f5-ce493dcdec01 ro quiet splash vt.handoff=1
 Segfault happened at: 0x7f6b00000008: Cannot access memory at address 0x7f6b00000008
 PC (0x7f6b00000008) not located in a known VMA region (needed executable region)!
 Stack memory exhausted (SP below stack segment)
SegvReason: executing unknown VMA
Signal: 11
SourcePackage: nvidia-graphics-drivers
 start_thread (arg=0x7f6b3c98b700) at pthread_create.c:463
Title: Xorg crashed with SIGSEGV
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 01/27/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1.05.13
dmi.board.asset.tag: Tag 12345
dmi.board.name: P65_P67RGRERA
dmi.board.vendor: Notebook
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Notebook
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1.05.13:bd01/27/2016:svnNotebook:pnP65_P67RGRERA:pvrNotApplicable:rvnNotebook:rnP65_P67RGRERA:rvrNotApplicable:cvnNotebook:ct10:cvrN/A:
dmi.product.family: Not Applicable
dmi.product.name: P65_P67RGRERA
dmi.product.version: Not Applicable
dmi.sys.vendor: Notebook
version.compiz: compiz 1:
version.libdrm2: libdrm2 2.4.91-2
version.libgl1-mesa-dri: libgl1-mesa-dri 18.0.0~rc5-1ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 18.0.0~rc5-1ubuntu1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.19.6-1ubuntu3
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:18.0.1-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20171229-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2
xserver.bootTime: Thu Mar 29 14:49:09 2018
xserver.configfile: default
 client bug: Invalid path /dev/input/event7
 systemd-logind: failed to take device /dev/input/event19: No such device
 client bug: Invalid path /dev/input/event19
 libinput: HD Pro Webcam C920: Failed to create a device for /dev/input/event19
 PreInit returned 2 for "HD Pro Webcam C920"
xserver.logfile: /var/log/Xorg.0.log

xserver.version: 2:1.19.6-1ubuntu3

 ?? ()
 InputReady (fd=38, xevents=1, data=0x5652a82b81d0) at ../../../../os/inputthread.c:180
 ospoll_wait (ospoll=0x5652a7788640, timeout=timeout@entry=-1) at ../../../../os/ospoll.c:412
 InputThreadDoWork (arg=<optimized out>) at ../../../../os/inputthread.c:367
 start_thread (arg=0x7f6b3c98b700) at pthread_create.c:463

Changed in nvidia-graphics-drivers (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private → Public

I've added a task for snapd, because this only happens when I'm doing "snap install" something. Usually at the point when it connects the opengl interface.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Confirmed

I've had this again. Here's the crash report links.

May 23rd: https://errors.ubuntu.com/oops/18a718fc-5e7e-11e8-a6ec-fa163ed44aae
May 10th: https://errors.ubuntu.com/oops/274be904-57ae-11e8-9ec0-fa163ef911dc
Feb 27th: https://errors.ubuntu.com/oops/1ce27eb4-1ba0-11e8-a91a-fa163e8d4bab

Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'

^ is the first line of the crash report.

Martin Wimpress (flexiondotorg) wrote :

I've just installed a snap and experienced this issue. The snap is a game using the opengl interface and immediately after the install the entire desktop UI locked up, Xorg crashed and I was returned to the display manager. Here is the associated error report:

  * https://errors.ubuntu.com/oops/97eb0478-5f48-11e8-950f-fa163e54c21f

Just had this again.


Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'

Is the error I see in the xorg crash reports. I

Jamie Strandboge (jdstrand) wrote :

I suspect this is because snapd will do 'sudo udevadm control --reload-rules && sudo udevadm trigger' on interface connections. These operations are supposed to be safe but I've seen with my Intel graphics that gnome-shell/X11 will blink when this happens (due to the 'udevadm trigger') but it doesn't crash. I suspect that your particular combination of gnome-shell/X11/nvidia isn't responding particularly well when this happens.

Jamie Strandboge (jdstrand) wrote :

I noticed I could prevent gnome-shell from blinking/pausing if instead of 'sudo udevadm control --reload-rules && sudo udevadm trigger' I instead did 'sudo udevadm control --reload-rules && sudo udevadm trigger --subsystem-nomatch=input'. I'm not sure there is much that snapd can do with that information, but it might be a clue to make gnome-shell/X11/nvidia to behave better.

Jamie Strandboge (jdstrand) wrote :

I had some luck with this not pausing/blinking gnome-shell:

$ sudo udevadm control --reload-rules
$ sudo udevadm trigger --subsystem-nomatch=input
$ sudo udevadm trigger --property-match=ID_INPUT_JOYSTICK=1

Alan, perhaps you can upgrade to core from edge (since it does some things with ID_INPUT_JOYSTICK) see if you can crash your system by doing:

$ for i in `seq 1 100` ; do sudo udevadm control --reload-rules ; sudo udevadm trigger ; done

If you can, please see if this doesn't crash it:

$ for i in `seq 1 100` ; do sudo udevadm control --reload-rules ; sudo udevadm trigger --subsystem-nomatch=input ; sudo udevadm trigger --property-match=ID_INPUT_JOYSTICK=1 ; done

If that works, I'll give some thought to updating the udev backend to only call 'sudo udevadm trigger --subsystem-match=input' when absolutely needed (eg, when install mir, X or wayland snaps).

Jamie Strandboge (jdstrand) wrote :

So, the pauses I am experiencing is likely due to simply the fact that the keyboards and mice are being removed then added back, which is a different issue than the crashes (which appear nvidia related). I will likely create a PR to only trigger the input subsystem on an as-needed base to reduce the annoying pauses we see during refreshes.

Alan reported back on irc that the for loop did *not* trigger the crash which is good for snapd. Looking at the error reports, both are in the /usr/lib/xorg/Xorg binary:

* https://errors.ubuntu.com/bucket/?id=/usr/lib/xorg/Xorg%3A11%3Axf86ReadInput%3AInputReady%3Aospoll_wait%3AInputThreadDoWork%3Astart_thread
* https://errors.ubuntu.com/bucket/?id=/usr/lib/xorg/Xorg%3A11%3Amain_arena%3AInputReady%3Aospoll_wait%3AInputThreadDoWork%3Astart_thread

which have numerous reports. I'm going to mark the 'snapd' task as invalid since while it may aggravate the issue, Xorg is clearly the problem.

Changed in snapd:
status: New → Invalid
summary: - Xorg crashed with SIGSEGV
+ Xorg crashed with SIGSEGV in InputReady() from ospoll_wait() from
+ InputThreadDoWork()
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

Annoyingly, around 50 reports of the crash on bionic is still not enough for it to make it into the top 100 xorg-server crashes on bionic. So not easy to find.

To post a comment you must log in.