From owner-freebsd-threads@FreeBSD.ORG Sun Apr 6 18:16:55 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 42F7D37B401 for ; Sun, 6 Apr 2003 18:16:55 -0700 (PDT) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D4C843F3F for ; Sun, 6 Apr 2003 18:16:53 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (ip-240-1-168-192.rev.dyxnet.com [192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id HLDQP2PZ; Mon, 7 Apr 2003 09:03:24 +0800 Message-ID: <003b01c2fca3$95050c40$f001a8c0@davidw2k> From: "David Xu" To: "Daniel Eischen" References: Date: Mon, 7 Apr 2003 09:18:22 +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 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 cc: freebsd-threads@freebsd.org Subject: Re: PS_BLOCKED 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: Mon, 07 Apr 2003 01:16:55 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "David Xu" Cc: Sent: Sunday, April 06, 2003 11:05 PM Subject: Re: PS_BLOCKED > On Sun, 6 Apr 2003, Daniel Eischen wrote: >=20 > > On Sun, 6 Apr 2003, David Xu wrote: > > >=20 > > > ----- Original Message -----=20 > > > From: "Daniel Eischen" > > > To: "DavidXu" > > > Cc: > > > Sent: Sunday, April 06, 2003 2:40 PM > > > Subject: Re: PS_BLOCKED > > > > > > > I've still got one bug I am trying to hunt down with > > > > signals -- the sigwait test fails. Process (kill) signals > > > > don't seem to wakeup threads in sigwait(). I'm not sure > > > > if it is a kernel bug or not, but I suspect it's > > > > something I'm doing. > > > >=20 > > >=20 > > > I don't know if Jeff's signal change in kernel affects your code, > > > but signals lost problem is still not fixed, a thread exports its > > > context and exits would lost signals dispatched to it, even the > > > signals is not for the thread, but for process. > >=20 > > I'll do some more debugging today and see if it is in the > > UTS or the kernel. >=20 > I think there is a problem in the kernel; probably Jeff's changes > that broke it. >=20 > When the UTS gets a signal (in k_mbx.km_sigscaught), the signal > mask in the kernel is never cleared. The UTS only ever gets > one signal. If I use __sys_sigprocmask() to clear the kernel > signal mask after the UTS receives the signal(s), then everything > works and the sigwait test passes. >=20 > I'm not sure what we should do. The UTS is currently installing > signal handlers with all signals masked (act.sa_mask). We could > clear this mask and perhaps solve the problem that way. But when > there are multiple (kernel) threads each with its own mask and > Jeff's recent changes, there are other problems I think. >=20 See my previous mail, I said current KSE signal code was totally broken by jeff's signal change.=20 > --=20 > Dan Eischen