From: Doug Evans <dje@google.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Michael Snyder <msnyder@vmware.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux
Date: Thu, 16 Jul 2009 02:42:00 -0000 [thread overview]
Message-ID: <e394668d0907151825t12283c66rc1856a242d50332a@mail.gmail.com> (raw)
In-Reply-To: <8ac60eac0906221321r45c43a13g87a830f8dd3487ea@mail.gmail.com>
On Mon, Jun 22, 2009 at 1:21 PM, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:
> On Mon, Jun 22, 2009 at 11:09 AM, Michael Snyder<msnyder@vmware.com> wrote:
>
>> Have you, or could you, run regression testing in i686?
>
> This is glibc-version related, rather than x86_64 vs. i686:
>
> Using glibc-2.7: "runtest gdb.threads/staticthreads.exp" gives:
>
> # of expected passes 8
> # of known failures 1
>
> in both i686 and x86_64 modes.
>
> But using glibc-2.3.6 (which is my target):
>
> FAIL: gdb.threads/staticthreads.exp: running to main in runto
> FAIL: gdb.threads/staticthreads.exp: Continue to main's call of sem_post
> FAIL: gdb.threads/staticthreads.exp: handle SIG32 helps
>
> === gdb Summary ===
>
> # of expected passes 6
> # of unexpected failures 3
> # of known failures 1
>
> again in both i686 and x86_64 modes.
>
> Thanks,
> --
> Paul Pluzhnikov
>
I looked into this a bit.
I think(!) this is the glibc patch that fixes things.
2007-05-16 Roland McGrath <roland@redhat.com>
* td_ta_thr_iter.c (iterate_thread_list): Make FAKE_EMPTY bool.
Use th_unique=0 in fake descriptor before initialization.
Regardless, this is indeed glibc specific, and older glibcs fail while
newer ones pass.
I like the patch. If thread enumeration fails during
try_thread_db_load_1 we ignore it and leave gdb to try again later.
When we get to this point we've already verified libthread_db is
(mostly) happy.
I kinda wonder, though, if that works then maybe gdb shouldn't do
thread enumeration at all here.
Running the testcase with --target_board=native-gdbserver doesn't have
this problem. Some research as to what gdbserver is doing would be
illuminating. "consistency is good": can you research what's
happening in gdbserver that it works there, and see if it's reasonable
to do the same thing in gdb?
[digression: GDB does use glibc's support for determining the glibc
version, but here we want the glibc version of libthread_db so that's
out. Hmmm, though it looks like the existing use of
gnu_get_libc_version is to get the libthread_db version which can be
different now that we have libthread-db-search-path. ... This seems
like a problem, though in practice I suspect it's ok. [grep for
gnu_get_libc_version in linux-thread-db.c]]
I think a comment needs to be added to your patch, probably to the
call site of thread_db_find_new_threads_silently, that thoroughly
explains what's going on (assuming that's still the best solution).
btw, the reason for the 1 known failure is, I'm guessing, because gdb
was built with the same toolchain that uses the older glibc, but the
test was run using a native toolchain that uses a newer glibc and the
mismatch is sufficient to trigger the failure. At least that explains
things in my sandbox. If I rebuild gdb with native gcc, or set
libthread-db-search-path to find the newer glibc, the kfail goes away.
next prev parent reply other threads:[~2009-07-16 1:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 22:22 Paul Pluzhnikov
2009-06-15 18:39 ` Paul Pluzhnikov
2009-06-22 16:10 ` Paul Pluzhnikov
2009-06-22 18:10 ` Michael Snyder
2009-06-22 20:21 ` Paul Pluzhnikov
2009-06-29 14:36 ` Paul Pluzhnikov
2009-07-09 6:36 ` Paul Pluzhnikov
2009-07-16 2:42 ` Doug Evans [this message]
2009-07-16 2:43 ` Doug Evans
2009-07-16 20:45 ` Paul Pluzhnikov
2009-07-16 20:54 ` Paul Pluzhnikov
2009-07-16 21:16 ` Doug Evans
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=e394668d0907151825t12283c66rc1856a242d50332a@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
--cc=ppluzhnikov@google.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