From nobody@FreeBSD.org  Fri Feb 18 08:39:46 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id B6BDB37BA18
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Feb 2000 08:39:46 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id IAA04412;
	Fri, 18 Feb 2000 08:39:46 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200002181639.IAA04412@freefall.freebsd.org>
Date: Fri, 18 Feb 2000 08:39:46 -0800 (PST)
From: engarcia@fis.cinvestav.mx
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: Fatal trap 12, kernel does not boot
X-Send-Pr-Version: www-1.0

>Number:         16808
>Category:       kern
>Synopsis:       Fatal trap 12, kernel does not boot
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 18 08:40:01 PST 2000
>Closed-Date:    Mon Feb 21 13:20:16 PST 2000
>Last-Modified:  Mon Feb 21 13:21:09 PST 2000
>Originator:     Enrique Garcia Reyes
>Release:        3.2
>Organization:
CINVESTAV
>Environment:
FreeBSD fanny.fis.cinvestav.mx 3.2-RELEASE FreeBSD
 3.2-RELEASE #0: Tue May 18 04:05:08 GMT 1999     
jkh@cathair:/usr/src/sys/compile/GENERIC  i386

>Description:
hi, i am trying to make a custom kernel, usually boot my pc with a
generic kernel and works fine, but i want to use an iomega zip, so i
compiled  a new kernel with ppbus and some other stuff (the configuration
file is below), but at boot time it starts to check the devices, then at
the moment when generic kernel display the messages adding swap device,
the new kernel stops sending the following messages.

Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x58
fault code            = supervisor read page not present
instruction pointer   = 0x8:0xc0212cab
stack pointer         = 0x10:0xc0306f84
frame pointer         = 0x10:0xc0306f88
code segment          = base 0x0, limit oxfffff, type 0x16
                      = DPL0, press 1 def32 1 gran 1
processor eflags      = interrupt enabled, resume, IOPL=0
current process       = 0 ()
interrupt mask        =
trap number           = 12
panic: page fault
Automatic reboot in 15 seconds

at the begining i belived i was produced because the 3com card was not
available, but i also tried to run the new kernel in anoter pc and the 
behavior is the same.

My pc has an intel pentium III, 500Mhz processor, 64 Mb ram.
the configuration for my new kernel is the following
#############################################################
# My custom kernel config file
#

machine         "i386"
cpu             "I586_CPU"
ident           CASA
maxusers        15
## check  what the hell is maxdsiz
options         "MAXDSIZ=(256*1024*1024)"
options         "DFLDSIZ=(256*1024*1024)"
options         GPL_MATH_EMULATE                #Support for x87 emulation
options         INET                    #InterNETworking
options         FFS                     #Berkeley Fast Filesystem
options         FFS_ROOT                #FFS usable as root device [keep this!]
options         MFS                     #Memory Filesystem
options         MFS_ROOT                #MFS usable as root device, "MFS" req'ed
options         NFS                     #Network Filesystem
options         "CD9660"                #ISO 9660 Filesystem
options         PROCFS                  #Process filesystem
options         "COMPAT_43"             #Compatible with BSD 4.3 [KEEP THIS!]
options         SCSI_DELAY=15000        #Be pessimistic about Joe SCSI device
options         UCONSOLE                #Allow users to grab the console
options         FAILSAFE                #Be conservative
options         USERCONFIG              #boot -c editor
options         INTRO_USERCONFIG
options         VISUAL_USERCONFIG       #visual boot -c editor
options         PQ_LARGECACHE
options         USER_LDT
options         "VM86"
options         COMPILING_LINT
config          kernel  root on wd0

controller      isa0
controller      pnp0
controller      eisa0
controller      pci0

controller      fdc0    at isa? port "IO_FD1" bio irq 6 drq 2
disk            fd0     at fdc0 drive 0
disk            fd1     at fdc0 drive 1

options         "CMD640"        # work around CMD640 chip deficiency
controller      wdc0    at isa? port "IO_WD1" bio irq 14
disk            wd0     at wdc0 drive 0
disk            wd1     at wdc0 drive 1

controller      wdc1    at isa? port "IO_WD2" bio irq 15
disk            wd2     at wdc1 drive 0
disk            wd3     at wdc1 drive 1

options         ATAPI           #Enable ATAPI support for IDE bus
options         ATAPI_STATIC    #Don't do it as an LKM
device          acd0            #IDE CD-ROM
device          wfd0            #IDE Floppy (e.g. LS-120)

# A single entry for any of these controllers (ncr, ahb, ahc) is
# sufficient for any number of installed devices.
controller      ncr0
controller      ahb0
controller      ahc0
controller      isp0

controller      dpt0
# DPT options
options DPT_RESTRICTED_FREELIST
options DPT_FREELIST_IS_STACK
options DPT_TIMEOUT_FACTOR=4
options DPT_INTR_DELAY=200      # Some motherboards need that
options DPT_LOST_IRQ
options DPT_RESET_HBA
###############
controller      adv0    at isa? port ? cam irq ?
controller      adw0
controller      bt0     at isa? port ? cam irq ?
controller      aha0    at isa? port ? cam irq ?

controller      scbus0

device          da0   

#device         sa0

device          pass0

device          cd0     #Only need one of these, the code dynamically grows

device          wt0     at isa? port 0x300 bio irq 5 drq 1
device          mcd0    at isa? port 0x300 bio irq 10 
controller      matcd0  at isa? port 0x230 bio

device          scd0    at isa? port 0x230 bio

# atkbdc0 controlls both the keyboard and the PS/2 mouse
controller      atkbdc0 at isa? port IO_KBD tty
device          atkbd0  at isa? tty irq 1
device          psm0    at isa? tty irq 12

device          vga0    at isa? port ? conflicts

# splash screen/screen saver
pseudo-device   splash

# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? tty
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
device          vt0     at isa? tty
options         XSERVER                 # support for X server
#options                FAT_CURSOR              # start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options                PCVT_SCANSET=2          # IBM keyboards are non-std

device          npx0    at isa? port IO_NPX irq 13

device          apm0    at isa? disable flags 0x31 # Advanced Power Management

device          sio0    at isa? port "IO_COM1" flags 0x10 tty irq 4
device          sio1    at isa? port "IO_COM2" tty irq 3
device          sio2    at isa? disable port "IO_COM3" tty irq 5
device          sio3    at isa? disable port "IO_COM4" tty irq 9

# Parallel port
device          ppc0    at isa? port? flags 0x40 net irq 7
controller      ppbus0
device          lpt0    at ppbus?
device          plip0   at ppbus?
device          ppi0    at ppbus?
controller      vpo0    at ppbus?
controller      vp0     at ppbus?
#
# revision 1.20 of this file.

device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000
device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000`
device ep0 at isa? port 0x300 net irq 10
device ex0 at isa? port? net irq?
device fe0 at isa? port 0x300 net irq ?
device le0 at isa? port 0x300 net irq 5 iomem 0xd0000
device lnc0 at isa? port 0x280 net irq 10 drq 0
device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000
device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000
device cs0 at isa? port 0x300 net irq ?   

pseudo-device   loop
pseudo-device   ether
pseudo-device   sl      1   
pseudo-device   ppp     1
pseudo-device   tun     1
pseudo-device   pty     100
pseudo-device   gzip            # Exec gzipped a.out's
pseudo-device   snp     5
pseudo-device   log

options         MAXCONS=12

options         SYSVSHM
options         SYSVMSG
options         SYSVSEM

pseudo-device   bpfilter 4      #Berkeley packet filter
########################################################

any comment will be welcome.
Thanks in advance
>How-To-Repeat:
The problem appears every time i try to boot the new kernel


>Fix:


>Release-Note:
>Audit-Trail:

From: Dan Papasian <bugg@bugg.strangled.net>
To: engarcia@fis.cinvestav.mx
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/16808: Fatal trap 12, kernel does not boot
Date: Mon, 21 Feb 2000 11:54:03 -0500

 You should try to remove the options you don't need from your
 kernel to eliminate some possiblities.
 
 I took the time to comment on which entries in your kernel
 configuration were _very_ wrong.  Scroll down.
 
 On Fri, Feb 18, 2000 at 08:39:46AM -0800, engarcia@fis.cinvestav.mx wrote:
 > machine         "i386"
 > cpu             "I586_CPU"
 > ident           CASA
 > maxusers        15
 > ## check  what the hell is maxdsiz
 > options         "MAXDSIZ=(256*1024*1024)"
 > options         "DFLDSIZ=(256*1024*1024)"
 > options         GPL_MATH_EMULATE                #Support for x87 emulation
 
 You definetly don't need GPL_MATH_EMULATE and unless you are going
 to run applications up to 256 megs large (instead of the default 128)
 you don't need the MAXDSIZE and DFLSIZE entries.
 
 > options         INET                    #InterNETworking
 > options         FFS                     #Berkeley Fast Filesystem
 > options         FFS_ROOT                #FFS usable as root device [keep this!]
 > options         MFS                     #Memory Filesystem
 > options         MFS_ROOT                #MFS usable as root device, "MFS" req'ed
 > options         NFS                     #Network Filesystem
 > options         "CD9660"                #ISO 9660 Filesystem
 > options         PROCFS                  #Process filesystem
 > options         "COMPAT_43"             #Compatible with BSD 4.3 [KEEP THIS!]
 > options         SCSI_DELAY=15000        #Be pessimistic about Joe SCSI device
 
 SCSI_DELAY?  I'm not sure if you have SCSI devices- if you don't,
 remove this.
 If you do have SCSI devices, you can leave this in.
 
 > options         UCONSOLE                #Allow users to grab the console
 > options         FAILSAFE                #Be conservative
 > options         USERCONFIG              #boot -c editor
 > options         INTRO_USERCONFIG
 > options         VISUAL_USERCONFIG       #visual boot -c editor
 
 You don't need INTRO_USERCONFIG.  That is for installation
 kernels.
 
 > options         PQ_LARGECACHE
 > options         USER_LDT
 
 You don't need PQ_LARGECACHE unless you have a specific reason
 for having it, and USER_LDT is only if you want to run things
 like WINE.
 
 > options         "VM86"
 > options         COMPILING_LINT
 
 You don't need COMPILING_LINT.  That is for compiling LINT.
 ... and not for making usable kernels.
 
 > config          kernel  root on wd0
 > 
 > controller      isa0
 > controller      pnp0
 > controller      eisa0
 > controller      pci0
 > 
 > controller      fdc0    at isa? port "IO_FD1" bio irq 6 drq 2
 > disk            fd0     at fdc0 drive 0
 > disk            fd1     at fdc0 drive 1
 > 
 > options         "CMD640"        # work around CMD640 chip deficiency
 
 Do you have a controller with a CMD640?  If no, remove this.
 
 > controller      wdc0    at isa? port "IO_WD1" bio irq 14
 > disk            wd0     at wdc0 drive 0
 > disk            wd1     at wdc0 drive 1
 > 
 > controller      wdc1    at isa? port "IO_WD2" bio irq 15
 > disk            wd2     at wdc1 drive 0
 > disk            wd3     at wdc1 drive 1
 > 
 > options         ATAPI           #Enable ATAPI support for IDE bus
 > options         ATAPI_STATIC    #Don't do it as an LKM
 > device          acd0            #IDE CD-ROM
 > device          wfd0            #IDE Floppy (e.g. LS-120)
 
 Do you have an IDE Floppy?  This isn't for 1.44s, this is for
 things like the LS-120.  If you don't have one, remove this.
 
 > # A single entry for any of these controllers (ncr, ahb, ahc) is
 > # sufficient for any number of installed devices.
 > controller      ncr0
 > controller      ahb0
 > controller      ahc0
 > controller      isp0
 
 Do you have SCSI cards?  If no, remove _all_ of this.
 If yes, enable only the cards you have.
 
 > controller      dpt0
 > # DPT options
 > options DPT_RESTRICTED_FREELIST
 > options DPT_FREELIST_IS_STACK
 > options DPT_TIMEOUT_FACTOR=4
 > options DPT_INTR_DELAY=200      # Some motherboards need that
 > options DPT_LOST_IRQ
 > options DPT_RESET_HBA
 
 Do you have a RAID array?  If not, remove all of this.
 
 > ###############
 > controller      adv0    at isa? port ? cam irq ?
 > controller      adw0
 > controller      bt0     at isa? port ? cam irq ?
 > controller      aha0    at isa? port ? cam irq ?
 
 So you have SCSI?  If no, remove all of this.  If yes,
 enable only the cards you need.
 
 > 
 > controller      scbus0
 > 
 > device          da0   
 > 
 > #device         sa0
 > 
 > device          pass0
 > 
 > device          cd0     #Only need one of these, the code dynamically grows
 
 All of these are for SCSI as well.
 
 > 
 > device          wt0     at isa? port 0x300 bio irq 5 drq 1
 > device          mcd0    at isa? port 0x300 bio irq 10 
 > controller      matcd0  at isa? port 0x230 bio
 > 
 > device          scd0    at isa? port 0x230 bio
 
 These are for cdrom drives that are proprietary.  If your
 cdrom doesn't hook up to a soundcard, or is faster than 4X, you
 probably don't need these.
 
 > 
 > # atkbdc0 controlls both the keyboard and the PS/2 mouse
 > controller      atkbdc0 at isa? port IO_KBD tty
 > device          atkbd0  at isa? tty irq 1
 > device          psm0    at isa? tty irq 12
 > 
 > device          vga0    at isa? port ? conflicts
 > 
 > # splash screen/screen saver
 > pseudo-device   splash
 > 
 > # syscons is the default console driver, resembling an SCO console
 > device          sc0     at isa? tty
 > # Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
 > device          vt0     at isa? tty
 > options         XSERVER                 # support for X server
 > #options                FAT_CURSOR              # start with block cursor
 > # If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
 > #options                PCVT_SCANSET=2          # IBM keyboards are non-std
 
 You don't use PCVT and syscons.  Disable the PCVT stuff.
 (keep only the device sc0 line)
 
 > device          npx0    at isa? port IO_NPX irq 13
 > 
 > device          apm0    at isa? disable flags 0x31 # Advanced Power Management
 > 
 > device          sio0    at isa? port "IO_COM1" flags 0x10 tty irq 4
 > device          sio1    at isa? port "IO_COM2" tty irq 3
 > device          sio2    at isa? disable port "IO_COM3" tty irq 5
 > device          sio3    at isa? disable port "IO_COM4" tty irq 9
 > 
 > # Parallel port
 > device          ppc0    at isa? port? flags 0x40 net irq 7
 > controller      ppbus0
 > device          lpt0    at ppbus?
 > device          plip0   at ppbus?
 > device          ppi0    at ppbus?
 > controller      vpo0    at ppbus?
 > controller      vp0     at ppbus?
 > #
 > # revision 1.20 of this file.
 > 
 > device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000
 > device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000`
 > device ep0 at isa? port 0x300 net irq 10
 > device ex0 at isa? port? net irq?
 > device fe0 at isa? port 0x300 net irq ?
 > device le0 at isa? port 0x300 net irq 5 iomem 0xd0000
 > device lnc0 at isa? port 0x280 net irq 10 drq 0
 > device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000
 > device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000
 > device cs0 at isa? port 0x300 net irq ?   
 
 Don't you dare tell me you have all of these NICs.
 Remove the ones you don't have.
 
 > 
 > pseudo-device   loop
 > pseudo-device   ether
 > pseudo-device   sl      1   
 > pseudo-device   ppp     1
 > pseudo-device   tun     1
 > pseudo-device   pty     100
 > pseudo-device   gzip            # Exec gzipped a.out's
 > pseudo-device   snp     5
 > pseudo-device   log
 
 > 
 > options         MAXCONS=12
 You don't need this.
 
 > 
 > options         SYSVSHM
 > options         SYSVMSG
 > options         SYSVSEM
 > 
 > pseudo-device   bpfilter 4      #Berkeley packet filter
 > ########################################################
 > 
 > any comment will be welcome.
 
 Don't expect LINT to give you a working kernel.
 Strip down GENERIC by removing all of the hardware 
 you don't have, and then use LINT to add hardware
 that you haven't but isn't in GENERIC.
 
 Fix up your kernel, and come back if it still doesn't work.
 
 -Dan Papasian
 <bugg@bugg.strangled.net>
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Mon Feb 21 13:20:16 PST 2000 
State-Changed-Why:  
Pilot error. 
>Unformatted:
