From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2734 invoked by alias); 17 May 2004 01:12:40 -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 2726 invoked from network); 17 May 2004 01:12:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 17 May 2004 01:12:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.33 #1 (Debian)) id 1BPWgH-0007Af-66; Sun, 16 May 2004 21:12:37 -0400 Date: Mon, 17 May 2004 01:12:00 -0000 From: Daniel Jacobowitz To: "Jonathan A. George" Cc: gdb@sources.redhat.com Subject: Re: BUG: GDB >=6 vfork from pthread fails with 2.6 vanilla kernels Message-ID: <20040517011237.GA27529@nevyn.them.org> Mail-Followup-To: "Jonathan A. George" , gdb@sources.redhat.com References: <40A4E1EA.8080603@greshamstorage.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40A4E1EA.8080603@greshamstorage.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-05/txt/msg00095.txt.bz2 On Fri, May 14, 2004 at 10:12:42AM -0500, Jonathan A. George wrote: > BUG: GDB >=6 vfork from pthread fails with 2.6 vanilla kernels > > Very simple to duplicate: > Run popen() from within a pthread_create() thread while sleeping in the > base process. > > (NOTE: works perfectly outside of GDB and under GDB with 2.4 kernel > pthreads) > > Environment: > Any 2.6 series kernel (tested 2.6.0 - 2.6.6 vanilla kernel.org) > Any GDB (tested 6.0 - current CVS) > Any GCC linked with -lpthread (tested 3.0.4 - 3.3.3) > > GDB output from test program: > Detaching after fork from child process 7020. > warning: Unexpected waitpid result 00117f when waiting for vfork-done > linux-nat.c:450: internal-error: unknown ptrace event 5 > A problem internal to GDB has been detected, > further debugging may prove unreliable. > Quit this debugging session? (y or n) > > Observations: > It seems as if GDB in linux-nat.c is trying to associate the vfork()d > popen()d process with the root process instead of the parenting thread > started by the root process. Did you really try current CVS? I checked in a fix for this a couple of weeks ago. If it still doesn't work, please post a test case. -- Daniel Jacobowitz