bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with glibc-2.2.2 and threads (realtime signal)


From: Henning Baldersheim
Subject: Re: Problems with glibc-2.2.2 and threads (realtime signal)
Date: Tue, 20 Mar 2001 13:23:02 +0100

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

address@hidden 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 <address@hidden> on 03/08/2001 06:20:51 PM
>
> To:   address@hidden
> cc:
>
> Subject:  Re[2]: Problems with glibc-2.2.2 and threads (realtime signal)
>
> On Thu, 8 Mar 2001 17:40:02 +0100 address@hidden 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."
> <address@hidden>         |                         -- Wolfgang Pauli


From "-user news"@nextra.no Tue Mar 20 07:48:02 2001
Received: from rutgers.edu ([165.230.4.76] helo=rutgers.rutgers.edu)
        by fencepost.gnu.org with esmtp (Exim 3.16 #1 (Debian))
        id 14fLYP-0007gG-00
        for <address@hidden>; Tue, 20 Mar 2001 07:48:02 -0500
Received: from smarthost1.s.oke.nextra.no (smarthost1.s.oke.nextra.no 
[148.122.208.5])
        by rutgers.rutgers.edu (8.8.8/8.8.8) with SMTP id HAA06380
        for <address@hidden>; Tue, 20 Mar 2001 07:48:00 -0500 (EST)
Received: (qmail 12684 invoked from network); 20 Mar 2001 12:47:59 -0000
Received: from news3.oke.nextra.no (10.122.209.67)
  by smarthost1.oke.nextra.no with QMQP; 20 Mar 2001 12:47:59 -0000
To: address@hidden
Path: not-for-mail
Message-ID: <address@hidden>
From: Henning Baldersheim <address@hidden>
Organization: Q-Free ASA
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2 i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: gnu.gdb.bug
Subject: thread_db: map_id2thr failed: invalid thread handle
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
Date: Tue, 20 Mar 2001 14:47:53 +0100
NNTP-Posting-Host: 62.92.117.13
X-Complaints-To: address@hidden
X-Trace: news3.oke.nextra.no 985092479 62.92.117.13 (Tue, 20 Mar 2001 13:47:59 
MET)
NNTP-Posting-Date: Tue, 20 Mar 2001 13:47:59 MET
Sender: address@hidden
Errors-To: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.0.2
Precedence: bulk
List-Help: <mailto:address@hidden>
List-Post: <mailto:address@hidden>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-gdb>,
        <mailto:address@hidden>
List-Id: Bug reports for GDB, the GNU debugger <bug-gdb.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-gdb>,
        <mailto:address@hidden>
List-Archive: <http://mail.gnu.org/pipermail/bug-gdb/>

Hi

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]