From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16893 invoked by alias); 27 Aug 2003 04:01:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16886 invoked from network); 27 Aug 2003 04:01:11 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 27 Aug 2003 04:01:11 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19rrUd-000686-B6; Wed, 27 Aug 2003 00:01:11 -0400 Date: Wed, 27 Aug 2003 04:01:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: gdb-patches@sources.redhat.com, kettenis@gnu.org Subject: Re: RFA: Fix lin-lwp SIGINT handling for 2.6 Message-ID: <20030827040111.GB23492@nevyn.them.org> Mail-Followup-To: Michael Snyder , gdb-patches@sources.redhat.com, kettenis@gnu.org References: <20030826193621.GA1925@nevyn.them.org> <3F4C15D5.8080207@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4C15D5.8080207@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00469.txt.bz2 On Tue, Aug 26, 2003 at 07:22:13PM -0700, Michael Snyder wrote: > Daniel Jacobowitz wrote: > >This patch fixes a number of inconsistent regressions in schedlock.exp and > >pthreads.exp on 2.6-series kernels, using LinuxThreads. Red Hat 2.4 > >kernels > >have the same problems; the fix will work there too iff there is an update > >which exports ShdPnd in /proc. > > > >The problem is that the SIGINT is delivered to every thread, and not > >properly flushed. So we go later to step or continue and get an "echo" of > >the original SIGINT. This is a timing problem caused by the introduction > >of > >two signal queues in the kernel; the SIGSTOP is now guaranteed to be > >delivered before the SIGINT, since it's on the thread-specific queue. It > >used to be that SIGINT would be delivered first; they were on the same > >queue, and SIGINT was lower numbered. > > > >So we have to check whether a SIGINT is pending (and not blocked/ignored) > >for the current thread after we stop it, and resume the thread to catch the > >SIGINT if so. > > > >It's not a perfect fix, but it's enough more reliable than the current > >scheme that I haven't been able to reproduce the problems. OK? HEAD only; > >this is a bit of an annoyance, but too risky for the branch, IMO. > > > > I've been worried about that. > > May I suggest that the function that opens a proc file belongs > in linux-proc.c? It is in linux-proc.c :) * linux-proc.c (linux_proc_add_line_to_sigset): New function. (linux_proc_pending_signals): New function. * linux-nat.h (linux_proc_pending_signals): Add prototype. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer