From owner-cvs-all@FreeBSD.ORG Tue Mar 2 21:05:29 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8B7716A4CE; Tue, 2 Mar 2004 21:05:29 -0800 (PST) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE42143D3F; Tue, 2 Mar 2004 21:05:28 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])i2355NnX010009; Wed, 3 Mar 2004 16:05:23 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i2355GsJ002566; Wed, 3 Mar 2004 16:05:17 +1100 Date: Wed, 3 Mar 2004 16:05:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin In-Reply-To: <200403021708.43422.jhb@FreeBSD.org> Message-ID: <20040303154602.D5469@gamplex.bde.org> References: <200403021502.i22F28vF032585@repoman.freebsd.org> <200403021708.43422.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= cc: src-committers@freebsd.org cc: cvs-all@freebsd.org cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/kern subr_sleepqueue.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 05:05:29 -0000 On Tue, 2 Mar 2004, John Baldwin wrote: > On Tuesday 02 March 2004 04:38 pm, Dag-Erling Sm=F8rgrav wrote: > > I believe you've missed at least one other abnormal case: either > > linux_rt_sigsuspend used to trigger the "mismatched locks" warning, > > and now just gives me a panic. To top it all off, the box freezes > > right after the Debugger("panic") line, without dropping to ddb. > > I never saw that case and this is the first I've heard of it. ddb tends = to > freeze when you enter it holding a spin lock. Do you have any log messag= es > from the mis-matched locks for msleep? ddb doesn't tend to freeze for me, perhaps because I rarely use witness and the most common problem is there. However, we seem to have some foot-shooting in Debugger(). The locking there is mostly wrong, and just calling printf() there is dangerous. I think it can hang due to bugs in console drivers. E.g., for syscons: - syscons sometimes hangs if it is called with sched_lock held, since it calls wakeup() which acquires sched_lock. See an XXX comment in sc_switch_scr(). - this problem has been worked around for printfs from the debugger proper. See the same XXX comment. The workaround seems to be adequate. - however, Debugger() calls printf before it enters debugger context, so the workaround doesn't apply. Direct entry to the debugger using breakpoint() should work better, but there are some problematic messages there too (messages before entering and after leaving debugger context). Fortunately, these are rarely printed unless VERBOSE_CPUSTOP_ON_DDBBREAK is enabled and the system is SMP. Bruce