From owner-freebsd-current Wed Mar 6 9:33:15 2002 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 46CE437B402 for ; Wed, 6 Mar 2002 09:33:09 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id EAA05919; Thu, 7 Mar 2002 04:33:05 +1100 Date: Thu, 7 Mar 2002 04:34:00 +1100 (EST) From: Bruce Evans X-X-Sender: To: Cc: Subject: Re: Won't boot after the commits to timecounter code In-Reply-To: <20020306134746.GA342@gzl> Message-ID: <20020307040247.T9712-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 6 Mar 2002 qhwt@myrealbox.com wrote: > I inserted a pair of printf() inside mtx_lock_spin/mtx_unlock_spin in > i8254_get_timecount() and it kept printing the message while tc_init() > was blocked, so I think it's blocked at mtx_lock_spin in i8254_get_timecount() > when called from tc_init(), but not when called from somewhere else. > (maybe an interrupt handler?) Apparently you have KTR enabled (not the default in GENERIC). I think WITNESS+KTR already caused nasty recursion from the mtx_lock_spin, and we now get an endless loop when nanotime() is called with an invalid timecounter in the following call chain: tc_init -> tc_windup -> tco_delta -> i8254_get_timecount -> mtx_foo -> witness_foo -> ktr_foo -> nanotime, just after nanotime has somehow recursed back into i8254_get_timecounter without causing endless recursion! Try setting MTX_NOWITNESS in the initialization of clock_lock in i386/machdep.c. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message