From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23270 invoked by alias); 22 Jan 2008 11:56:55 -0000 Received: (qmail 23262 invoked by uid 22791); 22 Jan 2008 11:56:55 -0000 X-Spam-Check-By: sourceware.org Received: from mx-1.enea.se (HELO mx-1.enea.se) (192.36.1.70) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Jan 2008 11:56:27 +0000 Received: from mx-2.enea.se ([172.21.1.82]) by mx-1.enea.se with Microsoft SMTPSVC(6.0.3790.1830); Tue, 22 Jan 2008 12:56:24 +0100 Received: from [192.168.169.72] ([192.168.169.72]) by mx-2.enea.se over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 22 Jan 2008 12:56:24 +0100 Message-ID: <4795D9E7.9000101@enea.com> Date: Tue, 22 Jan 2008 11:56:00 -0000 From: Arvid Brodin User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: gdb@sourceware.org CC: drow@false.org Subject: Re: Problem debugging multi-threaded application References: <4794E3DD.2030909@enea.com> <20080121183517.GA28048@caradoc.them.org> In-Reply-To: <20080121183517.GA28048@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00223.txt.bz2 On 2008-01-21 19:35, Daniel Jacobowitz wrote: > 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. That explains a lot. Thanks for the info! >> 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? Actually, that was one of the first things I tried, and yes, that works fine. Sorry for not mentioning it before. I also found this old message regarding a similar symptom and foregrounding/backgrounding and SIGTTOU, which suggests commenting out the [New Thread ...] message. I tried that but it made no difference. I suspect that particular bug has been long fixed: http://sourceware.org/ml/gdb/2004-03/msg00251.html -- Arvid Brodin Enea LCC