Subject: kernel panics on firewall...
To: None <port-mac68k@netbsd.org>
From: Louis <louisg@ultranet.com>
List: port-mac68k
Date: 08/26/2000 17:46:09
Hello,

I've been having a problem lately with my firewall. When someone on the
Internet tries to download an mp3 from the web server, which is behind the
firewall, I get (intermittently) a kernel panic on the firewall.

The machine is a Mac IIci (68030) with 20M of RAM. 2 NuBus ethernet cards
which become ae devices. The scsibus is "scsibus0 at ncrscsi0"

It is running NetBSD 1.4.2 with an all but GENERIC kernel. This first
happened under a GENERIC kernel and seems to happen more reliably on a
kernel with "options NMBCLUSTERS=1024" and with "makeoptions DBUG='-g'"

I use ipfilter for NAT, firewall and redirection of services ( I have only
one IP address from the ISP) and also DHCP and DNS on this machine.


Here's the output from a trace command in ddb after the crash...

kernel program counter = 0xf19a
kernel: bus error trap
pid = -1, pc=0000F19A, ps=2200, sfc=1, dfc=1

<several words of data>

panic: bus error
Stopped at _Debugger+0x6:unlk a6

db>
db> trace
_Debugger(2204,0,1dfcb8,3780c,1dfca4) + 6
_panic(14a5e0,3c33c04,3fc,3c04,3c30000) + 52
_trap(0,755,3c33d7a) +23c
_dp8390_ring_copy(469400,3c04,2a6802,5ea) + 40
_dp8390_get(469400,3c04,5ea) + 1e4
_dp8390_read(469400,3c04,5ea,20,5) + 20
_dp8390_rint(469400) + 8
_dp8390_intr(469400,1dfe84,14bd0a,469400,2) + 1b6
_ae_nubis_intr(469400) + 8
_rbv_nubus_intr(1) + 50
_rbv_intr(1dfeb8) + 4e
_lev2intr(?)
_mi_switch(0,0,1dd4c8,fbb08000,0) + 14
_tsleep(1860dc,4,1034aa,0) + 162
_uvm_scheduler(9598,4a98,80040a2d,ffffcffc,50) + 64
_uvm_fault(0x169dd0,0x1e2000,0,0x1) -> 0x1
    type8, code [mmu,,ssw]:402074d
trap type8,code=0x402074d, v=0x1e2ffa

kernel program counter = 0x13a5aa
kernel: mmu fault trap
caught exception in ddb.
_main()+58c
_main()+58c


I had to copy this using pen and paper, because I saw no realistic way to
dump it to a file. I tried to look at the dumped core...

Here's what dmesg gives me...

isis:/var/crash #dmesg -M netbsd.0 -N \
         /sys/arch/mac68k/compile/LOUISKERN/netbsd.gdb
dmesg: no valid dump header
dmesg: kvm_read:  (0x18edcc)

Or...

isis:/var/crash #dmesg -M netbsd.0.core -N \
        /sys/arch/mac68k/compile/LOUISKERN/netbsd.gdb
dmesg: kvm_read:  (0x1e3000)

Does this mean that my crash dump is useless? I expected to be able to get
the "trace" output from these core files, or something similar, anyway.

With gdb...

isis:/var/crash #gdb /sys/arch/mac68k/compile/LOUISKERN/netbsd.gdb
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "m68k--netbsd"...

(gdb)
(gdb) target kcore netbsd.0
can not access 0x18daa4, no valid dump header
can not access 0x18daa4, no valid dump header
can not access 0x180514, no valid dump header
can not access 0x180514, no valid dump header
can not access 0x4, no valid dump header
can not access 0x4, no valid dump header
can not access 0x40a0, no valid dump header
can not access 0x40a0, no valid dump header
#0  0x0 in ?? ()
(gdb) detach
No kernel core file now.
(gdb) target kcore netbsd.0.core
panic: Bus error
#0  0x0 in ?? ()
(gdb) quit


Any help you can give me will be greatly appreciated.

Thanks,

Louis