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

Bug#213286: xDebian Bug report logs - #213286

On Fri, Nov 14, 2003 at 02:03:07PM -0600, Garcia, Daniel wrote:
> I was able to get the core file the way you said. Its's attached. 
> I ran xemacs21 to produce the error. emacs21 produces the same error
> but does not seg-fault, it launches with BLOCKS for the body text.
> I would like to help fix this but don't know where to start. Could
> you point me in the right direction?

Mr. Garcia,

It's far more helpful if you get a backtrace with a debugger than to
mail a core dump to a Debian bug, which just consumes space on the
machine that hosts our Bug Tracking System.

Here's an example of how to get a useful backtrace:

First, let's start a program that we want to debug.  I have the
libc6-dbg package installed, so I have debugging libraries installed in

    [0] branden@redwald:/tmp/branden % LD_LIBRARY_PATH=/usr/lib/debug sleep 600 &
    [1] 15741

Excellent.  Now, let's simulate a segfault.  You won't have to do this
step in your case, as xemacs21 seems to have no trouble crashing on its

    [0] branden@redwald:/tmp/branden % kill -SEGV 15741
    [0] branden@redwald:/tmp/branden %
    [1]  + segmentation fault (core dumped)  LD_LIBRARY_PATH=/usr/lib/debug sleep 600

Now let's launch GDB and tell it to look at the program we ran, plus the
core dump just generated.

    [0] branden@redwald:/tmp/branden % gdb $(which sleep) core
    GNU gdb 6.0-debian
    Copyright 2003 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "powerpc-linux"...(no debugging symbols found)...
    Core was generated by `sleep 600'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /usr/lib/debug/libm.so.6...done.
    Loaded symbols for /usr/lib/debug/libm.so.6
    Reading symbols from /usr/lib/debug/librt.so.1...done.
    Loaded symbols for /usr/lib/debug/librt.so.1
    Reading symbols from /usr/lib/debug/libc.so.6...done.
    Loaded symbols for /usr/lib/debug/libc.so.6
    Reading symbols from /usr/lib/debug/libpthread.so.0...done.
    Loaded symbols for /usr/lib/debug/libpthread.so.0
    Reading symbols from /lib/ld.so.1...done.
    Loaded symbols for /lib/ld.so.1
    #0  0x0fe88738 in nanosleep () at ctype.h:35
    35      ctype.h: No such file or directory.
            in ctype.h

Okay, now let's ask GDB for a backtrace.

    (gdb) bt
    #0  0x0fe88738 in nanosleep () at ctype.h:35
    #1  0x1000214c in ?? ()

Backtraces of X clients will typically much longer.  Anyway, we're done
with the debugger now.

    (gdb) quit
    [0] branden@redwald:/tmp/branden %

All done!

Please mail this bug all the output of the GDB command when you apply
the above procedure to your coredump.

G. Branden Robinson                |    America is at that awkward stage.
Debian GNU/Linux                   |    It's too late to work within the
branden@debian.org                 |    system, but too early to shoot the
http://people.debian.org/~branden/ |    bastards.           -- Claire Wolfe

Attachment: signature.asc
Description: Digital signature

Reply to: