Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Mar 2002 10:40:07 +0900
From:      qhwt@myrealbox.com
To:        current@FreeBSD.ORG
Subject:   Re: Won't boot after the commits to timecounter code
Message-ID:  <20020307014007.GA622@gzl>
In-Reply-To: <20020307040247.T9712-100000@gamplex.bde.org>
References:  <20020306134746.GA342@gzl> <20020307040247.T9712-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 07, 2002 at 04:34:00AM +1100, Bruce Evans wrote:
> 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!

Yes, I have the following KTR options enabled (I think I brought this from
NOTES about a year before):
  options 	KTR
  options 	KTR_EXTEND
  options 	KTR_ENTRIES=1024
  options 	KTR_COMPILE=0x3fffff
  options 	KTR_MASK=0x201208
  options 	KTR_CPUMASK=0x3

but WITNESS is commented out.

> Try setting MTX_NOWITNESS in the initialization of clock_lock in
> i386/machdep.c.

O.k., I'll try this(but does it affect a kernel without WITNESS?), then
try a kernel without KTR options.

Thanks.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020307014007.GA622>