From owner-freebsd-current Mon Apr 16 14:19:41 2001 Delivered-To: freebsd-current@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 67EED37B43F; Mon, 16 Apr 2001 14:19:36 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id HAA18749; Tue, 17 Apr 2001 07:19:33 +1000 (EST) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37645) with ESMTP id <01K2HXRQQEU8S4NLCD@cim.alcatel.com.au>; Tue, 17 Apr 2001 07:19:19 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.1/8.11.1) id f3GLJUn47473; Tue, 17 Apr 2001 07:19:30 +1000 (EST envelope-from jeremyp) Content-return: prohibited Date: Tue, 17 Apr 2001 07:19:30 +1000 From: Peter Jeremy Subject: Re: WITNESS + WITNESS_SKIPSPIN = panic In-reply-to: ; from jhb@FreeBSD.ORG on Sat, Apr 14, 2001 at 06:54:28PM -0700 To: John Baldwin Cc: freebsd-current@FreeBSD.ORG Mail-Followup-To: John Baldwin , freebsd-current@FreeBSD.ORG Message-id: <20010417071929.C66243@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20010415093916.A39554@gsmx07.alcatel.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2001-Apr-14 18:54:28 -0700, John Baldwin 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 , John Baldwin 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). I don't understand the mutex initialisation well enough to be able to readily work out the correct fix. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message