From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21380 invoked by alias); 19 Nov 2001 19:38:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21344 invoked from network); 19 Nov 2001 19:38:33 -0000 Received: from unknown (HELO ocean.lucon.org) (24.176.137.160) by sourceware.cygnus.com with SMTP; 19 Nov 2001 19:38:33 -0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 9844E125C3; Mon, 19 Nov 2001 11:38:32 -0800 (PST) Date: Wed, 07 Nov 2001 15:15:00 -0000 From: "H . J . Lu" To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] lin-lwp.c: Block SIGCHLD events when attaching Message-ID: <20011119113832.A8778@lucon.org> References: <1011119193045.ZM16376@ocotillo.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1011119193045.ZM16376@ocotillo.lan>; from kevinb@cygnus.com on Mon, Nov 19, 2001 at 12:30:45PM -0700 X-SW-Source: 2001-11/txt/msg00122.txt.bz2 On Mon, Nov 19, 2001 at 12:30:45PM -0700, Kevin Buettner wrote: > When doing a lin_lwp_attach_lwp(), it is sometimes possible to receive > a SIGCHLD signal thus causing the waitpid() call to fail with EINTR. > This in turn causes the second assert() in lin_lwp_attach_lwp() to > fail. > > Reproducing this problem can be somewhat difficult. I've only been > able to reproduce it on a dual processor Linux/x86 machine. I did > manage to reproduce it using the linux-dp program as follows: > Have you looked at http://sources.redhat.com/ml/gdb/2001-09/msg00139.html Specifically, # gcc -g ex11.c -lpthread -lrt -D_GNU_SOURCE -static # a.out # gdb a.out ... (gdb) att 14226 Attaching to program: /home/hjl/bugs/gdb/thread/a.out, process 14226 ... lin-lwp.c:620: gdb-internal-error: stop_wait_callback: Assertion `pid == GET_LWP (lp->ptid)' failed. An internal GDB error was detected. This may make further ex11.c is from glibc and 14226 is the first thread. Your patch may fix it also. H.J.