From owner-freebsd-smp Fri Dec 6 10:02:49 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA02932 for smp-outgoing; Fri, 6 Dec 1996 10:02:49 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id KAA02915 for ; Fri, 6 Dec 1996 10:02:41 -0800 (PST) Received: from pat.idt.unit.no (pat.idt.unit.no [129.241.103.5]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id JAA05058 for ; Fri, 6 Dec 1996 09:28:48 -0800 (PST) Received: from idt.unit.no (tegge@ikke.idt.unit.no [129.241.111.65]) by pat.idt.unit.no (8.8.4/8.8.4) with ESMTP id SAA22564; Fri, 6 Dec 1996 18:28:05 +0100 (MET) Message-Id: <199612061728.SAA22564@pat.idt.unit.no> To: smp@bluenose.na.tuns.ca Cc: peter@spinner.dialix.com, smp@freebsd.org Subject: More info about fatal trap 12 In-Reply-To: Your message of "Fri, 6 Dec 1996 07:16:19 -0400 (AST)" References: <199612061116.HAA25054@bluenose.na.tuns.ca> X-Mailer: Mew version 1.06 on Emacs 19.33.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Fri, 06 Dec 1996 18:28:05 +0100 From: Tor Egge Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > For compiling a kernel, `make depend' crashes the system. > If 'make depend' is executed before `sysctl -w kern.smp_active=2', > the kernel can be compiled to the very end until > > ------------- > cc -c -x assembler-with-cpp -DLOCORE -nostdinc -I- -I. -I../.. -I../../../include -DFAILSAFE -DCOMPAT_43 -DCD9660 -DMSDOSFS -DNFS -DFFS -DINET -DKERNEL ../../i386/i386/swtch.s > --- vers.o --- > sh ../../conf/newvers.sh SMP -DFAILSAFE -DCOMPAT_43 -DCD9660 -DMSDOSFS -DNFS -DFFS -DINET > > :-( > ------------- > > I can provide the ktrace file, if you need it to identify the problem. > A closer examination of the kernel dump shows that the first page fault is from the user process /bin/sh. The call stack is #0 boot (howto=256) at ../../kern/kern_shutdown.c:267 #1 0xe0112d69 in panic (fmt=0xe01bcd3f "page fault") at ../../kern/kern_shutdown.c:395 #2 0xe01bda25 in trap_fatal (frame=0xdfbffe58) at ../../i386/i386/trap.c:747 #3 0xe01bd458 in trap_pfault (frame=0xdfbffe58, usermode=0) at ../../i386/i386/trap.c:654 #4 0xe01bd08b in trap (frame={tf_es = -270925808, tf_ds = 16, tf_edi = -270878108, tf_esi = -541077504, tf_ebp = -541065552, tf_isp = -541065600, tf_ebx = 89759744, tf_edx = -4194304, tf_ecx = -528396, tf_eax = -528396, tf_trapno = 12, tf_err = 0, tf_eip = -535058509, tf_cs = 8, tf_eflags = 66178, tf_esp = -532455933, tf_ss = -270885632}) at ../../i386/i386/trap.c:313 #5 0xe01ba7b3 in pmap_enter (pmap=0xefdaba64, va=3753889792, pa=89759744, prot=7 '\a', wired=0) at ../../i386/i386/pmap.c:2017 #6 0xe01a4193 in vm_fault (map=0xefdaba00, vaddr=3753889792, fault_type=3 '\003', change_wiring=0) at ../../vm/vm_fault.c:773 #7 0xe01bd3b0 in trap_pfault (frame=0xdfbfffbc, usermode=1) at ../../i386/i386/trap.c:634 #8 0xe01bcf33 in trap (frame={tf_es = 39, tf_ds = 39, tf_edi = 352256, tf_esi = 330220, tf_ebp = -541074424, tf_isp = -541065244, tf_ebx = 0, tf_edx = 1, tf_ecx = 330220, tf_eax = 0, tf_trapno = 12, tf_err = 7, tf_eip = 45296, tf_cs = 31, tf_eflags = 66050, tf_esp = -541074448, tf_ss = 39}) at ../../i386/i386/trap.c:241 ------ userland ------ /bin/sh ---- #9 0xb0f0 in ?? () [forkshell] #10 0x63ab in ?? () [evalcommand] #11 0x58e1 in ?? () [evaltree] #12 0xc11f in ?? () [cmdloop] #13 0xc02e in ?? () [main] #14 0x107e in ?? () [start] Dump of assembler code for function forkshell: 0xb0cc : pushl %ebp 0xb0cd : movl %esp,%ebp 0xb0cf : subl $0xc,%esp 0xb0d2 : pushl %edi 0xb0d3 : pushl %esi 0xb0d4 : pushl %ebx 0xb0d5 : movl 0x8(%ebp),%edi 0xb0d8 : movl 0xc(%ebp),%esi 0xb0db : movl 0x52898,%eax 0xb0e0 : incl %eax 0xb0e1 : movl %eax,0x52898 0xb0e6 : movl 0x52898,%eax 0xb0eb : call 0x286c8 0xb0f0 : movl %eax,0xfffffff8(%ebp) 0xb0f3 : cmpl $0xffffffff,%eax The first access to the stack by the child process failed when trying to save the return value from fork. The parent process was running on CPU #1, and the child process was running on CPU #0. - Tor Egge