Date: Wed, 3 Mar 2004 16:05:15 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: John Baldwin <jhb@freebsd.org> Cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/kern subr_sleepqueue.c Message-ID: <20040303154602.D5469@gamplex.bde.org> In-Reply-To: <200403021708.43422.jhb@FreeBSD.org> References: <200403021502.i22F28vF032585@repoman.freebsd.org> <xzpwu63udyx.fsf@dwp.des.no> <200403021708.43422.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040303154602.D5469>