This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux

On Wed, Jul 15, 2009 at 6:25 PM, Doug Evans<> wrote:

> 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.

There is the 'attach' scenario under which (I believe) we *should* do
thread enumeration here.

> 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.

When gdb is built with native toolchain (glibc-2.7) and the test is built
with the same, then there is no failure.

When gdb is built with native toolchain, but the test is built against
glibc-2.3.6, I see one KFAIL.

When both gdb and the test are built against glibc-2.3.6, I see this:

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

# of expected passes            6
# of unexpected failures        3
# of known failures             1

When gdb is built against glibc-2.3.6, but test with glibc-2.7, I see
one KFAIL.

I've retested attached patch under all four combinations above, which
results in:

gdb-glibc-2.7   test-glibc-2.7:   no failures
gdb-glibc-2.7   test-glibc-2.3.6: KFAIL:
gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328)
gdb-glibc-2.3.6 test-glibc-2.3.6: no failures
gdb-glibc-2.3.6 test-glibc-2.7:   KFAIL:
gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328)

and checked this in.

Paul Pluzhnikov

Attachment: gdb-staticthreads-20090716.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]