Xorg crashes after GDM when switching users

Bug #502237 reported by Alen on 2010-01-02
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-180 (Ubuntu)

Bug Description

In Karmic, when switching users (via indicator applet) xserver crashes after GDM.
Steps to reproduce (it only happens from time to time): login user A, switch users, login user B. Repeat the switching a couple of times and after selecting a user on the GDM screen, entering pass and clicking the login button, xsplash appears briefly, then a couple of seconds black screen (a lot of disk activity, probably apps from user A crashing), and then GDM appears again with session from user A lost.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
Date: Sat Jan 2 06:20:14 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/Xorg
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
NonfreeKernelModules: nvidia
Package: xserver-xorg-core 2:1.6.4-2ubuntu4 [modified: usr/lib/xorg/modules/extensions/libglx.so]
ProcCmdLine: root=UUID=8e739a7b-07e8-402c-8dcc-ef3225d43f0c ro quiet splash rootdelay=15
ProcCmdline: /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-odprof/database -nolisten tcp
 PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic-pae
 xserver-xorg 1:7.4+3ubuntu10
 libgl1-mesa-glx 7.6.0-1ubuntu4
 libdrm2 2.4.14-1ubuntu1
 xserver-xorg-video-intel 2:2.9.0-1ubuntu2
 xserver-xorg-video-ati 1:6.12.99+git20090929.7968e1fb-0ubuntu1
 Segfault happened at: 0x80f95fc: movzwl 0x10(%eax),%eax
 PC (0x080f95fc) ok
 source "0x10(%eax)" (0x0000001d) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: xorg-server
 ?? ()
 ?? ()
 ?? () from /usr/lib/xorg/modules/drivers//nvidia_drv.so
Title: Xorg crashed with SIGSEGV
Uname: Linux 2.6.31-16-generic-pae i686

dmi.bios.date: 09/08/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P1.20
dmi.board.name: A770DE+
dmi.board.vendor: ASRock
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.20:bd09/08/2009:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnA770DE+:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To Be Filled By O.E.M.
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: To Be Filled By O.E.M.
fglrx: Not loaded
 distro: Ubuntu
 architecture: i686kernel: 2.6.31-16-generic-pae

Alen (cshadow) wrote :

StacktraceTop:?? ()
?? ()
?? () from /usr/lib/xorg/modules/drivers//nvidia_drv.so

tags: added: apport-failed-retrace
tags: removed: need-i386-retrace
Alen (cshadow) on 2010-01-02
visibility: private → public
Eddie Hung (eddieh) wrote :

I get a crash as soon as I click Switch User, which would normally launch another gdm; after which I am often returned to my original session.

Alen (cshadow) wrote :

I found today another feature: two users logged on, user A clicked "Switch User", GDM appears, selected user B, entered pass, clicked ok and got returned to the same session, the one of user A :-)
Tried the same again and this time session from user B crashed and got thrown back to GDM.
Logged user B, switched back to A, tried switching back to B, and again got returned to user A. Returning to the same session after GDM seems to be working, the problem is switching to other users.
And yes, I have to be very, very careful not to leave some applications runnning when switching users because xorg crashes on returning to that session. Mplayer, opengl apps, even flash in browser all greatly increase the chance of a crash.
Had similar problem on 9.04, but there I blamed for this the fast-user-switch-applet and skipped from 8.10 directly to 9.10. And here it is again, cannot switch users. Ubuntu 8.10 works fine, tried all available nvidia drivers, it has to be some xorg based bug/feature.

Bryce Harrington (bryce) on 2010-02-17
affects: xorg-server (Ubuntu) → nvidia-graphics-drivers-180 (Ubuntu)
Eddie Hung (eddieh) wrote :

Changing package is a negative. I have this problem on an Intel DG45ID motherboard with integrated X4500HD graphics.

Alen (cshadow) wrote :

I did a backtrace with my laptop connected via SSH, could this help?

Bryce Harrington (bryce) wrote :

Hi Alen, looks like it's some sort of memcpy issue, perhaps a bounds error. Unfortunately the most interesting parameters got optimized out there so can't see exactly how it's failing.

       if (!upsidedown)
            for (i = 0; i < height; i++)
                MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);

If you're comfortable coding C and compiling xorg-server, the next step would be to add more debugging around this chunk of code to see what variable is triggering the error. Not sure if this can be done in gdb or if it'd need to write to a log. valgrind might help too.

@Eddie, unless you can prove it is exactly the same crash (i.e. identical backtrace), I would rather treat this as an -nvidia bug. -nvidia replaces a huge amount of the X core with its own stuff, and more often than not causes weird random issues.

Alen (cshadow) wrote :

Bryce, thank you for taking time and looking into this bug.
Unfortunately, my knowledge of C and xorg is not sufficient to even start working on this (have not touched C since college). I guess I could compile (perhaps without optimizations?) and test, but after downloading a source code and finding this particular function I have no idea what it is all about :-)
Should I report this bug to bugs.freedesktop.org?

Bryce Harrington (bryce) on 2010-03-18
tags: added: karmic
Alen (cshadow) wrote :

Same problem in lucid.
I think this bug could be a duplicate of 343265 (similar backtrace) and that it is solved. Although wasn't able to get the same backtrace in lucid but the crashes are there.
This piece of code from karmic gdb backtrace was helpful:
Program received signal SIGSEGV, Segmentation fault.
0x080f95fc in xf86CursorSetCursor (pDev=0xa33d258, pScreen=0xa1c7458, pCurs=0xa90a190, x=1, y=0)

Searching on freedesktop it seems to have been solved in april:

I installed xorg 1.8.1 (it has this patch) from and nvidia 195.36.24 from xorg-edgers ppa and no more crashes switching users/VTs. After 2 days on lucid, 2 users and numerous switches, not even one crash. Will continue testing, hopefully if would not crash again :-)
Could anyone review the above info and adjust the tags: xorg, not nvidia bug and the duplicate status, if applicable?
I had the same problem since ubuntu 9.04, with all vesions of nvidia and xorg available at the time (maybe bug introduced after xorg 1.5?), but not always the same backtrace, so then reported as #406965, Bug #579874.

Bill Smith (bsmith1051) wrote :

This bug still happens on Ubuntu 10.10 with the 'recommended' Nvidia blob.

I am at vacation and will be back July 11. I will read e-mails, but not regularly.

For replication and utilities issues, contact Luis Soares. For other issues, contact Lars Thalmann.

Bryce Harrington (bryce) on 2012-03-21
Changed in nvidia-graphics-drivers-180 (Ubuntu):
importance: Undecided → High
status: New → Triaged
To post a comment you must log in.