From owner-freebsd-hackers Thu Oct 17 13:33:29 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C49737B401 for ; Thu, 17 Oct 2002 13:33:23 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 135A443E6E for ; Thu, 17 Oct 2002 13:33:23 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0289.cvx22-bradley.dialup.earthlink.net ([209.179.199.34] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 182HKX-0004od-00; Thu, 17 Oct 2002 13:33:17 -0700 Message-ID: <3DAF1E45.1E2502C0@mindspring.com> Date: Thu, 17 Oct 2002 13:32:05 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Frank C Pilarcik Cc: hackers@freebsd.org Subject: Re: Help with system panics References: <5.1.1.6.0.20021017132315.00b67ac8@mail.dp.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Frank C Pilarcik wrote: > Attached are four single system panics. > > Thanks for your assistance in this matter. ---------BEGIN #1-------- FreeBSD build.dp.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Tue Oct 15 15:18:27= EDT 2002 fpilarcik@build.dp.net:/usr/src/sys/compile/MAIL i386 Fatal trap 1: privileged instruction fault while in kernel mode === #4 0xc02354c2 in trap (frame=3D{tf_fs =3D 16, tf_es =3D -1070923760, tf_ds= =3D -1072300016, tf_edi =3D -677560568, tf_esi =3D -678186368, tf_ebp =3D -677561128, tf_isp =3D -677561220, tf_ebx =3D 0, tf_edx =3D= -678186368, tf_ecx =3D -677560588, tf_eax =3D 0, tf_trapno =3D 1, tf_err =3D 0, tf_eip =3D -1072101108, tf_cs =3D 8, tf_eflags =3D= 66118, tf_esp =3D -1072099528, tf_ss =3D -678186368}) at ../../i386/i386/trap.c:618 === Cause: NMI Possible root causes: o power failure NMI Diagnostics: o Is system compiled with POWERFAIL_NMI option, or not? o Did "NMI: power fail" message appear on console in in kernel log file? o Did "NMI ... going to debugger" appear on console, an drop you into the kernel debugger? How to turn this on: Compile kernel with DDB option; dorpping to the debugger is default on NMI for kernel with debugger present. Workaround and/or to get more information: sysctl machdep.panic_on_nmi=0 Most likely cause: Installation of processor from one vendor in a motherboard originally intended for use with a processor from another vendor, without reflashing the BIOS to match the installed CPU. o Use of instruction not defined on processor by kernel Diagnostics: o Is system running BIOS services for suspend/power management/etc.? o Does CPU match BIOS implementation EXACTLY? If not, this may be a priviledged instruction in code from the BIOS, which is executing as a result of some event for which the BIOS supposedly has control. How to verify: o Disassmble code at instruction counter at both faul addresses... the one reported on the console, and the one reported by GDB. o Look for one of the following instructions, which are priviledged instructions which are not available in older IA-32 processors: Pentium or better required: CMPXCHG8B, CPUID, RDTSC, RDMSR, WRMSR, MMX Pentium Pro or better required: CMOV, FCMOV, FCOMI, RDPMC, UD2 Most likely cause: use of MMX instructions on non-MMX processor, due to improper compilation flags (e.g. incorrect "-march=" and/or kernel options). NOTE: May also occur if you are running FreeBSD on an 386, and you have not gone out of your way to build an 386 kernel, since the 386 is no longer supported in the FreeBSD default distribution, since it makes it obvious /dev/random is a crock. --------END #1-------- --------BEGIN #2-------- FreeBSD build.dp.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Tue Oct 15 15:18:27= EDT 2002 fpilarcik@build.dp.net:/usr/src/sys/compile/MAIL i386 Fatal trap 12: page fault while in kernel mode === #3 0xc0235adf in trap_fatal (frame=0xe1148d40, eva=2360299204) at ../../i386/i386/trap.c:956 #4 0xc023578d in trap_pfault (frame=0xe1148d40, usermode=0, eva=2360299204) at ../../i386/i386/trap.c:849 #5 0xc0235333 in trap (frame={tf_fs = -1072234480, tf_es = -1019674608, tf_ds = -518782960, tf_edi = -518746240, tf_esi = 3, tf_ebp = -518746328, tf_isp = -518746772, tf_ebx = -604554752, tf_edx = -604554752, tf_ecx = -518782024, tf_eax = -518746624, tf_trapno = 12, tf_err = 2, tf_eip = -1071678615, tf_cs = 8, tf_eflags = 66118, tf_esp = -1072302411, tf_ss = -1070934480}) at ../../i386/i386/trap.c:448 #6 0xc01f7b69 in kmem_malloc (map=0xdbf73a00, size=3776221056, flags=672044644) at ../../vm/vm_kern.c:402 === Cause: Page fault in kernel mode was not of a type serviceable in kernel mode, or was, but servicing failed. Possible root causes: o Usermode fault in kernel address space (NOT PROBLEM) NOTE: usermode is '0' o Usermode fault in user space (UNLIKELY) NOTE: usermode is '0' Diagnostic: verify value of "KERNBASE" is <= eva value; if not, this is your problem. NOTE: At one point, FreeBSD moved kernbase from 0xc0000000 to 0x80000000; if this kernel is after the move, then you are fine; otherwise, this is the problem. o Kernel mode fault in user space (PROBABLE) Diagnostic: In debugger, check value of 'map' and 'kernel_map'; if they are *not equal*, then this is the problem. Failure modes: o Inability to grow user stack (VERY UNLIKELY -- usermode==0) -- a kernel fault should not result in a stack growth. o vm_fault() returned something other than KERN_SUCCESS Diagnostic: set frame to trap_pfault in debugger; verify value of 'rv' != KERN_SUCCESS. o Kernel mode fault in kernel space (PROBABLE) Diagnostic: In debugger, check value of 'map' and 'kernel_map'; if they are *equal*, then this is the problem. Failure modes: o vm_fault() returned something other than KERN_SUCCESS Diagnostic: set frame to trap_pfault in debugger; verify value of 'rv' != KERN_SUCCESS. Likely cause: You are using more memory than you have mapping space for, and have fauled to tune the kernel so that this is not fatal. Workaround: Upgrade kernel so that "out of memory" is not fatal; don't tune kernel values, unless you are sure of what you are doing, since you can easult unbalance values which must be balanced by hand (e.g. mbufs vs. nmbclusters, etc.). --------END #2-------- --------BEGIN #3-------- FreeBSD build.dp.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Tue Oct 15 15:18:27= EDT 2002 fpilarcik@build.dp.net:/usr/src/sys/compile/MAIL i386 Fatal trap 12: page fault while in kernel mode === #3 0xc0235adf in trap_fatal (frame=0xe115ed48, eva=1713040792) at ../../i386/i386/trap.c:956 #4 0xc023578d in trap_pfault (frame=0xe115ed48, usermode=0, eva=1713040792) at ../../i386/i386/trap.c:849 #5 0xc0235333 in trap (frame={tf_fs = -1070989296, tf_es = 65552, tf_ds = 65552, tf_edi = -518656128, tf_esi = 3, tf_ebp = -518656216, tf_isp = -518656652, tf_ebx = -604556000, tf_edx = -518875136, tf_ecx = -519694336, tf_eax = 2, tf_trapno = 12, tf_err = 0, tf_eip = -1072302212, tf_cs = 8, tf_eflags = 66050, tf_esp = 69632, tf_ss = -604556000}) at ../../i386/i386/trap.c:448 #6 0xc015f77c in execve (p=0xdbf73520, uap=0xe115ef80) at ../../kern/kern_exec.c:167 === Diagnostics: See #2. --------END #3-------- --------BEGIN #4-------- FreeBSD build.dp.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Tue Oct 15 15:18:27= EDT 2002 fpilarcik@build.dp.net:/usr/src/sys/compile/MAIL i386 Fatal trap 12: page fault while in kernel mode === #3 0xc0235adf in trap_fatal (frame=0xd7961e88, eva=393) at ../../i386/i386/trap.c:956 #4 0xc023578d in trap_pfault (frame=0xd7961e88, usermode=0, eva=393) at ../../i386/i386/trap.c:849 #5 0xc0235333 in trap (frame={tf_fs = -678035440, tf_es = -1071710192, tf_ds = -678232048, tf_edi = -1039153408, tf_esi = -1039153360, tf_ebp = -678027576, tf_isp = -678027596, tf_ebx = 1, tf_edx = 0, tf_ecx = -730152896, tf_eax = -730152896, tf_trapno = 12, tf_err = 0, tf_eip = -1072308684, tf_cs = 8, tf_eflags = 66050, tf_esp = -678027548, tf_ss = -1072309212}) at ../../i386/i386/trap.c:448 #6 0xc015de34 in closef (fp=0xc20ae600, p=0xd47ac040) at ../../kern/kern_descrip.c:1203 === Diagnostics: See #2. --------END #4-------- -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message