From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22415 invoked by alias); 21 Jan 2008 18:35:46 -0000 Received: (qmail 22330 invoked by uid 22791); 21 Jan 2008 18:35:44 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Jan 2008 18:35:20 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2667898375; Mon, 21 Jan 2008 18:35:19 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 0962098022; Mon, 21 Jan 2008 18:35:18 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JH1UL-0007Im-Jy; Mon, 21 Jan 2008 13:35:17 -0500 Date: Mon, 21 Jan 2008 18:35:00 -0000 From: Daniel Jacobowitz To: Arvid Brodin Cc: gdb@sourceware.org Subject: Re: Problem debugging multi-threaded application Message-ID: <20080121183517.GA28048@caradoc.them.org> Mail-Followup-To: Arvid Brodin , gdb@sourceware.org References: <4794E3DD.2030909@enea.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4794E3DD.2030909@enea.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00213.txt.bz2 On Mon, Jan 21, 2008 at 07:26:37PM +0100, Arvid Brodin wrote: > If I invoke gdb under strace, i.e. 'strace -f -o strace-out.txt gdb > ' Don't do that :-) strace and gdb both use the ptrace interface; if you tell strace to follow children with -f, then it will win and gdb will not be able to debug the program it started. > The problem exists on these platforms: Since the problem exists on older platforms and not on newer ones, it may be a bug in the Linux kernel or glibc which has since been fixed. GDB is very sensitive to such bugs. > I have no idea if this is a bug in gdb, if we do something bad in > our program, if it is a bug in nptl, or ... It sounds sort of like a problem with job control and terminal groups, but I'm not sure I have enough to guess... can you run it and use the gdb "attach" command? -- Daniel Jacobowitz CodeSourcery