Comment 32 for bug 1026777

Revision history for this message
Lasse Makholm (lasse-makholm) wrote :

Those of you who are seeing similar problems; could you try to get a core dump and a full stack trace?

Here's how I managed to do it:

1. Prevent X from trapping SIGSEGV by putting the following in /usr/share/X11/xorg.conf.d/00-no-trap-signals.conf:

Section "ServerFlags"
 Option "NoTrapSignals" "true"
EndSection

2. Tell X to dump core by adding the following to the [SeatDefaults] section of /etc/lightdm.conf:

xserver-command=X -core

3. Make sure the X is allowed to dump core:
 - log out from your session
 - switch to another VT (ctrl-alt-f1)
 - sudo stop lightdm
 - ulimit -c unlimited
 - sudo lightdm

4. Check that the changes kicked in:
$ ps -fp $(pidof X)
UID PID PPID C STIME TTY TIME CMD
root 16043 6885 1 08:44 tty7 00:01:34 /usr/bin/X -core :7 -auth /var/run/lightdm/root/:7 -nolisten tcp vt7 -novtswitch
$ cat /proc/$(pidof X)/limits | grep core
Max core file size unlimited unlimited bytes
$

5. Switch back to VT7, log in and wait for X to crash again.

6. To get meaningful stacktraces, you'll want debug symbols installed for X and friends (adjust for different video drivers):

sudo apt-get install libc6-dbg xserver-xorg-core-dbg xserver-xorg-video-intel-dbg

7. If/when X crashes, check for /etc/X11/core. If it exists, copy it to your home dir and run:

gdb /usr/bin/Xorg core

8. In gdb, say "bt full" to get a stacktrace.