Subject: Re: yet another SA assertion failure with 3.0
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 11/08/2005 09:11:06
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Nov 08, 2005 at 04:33:42PM +0900, YAMAMOTO Takashi wrote:
> > before I spend a bunch of time fiddling with this,
> > does anyone have any suggestions on how to handle this case?
> > 
> > -Chuck
> 
> i guess that you are hitting the case that the lwp holding the VP is
> doing non-SA blocking, maybe by dropping L_SA temporarily.  right?

yea, usually the double-pagefault case.


> i don't think that you really need "allsusp" handing in that case.

hmm, I think you're right.  some LWP should wake up soon enough.
this new patch seems to work, how does it look to you?

-Chuck

--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="diff.sa-sigkill.2"

Index: src/sys/kern/kern_sig.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_sig.c,v
retrieving revision 1.210
diff -u -p -r1.210 kern_sig.c
--- src/sys/kern/kern_sig.c	23 Oct 2005 00:09:14 -0000	1.210
+++ src/sys/kern/kern_sig.c	8 Nov 2005 17:06:38 -0000
@@ -1177,8 +1177,6 @@ kpsignal2(struct proc *p, const ksiginfo
 				} else
 					l = NULL;
 			}
-			if (l == NULL)
-				allsusp = 1;
 		} else if (p->p_stat == SSTOP) {
 			SLIST_FOREACH(vp, &p->p_sa->sa_vps, savp_next) {
 				l = vp->savp_lwp;
@@ -1268,16 +1266,6 @@ kpsignal2(struct proc *p, const ksiginfo
 			 * them.
 			 */
 			if (allsusp && (signum == SIGKILL)) {
-				if (p->p_flag & P_SA) {
-					/*
-					 * get a suspended lwp from
-					 * the cache to send KILL
-					 * signal
-					 * XXXcl add signal checks at resume points
-					 */
-					suspended = sa_getcachelwp
-						(SLIST_FIRST(&p->p_sa->sa_vps));
-				}
 				lwp_continue(suspended);
 			}
 			goto done;

--NzB8fVQJ5HfG6fxh--