Periodic lockups or crashes

Bug #976383 reported by Matthew General
This bug report is a duplicate of:  Bug #973096: Nvidia driver causes xorg crash. Edit Remove
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Ubuntu)
Confirmed
High
Unassigned

Bug Description

I've been using 12.04 beta since beta 1 and this problem has existed.

Essentially what happens is (normally) I'll be scrolling through a webpage and one of 3 things will happen. Either my current session exits, locks up entirely, or just locks up the UI allowing the mouse to still move. This happens on any desktop environment, whether it is Ubuntu 2D, Gnome classic, Gnome shell, Ubuntu unity, etc. It seems worse with gnome shell, where it almost always completely locks up. It seems most stable under gnome classic.

Last time it locked up I sshed into the machine to see if I could figure out what happened. Xorg was at 100% CPU and not responding besides the mouse. Video playback froze, UI non responsive.

This seems to be an architecture related problem and others seem to be having the same problem. See http://ubuntuforums.org/showthread.php?p=11783386

I've been checking dmesg and syslogs to see if I could figure out what might be causing the lockups/crashes. dmesg returned a few bits of information that may be helpful
init: lightdm main process (1536) terminated with status 1
eclipse[4532]: segfault at 18 ip 00007f558e70d30e sp 00007fffd0fcb8f0 error in libgdk-x11-2.0.so..2400.10[7f558e69b000+ad000]
init: failsafe-x main process (6661) terminated with status 1

I had killed the main xorg process, causing the last messaged in dmesg.

Hopefully this will be helpful for someone.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+12ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
Uname: Linux 3.2.0-22-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.tmp.unity.support.test.0:

ApportVersion: 2.0-0ubuntu4
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
CompositorRunning: None
Date: Sun Apr 8 02:01:52 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, if not too technical
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120325)
MachineType: Gigabyte Technology Co., Ltd. X58A-UD3R
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-22-generic root=UUID=7427dafa-0a3b-4460-aa09-fff99b7b5a3c ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/04/2011
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: Fh3
dmi.board.name: X58A-UD3R
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrFh3:bd08/04/2011:svnGigabyteTechnologyCo.,Ltd.:pnX58A-UD3R:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnX58A-UD3R:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: X58A-UD3R
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.7.4-0ubuntu3
version.ia32-libs: ia32-libs 20090808ubuntu35
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
Matthew General (mattgen88) wrote :
Bryce Harrington (bryce)
tags: added: regression
Changed in xorg (Ubuntu):
importance: Undecided → High
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Matthew,

Dang, that sounds really annoying.

I've reviewed the log files you attached, but none show indications of server crashes or GPU freezes, that would indicate an X.org bug.

Thanks for the link to UF but we don't review forum discussions due to time constraints; if there's anything pertinent from those threads please re-summarize here for is.

The lightdm termination message is normal. lightdm terminates when it hands control over to the user session.

The failsafe-x termination likewise is probably innocuous.

The eclipse segfault in libgdk-x11 looks interesting; I don't know what that is. If that is always present when you see this bug, it may be a very strong clue.

In general, high Xorg CPU is usually caused not by X but by a client program or service, that is out of control and simply making too many X requests (X does not throttle clients).

You've ruled out display managers, which is a good start. When you booted into Gnome classic, was that with or without effects? If it was with effects, try without, as that will rule out compiz as the culprit.

Try booting into a guest session; that will help indicate if the problem is something in your user settings.

Try booting a beta1 or beta2 liveUSB image. If the problem reproduces on that, then that rules out something you've installed. If it doesn't reproduce, check if you've installed any services or secondary tools that could be causing it.

The typical procedure for debugging high X cpu issues is to ssh into the sick machine and start killing processes. Given the eclipse crash in libgdk-x11, I'd look for any remaining eclipse processes or anything related to gdk-x11; this could include gnome services for instance. The program 'xrestop' might give some ideas for other apps to try killing (it reports resource memory usage, not processor usage, so your perpetrator may not necessarily show up there at all.)

affects: xorg (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Revision history for this message
Matthew General (mattgen88) wrote :

Logged into Gnome-Shell as Guest user, same problem. I was pretty much just using firefox. It locked up, mouse would move, nothing would respond.

I'll continue to see if I can find a culprit. Attached was the output of top -b -n 1, dmesg, and ps aux.

This has been frustrating and the worst experience with Ubuntu to date. I wish I could figure out what the problem is.

Revision history for this message
Matthew General (mattgen88) wrote :

[ 5404.795911] NVRM: GPU at 0000:03:00.0 has fallen off the bus.
[ 5404.795922] NVRM: os_pci_init_handle: invalid context!
[ 5404.795925] NVRM: os_pci_init_handle: invalid context!
[ 5404.795949] NVRM: os_pci_init_handle: invalid context!
[ 5404.795956] NVRM: os_pci_init_handle: invalid context!
[ 5404.795958] NVRM: os_pci_init_handle: invalid context!
[ 5405.354474] init: lightdm main process (1309) terminated with status 1
[ 5420.630318] init: failsafe-x main process (6977) terminated with status 1

Still occurring, fully patched and fully reinstalled. I had the eclipse message happen before this one with a session log out. Logged back in, kept working and then it seemed to have crashed the Xorg process. I sshed in and looked and no Xorg was running, top showed normal idle cpu. Nothing out of the ordinary.

Revision history for this message
Matthew General (mattgen88) wrote :

After official release, bug still prevalent. Gnome classic no effects offers most stable experience. Gnome shell is most volatile and unity 3d still affected.
Gnome-shell locked up on me this morning, almost immediately. I had to hard reset.
Unity 3d crashes the session, forcing me to log back in.

Revision history for this message
Matthew General (mattgen88) wrote :

I disabled all nvidia drivers and have had the stability I expected.

Work around:
system settings -> additional drivers -> remove all nvidia drivers in use

Revision history for this message
Paul Maidment (paulmaidmentuk) wrote :

Removal of NVidia drivers did not work for me, still getting periodic crashes.

Revision history for this message
Matthew General (mattgen88) wrote :

I've since switched back to Arch Linux, but I ran into the same problem. It is a problem with the nvidia drivers. What you can do is install nouveau drivers and see if that helps. This may lead you on the right path http://nouveau.freedesktop.org/wiki/UbuntuPackages

It is unfortunate that this driver made it into 12.04 with such a serious problem. You might want to try downgrading to the 11.10 driver and see if that does any good. But I imagine that it might be dependency hell.

Revision history for this message
Christiaan (anotherhero) wrote :

I'm experiencing the same problems. In my syslog is the following line that indicates the freezes and lockups.
[ 8311.407607] eclipse[2315]: segfault at 18 ip 00007feca3e6c30e sp 00007fff1072ebd0 er ror 4 in libgdk-x11-2.0.so.0.2400.10[7feca3dfa000+ad000]

However I don't even have a Nvidia card I have an old ATI intergrated graphics card on my mobo that is using the opensource drivers for ATI cards.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Mess (michael-michaelmess) wrote :

With current Ubuntu 12.04 I am still getting

[31161.506308] NVRM: os_pci_init_handle: invalid context!
[31161.506313] NVRM: os_pci_init_handle: invalid context!
[31161.506324] NVRM: os_map_kernel_space: can't map 0xd0000000, invalid context!
[31161.506328] NVRM: os_pci_init_handle: invalid context!
[33531.507648] NVRM: os_pci_init_handle: invalid context!
[33531.507652] NVRM: os_pci_init_handle: invalid context!
[33531.507660] NVRM: os_map_kernel_space: can't map 0xd0000000, invalid context!
[33531.507662] NVRM: os_pci_init_handle: invalid context!

in the dmesg log and the system sometimes freezes for some seconds or behaves strange.

This often happens when playing video with the flash plugin.
It may happen more likey when opening more browser tabs and playing video.

As a crash described in bug #973096 didn't hit me again for some time now, I think that that might be fixed, but this problem described here still exists.

Thus I think the duplicate state is wrong.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

But the duplicate state still seems to be right regarding the crashes.

I think that this ticket covers issues caused by multiple bugs.

To post a comment you must log in.