From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17789 invoked by alias); 27 Aug 2003 02:22:23 -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 17772 invoked from network); 27 Aug 2003 02:22:22 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 27 Aug 2003 02:22:22 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h7R2MJl06042 for ; Tue, 26 Aug 2003 22:22:20 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h7R2MDL21103; Tue, 26 Aug 2003 22:22:13 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h7R2MDw12843; Tue, 26 Aug 2003 19:22:13 -0700 Message-ID: <3F4C15D5.8080207@redhat.com> Date: Wed, 27 Aug 2003 02:22:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com, kettenis@gnu.org Subject: Re: RFA: Fix lin-lwp SIGINT handling for 2.6 References: <20030826193621.GA1925@nevyn.them.org> In-Reply-To: <20030826193621.GA1925@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00466.txt.bz2 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?