Hi

I just attached to the newsgroup so I do not have the start of this thread.
The answer might also be the answer to my problem.
I am debugging a multithreaded application, but I am not able to get going
because half way through the startup procedure the application is terminated
with the
message:

thread_db: map_id2thr failed: invalid thread handle

Then there is no stack or anything so I am left with nothing. This happens
after 32 threads are started and behaviour is the same on different machines.
I am running Redhat 7.0 with all patches as of today.

Any idea, anyone ??

Henning

[EMAIL PROTECTED] wrote:

> Hi!
>
> I think I found some info that might explain your problem. It could well be
> that it's not GDB's fault, but some system libraries being stripped.
>
> Mandrake Linux 7.2 is known to have this problem. Bug-report 1763 "GDB
> cannot debug programs that use shared libraries or threads" explains (see
> https://qa.mandrakesoft.com for more info). If /lib/libpthread.so
> (belonging to the glibc package) is stripped, GDB cannot hook into thread
> events, and you get spurious real-time SIG32 events. Rings a bell, doesn't
> it?!
>
> Use 'file /lib/libpthread*' to check. If it mentions 'stripped', you have
> this problem.
>
> Solving it, is probably tricky... Messing with glibc... What distro are you
> using? According to the changelog of glibc-2.2.2 for  Mandrake Cooker
> (which will be Mandrake 8.0 soon), these problems are fixed since Feb 21.
>
> Good luck!
>
> Bart
>
> German Gomez Garcia <[EMAIL PROTECTED]> on 03/08/2001 06:20:51 PM
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Re[2]: Problems with glibc-2.2.2 and threads (realtime signal)
>
> On Thu, 8 Mar 2001 17:40:02 +0100 [EMAIL PROTECTED] wrote:
>
> >
> >
> > Hi!
> >
> > In my experience this is a known feature. It is gdb's (4.18 and 5.0)
> > default setting to intercept this SIG 32 RealTime signal. glibc (since
> > 2.1.2 or 2.1.3) uses this signal for threading, so that explains what is
> > happening.
> >
> > You can work-arond this by using the 'handle' command.
> >
> > Do:
> >
> > (gdb) handle SIG32 nostop
> > (gdb) handle SIG32 noprint
> >
> > This will probably result in the behaviour you're looking for.
> >
> > (gdb) help handle
> >
> > This will explain in a bit more detail.
>
>         Thank you very much, this almost fix it, the only problem is that,
> I get no info on threads (info threads doesn't work), but that is better
> than nothing ... I hope the next version of gdb will fully suport RealTime
> signals.
>
>         Regards,
>
>         - german
>
> -------------------------------------------------------------------------
> German Gomez Garcia         | "This isn't right.  This isn't even wrong."
> <[EMAIL PROTECTED]>         |                         -- Wolfgang Pauli

_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to