Date: Mon, 26 Jan 2004 23:24:21 +0800 From: "Jun Su" <csujun@263.net> To: "Robert Watson" <rwatson@freebsd.org> Cc: current@freebsd.org Subject: Re: [PANIC] today's cvs with KTRACE and MUTEX_PROFILING enabled (Big Post) Message-ID: <00ab01c3e420$797e69c0$90dea1d3@shasujunmv> References: <Pine.NEB.3.96L.1040126101328.11399E-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Robert Watson" <rwatson@freebsd.org> To: "Jun Su" <csujun@263.net> Cc: <current@freebsd.org> Sent: Monday, January 26, 2004 11:16 PM Subject: Re: [PANIC] today's cvs with KTRACE and MUTEX_PROFILING enabled (Big Post) > > 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. I think there is some misleading in this para. Since when we build modules, the opt_global.h will not be included. The modules build with MUTEX_PROFILING option also doesn't work. Am I right? I think I have some confused about the kernel modukes building options. Jun Su. > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Senior Research Scientist, McAfee Research > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ab01c3e420$797e69c0$90dea1d3>