From owner-freebsd-current Sun Jun 30 14: 6:18 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B54837B406 for ; Sun, 30 Jun 2002 14:06:05 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B0A543E09 for ; Sun, 30 Jun 2002 14:06:05 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.4/8.12.3) with ESMTP id g5UL5tT4014171; Sun, 30 Jun 2002 14:05:55 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.4/8.12.3/Submit) id g5UL5trx014170; Sun, 30 Jun 2002 14:05:55 -0700 (PDT) (envelope-from dillon) Date: Sun, 30 Jun 2002 14:05:55 -0700 (PDT) From: Matthew Dillon Message-Id: <200206302105.g5UL5trx014170@apollo.backplane.com> To: Julian Elischer Cc: Steve Kargl , walt , freebsd-current@FreeBSD.ORG Subject: Re: KSE / interrupt panic References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :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