From owner-freebsd-current Mon Apr 16 15:16:39 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id D415737B423 for ; Mon, 16 Apr 2001 15:16:36 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f3GMGPG77904; Mon, 16 Apr 2001 15:16:25 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010417071929.C66243@gsmx07.alcatel.com.au> Date: Mon, 16 Apr 2001 15:15:51 -0700 (PDT) From: John Baldwin To: Peter Jeremy Subject: Re: WITNESS + WITNESS_SKIPSPIN = panic Cc: freebsd-current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 16-Apr-01 Peter Jeremy wrote: > 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). 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 -- 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