From owner-freebsd-current@FreeBSD.ORG Fri Jul 9 19:36:24 2004 Return-Path: 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 369FB16A4CF for ; Fri, 9 Jul 2004 19:36:24 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0847643D53 for ; Fri, 9 Jul 2004 19:36:24 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 20710 invoked from network); 9 Jul 2004 19:36:23 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 9 Jul 2004 19:36:23 -0000 Received: from 10.50.41.229 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i69JaJlk089489; Fri, 9 Jul 2004 15:36:19 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Robert Watson Date: Fri, 9 Jul 2004 15:37:33 -0400 User-Agent: KMail/1.6 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407091537.33824.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: freebsd-current@FreeBSD.org cc: current@FreeBSD.org Subject: Re: panic: Assertion td->td_turnstile != NULL failed at ../../../kern/subr_turnstile.c:478 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 19:36:24 -0000 On Friday 09 July 2004 01:54 pm, Robert Watson wrote: > On Fri, 9 Jul 2004, John Baldwin wrote: > > > login: root > > > Password:panic: Assertion td->td_turnstile != NULL failed at > > > ../../../kern/subr_turnstile.c:478 > > > > This means your thread has no turnstile to give to the lock it is > > blocking on. Are you using TURNSTILE_PROFILING on this box? > > Not currently. Would you like me to? No, I was curious if there was a bug in the _PROFILING case. :) Actually, hmm. Looks like we don't setrunqueue() until after giving the thread a turnstile. Can you see if this assertion is triggered: Index: subr_turnstile.c =================================================================== RCS file: /usr/cvs/src/sys/kern/subr_turnstile.c,v retrieving revision 1.145 diff -u -r1.145 subr_turnstile.c --- subr_turnstile.c 2 Jul 2004 19:09:49 -0000 1.145 +++ subr_turnstile.c 9 Jul 2004 19:35:27 -0000 @@ -736,6 +736,7 @@ td->td_lockname = NULL; TD_CLR_LOCK(td); MPASS(TD_CAN_RUN(td)); + MPASS(td->td_turnstile != NULL); setrunqueue(td); } else { td->td_flags |= TDF_TSNOBLOCK; Also, you can try wrapping the entire while() loop there in turnstile_unpend() in a critical secton to force it to wake up all the threads before preempting. Also, are you using MUTEX_WAKE_ALL by chance? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org