From owner-freebsd-stable@FreeBSD.ORG Wed Nov 24 03:21:52 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 556BB16A4CE for ; Wed, 24 Nov 2004 03:21:52 +0000 (GMT) Received: from mail76-ash-R.bigfish.com (mail-ash.bigfish.com [206.16.192.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id E423C43D46 for ; Wed, 24 Nov 2004 03:21:51 +0000 (GMT) (envelope-from mark@verniernetworks.com) Received: from mail76-ash.bigfish.com (localhost.localdomain [127.0.0.1]) by mail76-ash-R.bigfish.com (Postfix) with ESMTP id BB01E3918B6 for ; Wed, 24 Nov 2004 03:21:52 +0000 (UCT) X-BigFish: VC Received: by mail76-ash (MessageSwitch) id 1101266512689679_1205; Wed, 24 Nov 2004 03:21:52 +0000 (UCT) Received: from exch2.verniernetworks.com (dns.verniernetworks.com [65.200.185.165]) by mail76-ash.bigfish.com (Postfix) with ESMTP id 7D23A39188A for ; Wed, 24 Nov 2004 03:21:52 +0000 (UCT) Received: from verniernetworks.com ([192.168.2.254]) by exch2.verniernetworks.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 23 Nov 2004 19:21:50 -0800 Message-ID: <41A3FE4E.30007@verniernetworks.com> Date: Tue, 23 Nov 2004 21:21:50 -0600 From: Mark Gooderum User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org X-OriginalArrivalTime: 24 Nov 2004 03:21:50.0718 (UTC) FILETIME=[BCFCE9E0:01C4D1D4] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: propagate_priority KASSERT X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 03:21:52 -0000 We're currently tripping accross the following KASSERT in subr_turnstile.c (in 5.3.0 RELEASE): /* * XXX: The owner of a turnstile can be stale if it is the * first thread to grab a slock of a sx lock. In that case * it is possible for us to be at SSLEEP or some other * weird state. We should probably just return if the state * isn't SRUN or SLOCK. */ KASSERT(!TD_IS_SLEEPING(td), ("sleeping thread %p (pid %d) owns non-sleepable lock %p", td, td->td_proc->p_pid, ts)) This is in propagate_priority(). However, propagate_priority() is only called in one place, by turnstile_wait(), and turnstile_wait() in turn is only called by _mtx_lock_sleep() which in turn is only used for sleep mutexes. TD_IS_SLEEPING() really means the SLEEPING inhibitor is set which in turn seems to mean that thread is in fact on a sleepq - which is used for various wait channels and timeouts. So I'm just trying to understand why it's a 100% assertion for any holder of the turnstile for a sleep mutex sleeping. Thanks, -- Mark Gooderum Vernier Networks, Inc. mark@verniernetworks.com