From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: ajloft@umich.edu
Cc: gdb@sourceware.org
Subject: Re: "Cannot find new threads" on Fedora 9, but not on CentOS 5 (?)
Date: Sat, 01 Nov 2008 06:47:00 -0000 [thread overview]
Message-ID: <8ac60eac0810312346l638f3011n66d7681444329486@mail.gmail.com> (raw)
In-Reply-To: <490BBEF4.1040801@gmail.com>
On Fri, Oct 31, 2008 at 7:29 PM, Andrew Lofthouse <loftyhauser@gmail.com> wrote:
> Last night I tried to follow your example and try to debug gdb, but to do
> so, I would have to replicate my earlier problem, but I was unable to do so
> (meaning, gdb did not have any problems following the new threads, or
> finding libpthread symbols). I thought this was because I had explicitly
> linked with -pthread previously. I rebooted, rebuilt, and was still unable
> to replicate the problem. I re-installed Fedora 9 from scratch, and I'm
> still unable to replicate it. I have no idea what changed.
Don't you just hate that?
One thing that may have changed is prelink addresses --
IIRC, Fedora runs prelink at 2 week intervals.
You may want to try:
/usr/sbin/prelink -a
gdb ...
several times, and see if one particular randomized layout
triggers the bug again.
> Ubuntu 8.04, however, still gives a "cannot find new threads: generic error"
> when not explicitly linking to libpthread.
Are you running a 64-bit kernel perchance?
There is a known kernel bug related to ptrace()ing 32-bit processes,
and it sounds from your trace that that might be what you are hitting.
> So, the following comes from
> Ubuntu. Unfortunately, I cannot find any debug symbols for gdb for Ubuntu
> (Fedora seems to have them).
It's worse: your GDB has been stripped :(
> For what it's worth:
>
> ==> andrew@ubuntu-vm ~/codes/ufs Fri Oct 31 22:17:01
> 532 $ gdb -ex 'set prompt (top) ' --args gdb /usr/local/bin/ufs2oogl2D
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (no debugging symbols found)
> (top) rbreak throw_
> Breakpoint 1 at 0x8132024
> <function, no debug info> throw_exception;
> Breakpoint 2 at 0x8132136
> <function, no debug info> throw_error;
> Breakpoint 3 at 0x8132158
> <function, no debug info> throw_vfatal;
> Breakpoint 4 at 0x8132176
> <function, no debug info> throw_verror;
> Breakpoint 5 at 0x8132196
> <function, no debug info> deprecated_throw_reason;
> (top) run
> Starting program: /usr/bin/gdb /usr/local/bin/ufs2oogl2D
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb7d396b0 (LWP 31952)]
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) set verbose on
> (gdb) run -T "rho" < UAM10_002_UFS-005000.sim > test.plt
> Starting program: /usr/local/bin/ufs2oogl2D -T "rho" <
> UAM10_002_UFS-005000.sim > test.plt
> Reading symbols from /lib/ld-linux.so.2...Reading symbols from
> /usr/lib/debug/lib/ld-2.7.so...done.
> done.
> Reading symbols from system-supplied DSO at 0xb7f0e000...done.
> Reading symbols from /usr/local/lib/libufs2D-0.9.so.2...done.
> Reading symbols from /usr/local/lib/libgts-0.7.so.5...done.
> Reading symbols from /usr/lib/libgmodule-2.0.so.0...Reading symbols from
> /usr/lib/debug/usr/lib/libgmodule-2.0.so.0.1600.6...done.
> done.
> Reading symbols from /usr/lib/debug/libdl.so.2...done.
> Reading symbols from /usr/lib/libglib-2.0.so.0...Reading symbols from
> /usr/lib/debug/usr/lib/libglib-2.0.so.0.1600.6...done.
> done.
> Reading symbols from /usr/lib/debug/libm.so.6...done.
> Reading symbols from /usr/lib/debug/libc.so.6...done.
> Reading symbols from /usr/lib/libpcre.so.3...Reading symbols from
> /usr/lib/debug/usr/lib/libpcre.so.3.12.1...done.
> done.
>
> Detaching after fork from child process 31962.
> Reading symbols from /tmp/gfs2O2C03...done.
> Reading symbols from /usr/lib/libgthread-2.0.so.0...Reading symbols from
> /usr/lib/debug/usr/lib/libgthread-2.0.so.0.1600.6...done.
> done.
> Reading symbols from /usr/lib/debug/librt.so.1...done.
> Reading symbols from /usr/lib/debug/libpthread.so.0...done.
> [Thread debugging using libthread_db enabled]
> [Switching to Thread 0xb7d396b0 (LWP 31952)]
>
> Breakpoint 4, 0x08132176 in throw_verror ()
> (top) where
> #0 0x08132176 in throw_verror ()
> #1 0x0808f403 in error ()
> #2 0x080a2580 in ?? ()
> #3 0x080a3d4e in check_for_thread_db ()
> #4 0x0808782f in ?? ()
> #5 0x08087987 in observer_notify_new_objfile ()
> #6 0x08119aaa in ?? ()
> #7 0x0809aad0 in ?? ()
> #8 0x08132393 in catch_errors ()
> #9 0x0809a69c in solib_read_symbols ()
> #10 0x0809b062 in solib_add ()
> #11 0x081284eb in handle_inferior_event ()
> #12 0x08129f77 in wait_for_inferior ()
> #13 0x0812a147 in proceed ()
> #14 0x08124dc3 in ?? ()
> #15 0x0808b531 in execute_command ()
> #16 0x08135dff in ?? ()
> #17 0x08136b53 in ?? ()
> #18 0xb7f27962 in rl_callback_read_char () from /lib/libreadline.so.5
> #19 0x08135fcb in ?? ()
> #20 0x0813594e in ?? ()
> ---Type <return> to continue, or q <return> to quit---
> #21 0x08134d90 in ?? ()
> #22 0x08135630 in gdb_do_one_event ()
> #23 0x08132393 in catch_errors ()
> #24 0x080d63c4 in ?? ()
> #25 0x0813299f in current_interp_command_loop ()
> #26 0x0808330b in ?? ()
> #27 0x08132393 in catch_errors ()
> #28 0x08083c0c in ?? ()
> #29 0x08132393 in catch_errors ()
> #30 0x080832f1 in gdb_main ()
> #31 0x080832b5 in main ()
> (top)
>
>
> If I have some more time, I'll see what else I can do.
You may want to build GDB from sources (either 6.8, or better
yet CVS head) on Ubuntu. Then we'll at least have a complete
stack trace.
> But, I do at least have a work-around...
Yes, but we still don't know if there is a GDB bug hiding underneath ...
Cheers,
--
Paul Pluzhnikov
next prev parent reply other threads:[~2008-11-01 6:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 0:25 Andrew Lofthouse
2008-10-28 0:42 ` Paul Pluzhnikov
[not found] ` <4906615E.50606@gmail.com>
[not found] ` <8ac60eac0810271836saf8c28pb1392b77c7926be0@mail.gmail.com>
2008-10-29 1:16 ` Andrew Lofthouse
2008-10-29 1:52 ` Daniel Jacobowitz
2008-10-29 2:21 ` Paul Pluzhnikov
2008-10-30 1:11 ` Andrew Lofthouse
2008-10-30 1:30 ` Paul Pluzhnikov
2008-11-01 2:30 ` Andrew Lofthouse
2008-11-01 6:47 ` Paul Pluzhnikov [this message]
2008-11-01 15:29 ` Andrew Lofthouse
2008-11-01 21:41 ` Paul Pluzhnikov
2008-11-02 12:54 ` Andrew Lofthouse
2008-11-04 0:50 ` Tom Tromey
2008-12-12 22:50 ` Tom Tromey
2008-12-12 23:04 ` Daniel Jacobowitz
2008-12-12 23:30 ` Tom Tromey
2008-12-18 19:36 ` Michael Snyder
2008-12-12 23:06 ` Paul Pluzhnikov
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=8ac60eac0810312346l638f3011n66d7681444329486@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=ajloft@umich.edu \
--cc=gdb@sourceware.org \
/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