[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#297985: xserver-xfree86: X server crashes when compiling a program from gnat-gps



(CC'ing Helge Lenz the original reporter)

I have been able to create a core file with the debugging version of
the X server by using kill -SEGV, as Branden Robinson described.  Then
I tried to reproduce the problem with gnat-gps, and no core file is
created.  The X server exits as though gnat-gps were sending a
Ctrl+Alt+Backspace to it.  This then sends a SIGPIPE to gnat-gps,
which crashes.  Is it possible for a client program to cause the X
server to shut down?  If so, what kind of X request should I look for
in gnat-gps?

Here is additional information on how to debug gnat-gps.  Switch to a
text console (e.g. VT1), login as yourself, and do:

$ apt-get install gnat-gdb
$ apt-get source gnat-gps
$ cd gnat-gps-2.1.0
$ dpkg-buildpackage -rfakeroot
(takes ~1h on my Pentium III 900 MHz)
$ cd glide/obj
$ gnatgdb gnat-gps
(gdb) set env DISPLAY=:0
(gdb) break commands-builder.adb:207
(gdb) run

Swith to the X console (VT7 by default).  After loading sdc.gpr, press
F4.  Switch back to VT1 where GDB is running, and take it from there.
At one point, the X server exits but gnat-gps keeps on running in GDB.
In my previous experience, this happens while gnat-gps is in one of
the GNAT.Expect.Expect procedures.  Later on, gnat-gps receives
SIGPIPE because the X server is down.

Also, it is possible to attach GDB to the X server itself.  In a text
console, login as root and:

# ps -u root | grep XFree86-debug
(look at the PID of the X server)
# gdb /usr/bin/XFree86-debug
(gdb) attach <pid-of-X-server>

I have not yet had time to go further than this.  I would need to
install the sources to the X server, possibly rebuild it, and try to
find the exit point, i.e. what was XFree86 thinking when it shut down?

-- 
Ludovic Brenta.




Reply to: