From owner-p4-projects@FreeBSD.ORG Thu Apr 17 08:36:08 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6879537B404; Thu, 17 Apr 2003 08:36:08 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1F3537B401 for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C0A343FAF for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3HFa70U028123 for ; Thu, 17 Apr 2003 08:36:07 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3HFa6Ir028120 for perforce@freebsd.org; Thu, 17 Apr 2003 08:36:06 -0700 (PDT) Date: Thu, 17 Apr 2003 08:36:06 -0700 (PDT) Message-Id: <200304171536.h3HFa6Ir028120@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 29123 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 15:36:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=29123 Change 29123 by jhb@jhb_laptop on 2003/04/17 08:35:36 This assert actually triggered while syncing buffers on shutdown, so make it into a printf instead of a panic so I don't lose my buffers. Affected files ... .. //depot/projects/smpng/sys/kern/kern_lock.c#25 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_lock.c#25 (text+ko) ==== @@ -229,10 +229,8 @@ error = 0; if (td == NULL) thr = LK_KERNPROC; - else { - MPASS(td == curthread); + else thr = td; - } if ((flags & LK_INTERNAL) == 0) mtx_lock(lkp->lk_interlock); @@ -267,6 +265,12 @@ */ if (lkp->lk_lockholder != thr) { lockflags = LK_HAVE_EXCL; +#ifdef INVARIANTS + if (td != NULL && td != curthread) + printf("%s: weird thread pid %d (%s)\n", + __func__, td->td_proc->p_pid, + td->td_proc->p_comm); +#endif if (td != NULL && !(td->td_flags & TDF_DEADLKTREAT)) lockflags |= LK_WANT_EXCL | LK_WANT_UPGRADE; error = acquire(&lkp, extflags, lockflags);