Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.system > #230

Re: gdb core: only partial symbol data??

From Gorlash <dan.miller.x23@gmail.com>
Newsgroups comp.os.linux.development.system
Subject Re: gdb core: only partial symbol data??
Date 2011-07-19 09:51 -0700
Organization http://groups.google.com
Message-ID <88ffbc6f-15f7-4a0d-9c84-966be99cd60d@p29g2000pre.googlegroups.com> (permalink)
References <f7371591-42d5-477e-a72d-f35895bf9937@r28g2000prb.googlegroups.com> <878vrus0e2.fsf@araminta.anjou.terraraq.org.uk>

Show all headers | View raw


On Jul 19, 9:25 am, Richard Kettlewell <r...@greenend.org.uk> wrote:
> Gorlash <dan.miller....@gmail.com> writes:
> > I'm trying to debug a segfault in a multi-threaded daemon.  I've
> > managed to generate a coredump file and am examining it.  The name of
> > the daemon is 'grunion', so I ran
> > # sudo gdb grunion core
> > followed by 'bt', and I get:
> > Reading symbols from /home/systest/ip3/daemons/grunion...done.
> > [New Thread 2591]
> > [New Thread 2587]
> > [New Thread 2588]
> > [New Thread 2589]
> > [New Thread 2590]
>
> > warning: Can't read pathname for load map: Input/output error.
> > Core was generated by `./grunion'.
> > Program terminated with signal 11, Segmentation fault.
> > #0  0x007f0fb6 in ?? () from /lib/libc.so.6
> > (gdb) bt
> > #0  0x007f0fb6 in ?? () from /lib/libc.so.6
> > #1  0x087edc68 in ?? ()
> > #2  0x08050b12 in read_remote_stati_solo (target=142446600,
> > xptr=0x87f00d0 "",
> >    rlength=<value optimized out>) at grun_tcp.cpp:274
> > #3  0x00000000 in ?? ()
>
> > Notice that line #1 does not appear to have a known symbol name, yet
> > grun_tcp.cpp line 274 is:
> >    result = request_one_status_direct(&gmsg, rptr, BUFFER_LENGTH,
> > xptr) ;
> > which is in one of the other source files for this utility; they were
> > all compiled with -g, and the source files are all in the current
> > directory where I am running gdb.
>
> > So I don't understand why the symbol name for line #2 would be known,
> > but line #1 would not be???
> > And what is the "load map" that it complained about above?  I thought
> > the symbol information was included in the .elf file?  What don't I
> > understand about this??
>
> Optimization often screws up debugging - rebuild your program with -O0.
> You might want to run against a debug version of libc too.
>
> --http://www.greenend.org.uk/rjk/

Okay, let me try that... I had previously tried with optimizations
off, but found that the problem occurred less frequently, so I'd left
it in to keep the crashes coming until I could find them!

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

gdb core: only partial symbol data?? Gorlash <dan.miller.x23@gmail.com> - 2011-07-19 08:48 -0700
  Re: gdb core: only partial symbol data?? Richard Kettlewell <rjk@greenend.org.uk> - 2011-07-19 17:25 +0100
    Re: gdb core: only partial symbol data?? Gorlash <dan.miller.x23@gmail.com> - 2011-07-19 09:51 -0700
      Re: gdb core: only partial symbol data?? Gorlash <dan.miller.x23@gmail.com> - 2011-07-19 10:07 -0700

csiph-web