From owner-freebsd-current@FreeBSD.ORG Sat Nov 15 18:19:48 2003 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 08F4D16A4CE for ; Sat, 15 Nov 2003 18:19:48 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C13043FBF for ; Sat, 15 Nov 2003 18:19:44 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id NAA17781; Sun, 16 Nov 2003 13:19:30 +1100 Date: Sun, 16 Nov 2003 13:19:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Poul-Henning Kamp In-Reply-To: <17495.1068921380@critter.freebsd.dk> Message-ID: <20031116131305.V3251@gamplex.bde.org> References: <17495.1068921380@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: DIAGNOSTIC LOR in softclock 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: Sun, 16 Nov 2003 02:19:48 -0000 On Sat, 15 Nov 2003, Poul-Henning Kamp wrote: > This looks slightly different if I use SCHED_ULE, but the effect is > the same. > > Off the top of my head, I have not been able to find any places > where softclock would call schedcpu directly. schedcpu() is a timeout routine, so it is always called indirectly from softclock. > lock order reversal > 1st 0xc072dca0 callout_dont_sleep (callout_dont_sleep) @ kern/kern_timeout.c:223 > 2nd 0xc072d080 allproc (allproc) @ kern/sched_4bsd.c:257 > Stack backtrace: > backtrace(c06d148d,c072d080,c06cd881,c06cd881,c06cf38b) at backtrace+0x17 > witness_lock(c072d080,0,c06cf38b,101,c5061c3c) at witness_lock+0x672 > _sx_slock(c072d080,c06cf382,101,8,c06cf0a0) at _sx_slock+0xae > schedcpu(0,0,c06cf097,df,c1183140) at schedcpu+0x3f > softclock(0,0,c06cbce6,23a,c1189388) at softclock+0x1fb > ithread_loop(c1180400,c5061d48,c06cbb54,311,558b0424) at ithread_loop+0x192 > fork_exit(c050b090,c1180400,c5061d48) at fork_exit+0xb5 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xc5061d7c, ebp = 0 --- I'm sure this is known. schedcpu() always calls sx_lock(&allproc_lock), so the above always occurs if sx_lock() happens to block. Bruce