From owner-freebsd-current@FreeBSD.ORG Mon Jan 26 07:18:33 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2658316A4CE for ; Mon, 26 Jan 2004 07:18:33 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67ACD43D77 for ; Mon, 26 Jan 2004 07:18:24 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i0QFG8Ud011862; Mon, 26 Jan 2004 10:16:08 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i0QFG7Af011859; Mon, 26 Jan 2004 10:16:08 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Mon, 26 Jan 2004 10:16:07 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Jun Su In-Reply-To: <009501c3e41e$9e5ea360$90dea1d3@shasujunmv> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: [PANIC] today's cvs with KTRACE and MUTEX_PROFILING enabled (Big Post) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 15:18:33 -0000 On Mon, 26 Jan 2004, Jun Su wrote: > > On Mon, 26 Jan 2004, Jun Su wrote: > > > > > I got the following panic when booting. Seems the if_data_mutex is > > > corrupt by something.If you need any information, please feel free to > > > let me know. Thanks. > > > > Are you running with kernel modules? If so, were all of them built as > > part of your kernel build? Turning on mutex profiling changes the size of > > the mutex structure, so if you have modules that aren't built to be aware > > of mutex profiling, you will get memory corruption. When using mutex > > profiling, I would generally suggest avoiding the use of kernel modules, > > since it avoids the whole issue... > Yes. This is the root cause. Our module building env doesn't include > opt_global.h. Then the module's mtx doesn't match the one in Kernel. I think > this is a requirement for MUTEX_PROFILING, not a suggestion before we > complete the new building env for kernel module. I suggest to add this to > man page. What is your option? The following text appears in the NOTES section of MUTEX_PROFILING.9: The MUTEX_PROFILING option increases the size of struct mtx, so a kernel built with that option will not work with modules built without it. We can probably make this a little more explicit by specifically mentioning opt_global.h. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research