Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2002 14:05:55 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Steve Kargl <sgk@troutmask.apl.washington.edu>, walt <wa1ter@hotmail.com>, freebsd-current@FreeBSD.ORG
Subject:   Re: KSE / interrupt panic
Message-ID:  <200206302105.g5UL5trx014170@apollo.backplane.com>
References:   <Pine.BSF.4.21.0206301357470.86477-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:others have seen this one too
:and the common element is that it's always in
:setrunqueue() called from an interrupt.
:it is also often via cv_*SOMETHING*()
:
:I Thought we had cleared these up but apparently not :-/
:

    There are a bunch of wakeup race conditions in the CV code where
    the TIMEOUT flag may be left set while the thread is still running.

    There are two calls to setrunqueue() in kern_condvar.c.  One looks
    like it covers the case, the other needs help.  I'm trying this patch
    now:

					-Matt

Index: kern_condvar.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_condvar.c,v
retrieving revision 1.23
diff -u -r1.23 kern_condvar.c
--- kern_condvar.c	29 Jun 2002 17:26:18 -0000	1.23
+++ kern_condvar.c	30 Jun 2002 20:51:31 -0000
@@ -605,7 +605,8 @@
 	mtx_lock_spin(&sched_lock);
 	if (td->td_flags & TDF_TIMEOUT) {
 		td->td_flags &= ~TDF_TIMEOUT;
-		setrunqueue(td);
+		if (td->td_state != TDS_RUNQ)
+			setrunqueue(td);
 	} else if (td->td_wchan != NULL) {
 		if (td->td_state == TDS_SLP)	/* XXXKSE */
 			setrunnable(td);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206302105.g5UL5trx014170>