xorg.conf plus emacs causes abrupt logout via Xorg SEGV

Bug #930350 reported by Michael Bloom
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is in 11.10, but also occurred in 10.10

With nvidia-current (280.x) installed:

If there is no xorg.conf, everything is fine. It takes Xorg longer to start up, because it has to load extra drivers (before unloading all but the nvidia driver), but the problem being reported does not occur.

But if one creates an xorg.conf (whether with nvidia-xconfig or nvidia-settings, or just by hand), there is a severe stability problem.

Immediately upon starting emacs, the Xorg started using that xorg.conf dies with a segmentation fault, causing an abrupt logout.

This is not limited to emacs. The same thing happens when starting VirtualBox. Presumably other programs can trigger the SEGV.

To reproduce the problem, you just need to be running an Xorg that was started using an xorg.conf that loads the nvidia-current driver(or a related one from the nvidia-260 to nvidia-290 family) and type "emacs" from a bash prompt.

As stated above, the problem only occurs when there is an xorg.conf file. If the same driver is instead loaded via Xorg's heuristics because there was no xorg.conf, then Xorg does not incur the SEGV when emacs starts.

The problem does not appear to occur with the legacy "nvidia-96" driver still supplied for old GPU's. I do not know whether it occurs with the legacy nvidia-173 driver. I've reproduced it with every incarnation of nvidia-current since nvidia-260.

If one had to guess, something used by nvidia-current is accidentally uninitialized, but when there is no xorg.conf, xorg loads many other drivers (and then unloads all but "the best choice" during startup) and one of those other drivers happens to initialize that "something".

apt-cache policy nvidia-current
nvidia-current:
  Installed: 280.13-0ubuntu6
  Candidate: 280.13-0ubuntu6
  Version table:
 *** 280.13-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/restricted i386 Packages
        100 /
-----------------------------------------------------------------------------------------------------------------------
The attachment contains an xorg.conf created by nvidia-settings. When that (or ANY!) conf was in use, emacs triggered a segmentation violation, as shown in the file "Xorg.0.log-SEGV".

Looking at the file: Xorg.0.log, note that without being told what to do by an xorg.conf, Xorg loaded, in sequence, the six modules:

[ 6529.541] (II) LoadModule: "nvidia"
[ 6529.541] (II) LoadModule: "nouveau"
[ 6529.542] (II) LoadModule: "nv"
[ 6529.542] (II) LoadModule: "vesa"
[ 6529.543] (II) LoadModule: "fbdev"
[ 6529.545] (II) LoadModule: "fbdevhw"

and then unloaded in sequence the five modules

[ 6529.541] (II) LoadModule: "nouveau"
[ 6529.542] (II) LoadModule: "nv"
[ 6529.542] (II) LoadModule: "vesa"
[ 6529.543] (II) LoadModule: "fbdev"
[ 6529.545] (II) LoadModule: "fbdevhw"

So that the only one of the original six that remained was "nvidia".

It seems a reasonable hypothesis that one of the other five modules performed an initialization that "nvidia" should have performed, but did not, and without that initialization having taken place in the instance of Xorg which had an xorg.conf, when emacs exercised a code path which involved the uninitialized item, the SEGV ensued.

Revision history for this message
Michael Bloom (mabloom) wrote :
Revision history for this message
greg m (gregm) wrote :

I had the same problem in 12.04. I was able to resolve it by removing xfs from the font path in xorg.conf.

# FontPath "unix/:7100"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/Type1"

This may be related to bug #738526.

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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