Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Apr 2001 15:15:51 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: WITNESS + WITNESS_SKIPSPIN = panic
Message-ID:  <XFMail.010416151551.jhb@FreeBSD.org>
In-Reply-To: <20010417071929.C66243@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On 16-Apr-01 Peter Jeremy wrote:
> On 2001-Apr-14 18:54:28 -0700, John Baldwin <jhb@FreeBSD.ORG> wrote:
>>
>>On 14-Apr-01 Peter Jeremy wrote:
>>> Is there any progress on fixing this?
>>> 
>>> Peter
>>
>>It panics?  I'll see if I can reproduce this on Monday.  I never use
>>skipspin.
> 
> A similar problem was reported here in mid-March, ending with the
> following message:
> 
> On Mon, 12 Mar 2001 10:49:51 -0800 (PST), in
> <XFMail.010312104951.jhb@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org> wrote:
>>Just don't use the skipspin stuff, it shouldn't hurt at all.  The new witness
>>code will hopefully be in by the end of the week.  *crosses fingers*
> 
> I bumped into the same problem last week and couldn't find anything
> that looked like a change in the skipspin behaviour since mid-March.
> 
> Having looked in more detail at the previous thread, I suspect I may
> be seeing something different.  In my case, the kernel is panicing
> very early during the boot process in either line 302 or 305 of
> /sys/kern/subr_witness.c in witness_initialize():
> 
>      299         /* First add in all the specified order lists. */
>      300         for (order = order_lists; order->w_name != NULL; order++) {
>      301                 w = enroll(order->w_name, order->w_class);
>      302                 w->w_file = "order list";
>      303                 for (order++; order->w_name != NULL; order++) {
>      304                         w1 = enroll(order->w_name, order->w_class);
>      305                         w1->w_file = "order list";
>      306                         itismychild(w, w1);
>      307                         w = w1;
>      308                 }
>      309         }
> 
> The problem is that enroll() will return NULL for spinlocks when
> witness_skipspin is set, but the above code always assumes it
> can de-reference the result from enroll().  (There are two other
> calls to enroll() where a NULL return appears to be acceptable).

Argh, ok.

> I don't understand the mutex initialisation well enough to be able
> to readily work out the correct fix.

I'll fix it later on today.

> Peter

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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?XFMail.010416151551.jhb>