From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3786 invoked by alias); 26 Sep 2005 13:28:19 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3755 invoked by uid 22791); 26 Sep 2005 13:28:11 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 26 Sep 2005 13:28:11 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EJt1b-0000Ol-O4; Mon, 26 Sep 2005 09:28:07 -0400 Date: Mon, 26 Sep 2005 13:28:00 -0000 From: Daniel Jacobowitz To: Ben Greear Cc: gdb@sources.redhat.com Subject: Re: gdb does not show full backtrace for deadlocked pthread program. Message-ID: <20050926132807.GA1436@nevyn.them.org> Mail-Followup-To: Ben Greear , gdb@sources.redhat.com References: <4337A216.6050805@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4337A216.6050805@candelatech.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00189.txt.bz2 On Mon, Sep 26, 2005 at 12:24:06AM -0700, Ben Greear wrote: > Hello! > > I have a program that uses pthreads and evidently has a > nifty little thread deadlock. > > The interesting thing is that gdb will not show me the full > backtrace of the deadlocked threads. Both tested system's running > a slightly modified 2.6.11 kernel. The FC2 system is a dual-xeon with > SMP kernel. The FC4 machine is a laptop with UP kernel. > FC2's gdb doesn't even decode frame 3, but on FC4 I get this: > > [after attaching to deadlocked process] > > (gdb) thread apply all bt > > Thread 2 (Thread -1208132688 (LWP 9895)): > #0 0xffffe410 in ?? () > #1 0xb7fd50e8 in ?? () > #2 0x00000002 in ?? () > #3 0x004b4e7e in __lll_mutex_lock_wait () from /lib/libpthread.so.0 GDB knows how to load symbols for the kernel DSO and backtrace from it. It also knows how to load separate debug info packages, which I assume Red Hat provides for libc. I would have expected the shipped GDB to do this, but if not, try building your own from current CVS. If you install the debug info packages and want to use them, you may need to configure your own gdb with --prefix=/usr. -- Daniel Jacobowitz CodeSourcery, LLC