From owner-freebsd-threads@FreeBSD.ORG Wed Jul 16 17:58:57 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D206437B401; Wed, 16 Jul 2003 17:58:57 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5072E43FD7; Wed, 16 Jul 2003 17:58:57 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h6H0wqUp006516; Wed, 16 Jul 2003 17:58:54 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <001c01c34bff$13a21980$f001a8c0@davidw2k> From: "David Xu" To: , "David Schultz" References: Date: Thu, 17 Jul 2003 09:02:16 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: Craig Rodrigues cc: freebsd-threads@freebsd.org Subject: Re: sigwait() brokeness (was Re: Threads regression tests) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2003 00:58:58 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "David Schultz" Cc: "Craig Rodrigues" ; "David Xu" = ; Sent: Thursday, July 17, 2003 3:15 AM Subject: sigwait() brokeness (was Re: Threads regression tests) > On Tue, 15 Jul 2003, David Schultz wrote: >=20 > > On Wed, Jul 16, 2003, David Xu wrote: > > > Can you test my libkse patch ? > > > http://people.freebsd.org/~davidxu/libpthread_bound.diffs > > > If you can test the patch to make sure I don't break signal > > > code, then I will commit this patch.=20 > >=20 > > Is there interest in incrementally building a threads-related > > regression test suite in src/tools/regression? This would mean > > less breakage for people who are trying to use KSE/libthr, and an > > easy way for threads developers to be somewhat confident that > > their changes are correct. For example, two weeks ago I was > > tearing my hair out over a sigwait() problem that caused the > > following program to deadlock. Since I already bothered to > > isolate the bug, why not do the last 1% of the work and check in a > > test so that it never comes back? Thoughts? >=20 > Yes, sigwait() appears to be broken in the kernel. > If the process is sigwait()ing on a signal set, and > one of those signals is pending or occurs, the > signal handler should not be invoked, especially > if the signal is masked. >=20 > The waitset is independent of the thread's signal > mask. I think struct thread needs to grow a td_waitset > member. If a signal arrives (or is already pending) > and it is present in the waitset, then the thread > should be woken up with the signal removed from the > pending set and no signal handler installed. >=20 I am working on it now.=20 > --=20 > Dan Eischen >=20 > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to = "freebsd-threads-unsubscribe@freebsd.org" >