Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
To: Dan Kegel <dkegel@ixiacom.com>
Cc: gdb@sources.redhat.com
Subject: Re: Crash in gdbserver on ppc405 - what vintage of libthread_db is recommended?
Date: Sat, 13 Jul 2002 15:24:00 -0000	[thread overview]
Message-ID: <20020713172422.A30747@crack.them.org> (raw)
In-Reply-To: <3D30B11B.5070005@ixiacom.com>; from dkegel@ixiacom.com on Sat, Jul 13, 2002 at 04:00:43PM -0700

I'll reiterate - I have about 99% confidence that your crash comes from
mismatched host and target libraries.  This is far and away the most
frequent cause of problems, since libthread_db is not at all capable of
handling errors in mismatched symbol lookup.

I'm still trying to figure out ways to detect this.  I'm almost leaning
towards using libelf or a simple clone to take checksums of on-disk
.text sections...

On Sat, Jul 13, 2002 at 04:00:43PM -0700, Dan Kegel wrote:
> I tried gdbserver on the ppc405 on a large multithreaded C++ program
> compiled with g++3.0.2 or so.  All I did was 'break main'
> and 'cont', and gdbserver crashed.  So I updated to last week's
> snapshot (ftp://sources.redhat.com/pub/gdb/snapshots/current/gdb+dejagnu-weekly-CVS-20020709.tar.bz2),
> built gdbserver for debugging, and reproduced the problem while debugging
> gdbserver.  Here's what popped up.  Looks like the call to
> td_ta_thr_iter is bombing.  I'm using the libthread_db from Hard Hat 2.0,
> dated about a year ago; perhaps I need to use a newer version?
> Or is gdbserver itself misbehaving?
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x10008844 in linux_read_memory (memaddr=1275058749, myaddr=0x7fefeda8 "",
>      len=2094805880) at ../../../src/gdb/gdbserver/linux-low.c:1153
> 1153        = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
> (gdb) bt
> #0  0x10008844 in linux_read_memory (memaddr=1275058749, myaddr=0x7fefeda8 "",
>      len=2094805880) at ../../../src/gdb/gdbserver/linux-low.c:1153
> #1  0x10005494 in read_inferior_memory (memaddr=1275058749, myaddr=0x7fefeda8 "",
>      len=2094805880) at ../../../src/gdb/gdbserver/target.c:63
> #2  0x10009740 in ps_pdread (ph=0x1001c850, addr=1275058749, buf=0x7fefeda8,
>      size=2094805880) at ../../../src/gdb/gdbserver/proc-service.c:112
> #3  0x0ffdd000 in td_thr_setgregs () from /lib/libthread_db.so.1
> #4  0x0ffdd1c4 in td_thr_tsd () from /lib/libthread_db.so.1
> #5  0x1000958c in thread_db_find_new_threads ()
>      at ../../../src/gdb/gdbserver/thread-db.c:308
> #6  0x10009650 in thread_db_init () at ../../../src/gdb/gdbserver/thread-db.c:334
> #7  0x10008bb8 in linux_look_up_symbols () at ../../../src/gdb/gdbserver/linux-low.c:1226
> #8  0x10003ef4 in handle_query (own_buf=0x1001eee8 "qSymbol::")
>      at ../../../src/gdb/gdbserver/server.c:71
> #9  0x100042e8 in main (argc=3, argv=0x7ffffe84)
>      at ../../../src/gdb/gdbserver/server.c:192
> #10 0x0feb0dbc in ngettext () from /lib/libc.so.6
> (gdb)
> 

-- 
Daniel Jacobowitz                           Debian GNU/Linux Developer
MontaVista Software                         Carnegie Mellon University


  reply	other threads:[~2002-07-13 22:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13 15:17 Dan Kegel
2002-07-13 15:24 ` Daniel Jacobowitz [this message]
2002-07-15 17:33   ` Dan Kegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020713172422.A30747@crack.them.org \
    --to=dmj+@andrew.cmu.edu \
    --cc=dkegel@ixiacom.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox