Subject: bridge related panic
To: None <tech-net@netbsd.org>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: tech-net
Date: 01/15/2003 16:48:25
Hello,

I'm using 1.6_STABLE on an alpha with two SMC gigabit cards. I've
discovered following sequence of commands leads to an immediate panic
when the kernel is compiled with 'options DEBUG':

ifconfig gsip0 up
ifconfig gsip0 ip4csum
ifconfig bridge0 create
brconfig bridge0 add gsip0 add gsip1 up
ifconfig gsip 1 up

without DEBUG, everything is OK. Without the second command (ifconfig
gsip0 ip4csum) it's OK too. 

here is the panic message:

Jan 15 15:23:04 beta /netbsd: panic: kernel debugging assertion "ifp->if_capenable & IFCAP_CSUM_IPv4" failed: file "/usr/src2/sys/dev/pci/if_sip.c", line 1324

the dmesg:

[ using 687152 bytes of netbsd ELF symbol table ]
consinit: not using prom console
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6_STABLE (ALPHA-$Revision: 1.164.4.2 $) #5: Wed Jan 15 08:31:54 UTC 2003
    root@beta:/usr/obj/kern/BETA
Digital AlphaPC 164LX 599 MHz, s/n 
8192 byte page size, 1 processor.
total memory = 576 MB
(2136 KB reserved for PROM, 573 MB used by NetBSD)
avail memory = 522 MB
using 3685 buffers containing 29480 KB of memory
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21164A-2
cpu0: VAX FP support, IEEE FP support, Primary Eligible
cpu0: Architecture extensions: 1<BWX>
cia0 at mainbus0: DECchip 2117x Core Logic Chipset (Pyxis), pass 1
cia0: extended capabilities: 1<BWEN>
cia0: using BWX for PCI config access
pci0 at cia0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
vga0 at pci0 dev 5 function 0: S3 Trio32/64 (rev. 0x44)
wsdisplay0 at vga0 (kbdmux ignored): console (80x25, vt100 emulation)
gsip0 at pci0 dev 6 function 0: NatSemi DP83820 Gigabit Ethernet, rev 00
gsip0: interrupting at eb164 irq 0
gsip0: Ethernet address 00:04:e2:10:55:16
gsip0: 64-bit PCI slot detected
gphyter0 at gsip0 phy 1: DP83861 1000BASE-T media interface, rev. 1
gphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
gphyter0: strapped to slave mode, pre-C5 BCM5400 compat enabled
gsip1 at pci0 dev 7 function 0: NatSemi DP83820 Gigabit Ethernet, rev 00
gsip1: interrupting at eb164 irq 1
gsip1: Ethernet address 00:04:e2:10:51:aa
gsip1: 64-bit PCI slot detected
gphyter1 at gsip1 phy 1: DP83861 1000BASE-T media interface, rev. 2
gphyter1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
gphyter1: strapped to slave mode, pre-C5 BCM5400 compat enabled
sio0 at pci0 dev 8 function 0: Intel 82378ZB System I/O (SIO) (rev. 0x43)
siop0 at pci0 dev 9 function 0: Symbios Logic 53c895 (ultra2-wide scsi)
siop0: using on-board RAM
siop0: interrupting at eb164 irq 3
scsibus0 at siop0: 16 targets, 8 luns per target
pciide0 at pci0 dev 11 function 0: CMD Technology PCI0646 (rev. 0x01)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
atapibus0 at pciide0 channel 0: 2 targets
cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-6502B, , 1013> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
pciide0: primary channel interrupting at isa irq 14
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: disabling secondary channel (no drives)
isa0 at sio0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 (mux ignored): console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 (mux ignored)
lpt0 at isa0 port 0x3bc-0x3bf irq 7
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
isapnp0: no ISA Plug 'n Play devices found
scsibus0: waiting 2 seconds for devices to settle...
siop0: alloc newcdb at PHY addr 0x434dc000
sd0 at scsibus0 target 4 lun 0: <SEAGATE, ST336938LW, 0003> SCSI3 0/direct fixed
sd0: 35242 MB, 56332 cyl, 2 head, 640 sec, 512 bytes/sect x 72176567 sectors
sd0: sync (25.0ns offset 31), 16-bit (80.000MB/s) transfers, tagged queueing
raidattach: Asked for 8 units
Kernelized RAIDframe activated
Searching for raid components...
IPsec: Initialized Security Association Processing.
root on sd0a dumps on sd0b
mountroot: trying coda...
mountroot: trying nfs...
mountroot: trying ext2fs...
mountroot: trying ntfs...
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying lfs...
mountroot: trying ffs...
readclock: 3/1/15/12/28/27=>1042633707 (1042633178)
root file system type: ffs
init: copying out path `/sbin/init' 11
IP Filter: v3.4.29 initialized.  Default = pass all, Logging = enabled
<6>in6_ifattach: bridge0 is not multicast capable, IPv6 not enabled
<6>in6_ifattach: bridge0 is not multicast capable, IPv6 not enabled
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
panic: kernel debugging assertion "ifp->if_capenable & IFCAP_CSUM_IPv4" failed: file "/usr/src/sys/dev/pci/if_sip.c", line 1324

And the backtrace:
(Please note that the kernel has a nonstandard patch applied to
if_bridge.c, so the linenumbers in this file doesn't match what one 
would expect for a 1.6_STABLE kernel. The panic occurs even without the
patch, so I think it's unrelated.)

(gdb) bt
#0  0xfffffc00009c7a24 in dumpsys ()
    at /usr/src/sys/arch/alpha/alpha/machdep.c:1294
#1  0xfffffc00009c73e4 in cpu_reboot (howto=256, bootstr=0x0)
    at /usr/src/sys/arch/alpha/alpha/machdep.c:1120
#2  0xfffffc000061b924 in db_sync_cmd (addr=-2198613645208, have_addr=0, 
    count=5, modif=0xfffffe00186a27d8 "Üìa")
    at /usr/src/sys/ddb/db_command.c:722
#3  0xfffffc000061ae24 in db_command (last_cmdp=0xfffffc0000c3a698, 
    cmd_table=0x0) at /usr/src/sys/ddb/db_command.c:456
#4  0xfffffc000061a500 in db_command_loop ()
    at /usr/src/sys/ddb/db_command.c:246
#5  0xfffffc0000622800 in db_trap (type=3, code=1)
    at /usr/src/sys/ddb/db_trap.c:92
#6  0xfffffc00009ec608 in ddb_trap (a0=1, a1=576460632782537680, a2=5, 
    entry=3, regs=0xfffffe00186a2a08)
    at /usr/src/sys/arch/alpha/alpha/db_interface.c:211
#7  0xfffffc0000300194 in inc6 () at /usr/src/sys/arch/alpha/alpha/debug.s:49
#8  0xfffffc00009d40ec in trap (a0=1, a1=576460632782537680, a2=5, entry=3, 
    framep=0xfffffe00186a2a08) at /usr/src/sys/arch/alpha/alpha/trap.c:305
#9  0xfffffc00003003b0 in XentIF ()
    at /usr/src/sys/arch/alpha/alpha/locore.s:467
#10 0xfffffc000067c7e8 in panic (fmt=0xfffffc0000a86cec "\e")
    at /usr/src/sys/kern/subr_prf.c:237
#11 0xfffffc000067c7e8 in panic (
    fmt=0xfffffc0000bf1080 "kernel %sassertion \"%s\" failed: file \"%s\", line %d\n") at /usr/src/sys/kern/subr_prf.c:237
#12 0xfffffc0000a86cec in __assert (t=0xfffffc0000b8dbe2 "debugging ", 
    f=0xfffffc0000b8daab "/usr/src/sys/dev/pci/if_sip.c", l=1324, 
    e=0xfffffc0000b8dbed "ifp->if_capenable & IFCAP_CSUM_IPv4")
    at /usr/src/sys/lib/libkern/__assert.c:47
#13 0xfffffc0000915f8c in gsip_start (ifp=0xfffffe0000160060)
    at /usr/src/sys/dev/pci/if_sip.c:1324
#14 0xfffffc00006e6b88 in bridge_enqueue (sc=0xfffffe00001fa000, 
    dst_ifp=0xfffffe0000160060, m=0xfffffc000d61b580)
    at /usr/src/sys/net/if_bridge.c:1052
#15 0xfffffc00006e786c in bridge_broadcast (sc=0xfffffe00001fa000, 
    src_if=0xfffffe0000134060, m=0xfffffc000d61b480)
    at /usr/src/sys/net/if_bridge.c:1470
#16 0xfffffc00006e7198 in bridge_forward (sc=0xfffffe00001fa000, 
    m=0xfffffc000d61b480) at /usr/src/sys/net/if_bridge.c:1264
#17 0xfffffc00006e741c in bridge_input (ifp=0xfffffe0000134060, 
    m=0xfffffc000d61b180) at /usr/src/sys/net/if_bridge.c:1352
#18 0xfffffc00006ed528 in ether_input (ifp=0xfffffe0000134060, 
    m=0xfffffc000d61b180) at /usr/src/sys/net/if_ethersubr.c:725
#19 0xfffffc0000917c24 in gsip_rxintr (sc=0xfffffe0000134000)
    at /usr/src/sys/dev/pci/if_sip.c:1906
#20 0xfffffc0000916818 in gsip_intr (arg=0xfffffe0000134000)
    at /usr/src/sys/dev/pci/if_sip.c:1511
#21 0xfffffc0000830bb4 in alpha_shared_intr_dispatch (intr=0xfffffe000012f000, 
    num=0) at /usr/src/sys/arch/alpha/common/shared_intr.c:118
#22 0xfffffc00009b77a8 in eb164_iointr (arg=0x0, vec=2304)
    at /usr/src/sys/arch/alpha/pci/pci_eb164.c:369
#23 0xfffffc00009c470c in interrupt (a0=3, a1=2304, a2=5, 
    framep=0xfffffe00186a2f90) at /usr/src/sys/arch/alpha/alpha/interrupt.c:304
#24 0xfffffc00003003dc in XentInt ()
    at /usr/src/sys/arch/alpha/alpha/locore.s:482
#25 0xfffffc00009c4d84 in spl0 ()
    at /usr/src/sys/arch/alpha/alpha/interrupt.c:524
#26 0xfffffc00009c4d84 in spl0 ()
    at /usr/src/sys/arch/alpha/alpha/interrupt.c:524
#27 0xfffffc00006c0124 in vfs_shutdown () at /usr/src/sys/kern/vfs_subr.c:2460
#28 0xfffffc00009c73a4 in cpu_reboot (howto=256, bootstr=0x0)
    at /usr/src/sys/arch/alpha/alpha/machdep.c:1084
#29 0xfffffc000061b924 in db_sync_cmd (addr=-2198613642744, have_addr=0, 
    count=5, modif=0xfffffe00186a3178 "Üìa")
    at /usr/src/sys/ddb/db_command.c:722
#30 0xfffffc000061ae24 in db_command (last_cmdp=0xfffffc0000c3a698, 
    cmd_table=0x0) at /usr/src/sys/ddb/db_command.c:456
#31 0xfffffc000061a500 in db_command_loop ()
    at /usr/src/sys/ddb/db_command.c:246
#32 0xfffffc0000622800 in db_trap (type=3, code=1)
    at /usr/src/sys/ddb/db_trap.c:92
#33 0xfffffc00009ec608 in ddb_trap (a0=1, a1=1, a2=24, entry=3, 
    regs=0xfffffe00186a33a8)
    at /usr/src/sys/arch/alpha/alpha/db_interface.c:211
#34 0xfffffc0000300194 in inc6 () at /usr/src/sys/arch/alpha/alpha/debug.s:49
#35 0xfffffc00009d40ec in trap (a0=1, a1=1, a2=24, entry=3, 
    framep=0xfffffe00186a33a8) at /usr/src/sys/arch/alpha/alpha/trap.c:305
#36 0xfffffc00003003b0 in XentIF ()
    at /usr/src/sys/arch/alpha/alpha/locore.s:467
#37 0xfffffc000067c7e8 in panic (fmt=0xfffffc0000a86cec "\e")
    at /usr/src/sys/kern/subr_prf.c:237
#38 0xfffffc000067c7e8 in panic (
    fmt=0xfffffc0000bf1080 "kernel %sassertion \"%s\" failed: file \"%s\", line %d\n") at /usr/src/sys/kern/subr_prf.c:237
#39 0xfffffc0000a86cec in __assert (t=0xfffffc0000b8dbe2 "debugging ", 
    f=0xfffffc0000b8daab "/usr/src/sys/dev/pci/if_sip.c", l=1324, 
    e=0xfffffc0000b8dbed "ifp->if_capenable & IFCAP_CSUM_IPv4")
    at /usr/src/sys/lib/libkern/__assert.c:47
#40 0xfffffc0000915f8c in gsip_start (ifp=0xfffffe0000160060)
    at /usr/src/sys/dev/pci/if_sip.c:1324
#41 0xfffffc00006e6b88 in bridge_enqueue (sc=0xfffffe00001fa000, 
    dst_ifp=0xfffffe0000160060, m=0xfffffc000d61b080)
    at /usr/src/sys/net/if_bridge.c:1052
#42 0xfffffc00006e786c in bridge_broadcast (sc=0xfffffe00001fa000, 
    src_if=0xfffffe0000134060, m=0xfffffc000d61b280)
    at /usr/src/sys/net/if_bridge.c:1470
#43 0xfffffc00006e7198 in bridge_forward (sc=0xfffffe00001fa000, 
    m=0xfffffc000d61b280) at /usr/src/sys/net/if_bridge.c:1264
#44 0xfffffc00006e741c in bridge_input (ifp=0xfffffe0000134060, 
    m=0xfffffc000549bc08) at /usr/src/sys/net/if_bridge.c:1352
#45 0xfffffc00006ed528 in ether_input (ifp=0xfffffe0000134060, 
    m=0xfffffc000549bc08) at /usr/src/sys/net/if_ethersubr.c:725
#46 0xfffffc0000917c24 in gsip_rxintr (sc=0xfffffe0000134000)
    at /usr/src/sys/dev/pci/if_sip.c:1906
#47 0xfffffc0000916818 in gsip_intr (arg=0xfffffe0000134000)
    at /usr/src/sys/dev/pci/if_sip.c:1511
#48 0xfffffc0000830bb4 in alpha_shared_intr_dispatch (intr=0xfffffe000012f000, 
    num=0) at /usr/src/sys/arch/alpha/common/shared_intr.c:118
#49 0xfffffc00009b77a8 in eb164_iointr (arg=0x0, vec=2304)
    at /usr/src/sys/arch/alpha/pci/pci_eb164.c:369
#50 0xfffffc00009c470c in interrupt (a0=3, a1=2304, a2=18446739675674382451, 
    framep=0xfffffe00186a3930) at /usr/src/sys/arch/alpha/alpha/interrupt.c:304
#51 0xfffffc00003003dc in XentInt ()
    at /usr/src/sys/arch/alpha/alpha/locore.s:482
#52 0xfffffc000066a5f8 in mi_switch (p=0xfffffc0003825cc0)
    at /usr/src/sys/kern/kern_synch.c:856
#53 0xfffffc0000669894 in ltsleep (ident=0xfffffc0004b174c8, priority=281, 
    wmesg=0xfffffc0000ad1073 "ttyin", timo=0, interlock=0x0)
    at /usr/src/sys/kern/kern_synch.c:467
#54 0xfffffc00006983e4 in ttysleep (tp=0xfffffc0004b174b8, 
    chan=0xfffffc0004b174c8, pri=281, wmesg=0xfffffc0000ad1073 "ttyin", timo=0)
    at /usr/src/sys/kern/tty.c:2092
#55 0xfffffc0000696370 in ttread (tp=0xfffffc0004b174b8, 
    uio=0xfffffe00186a3d88, flag=0) at /usr/src/sys/kern/tty.c:1429
#56 0xfffffc0000870fc0 in wsdisplayread (dev=6402, uio=0xfffffe00186a3d88, 
    flag=0) at /usr/src/sys/dev/wscons/wsdisplay.c:797
#57 0xfffffc00006d6024 in spec_read (v=0xfffffe00186a3cc8)
    at /usr/src/sys/miscfs/specfs/spec_vnops.c:290
#58 0xfffffc0000606cb4 in ufsspec_read (v=0xfffffe00186a3cc8)
    at /usr/src/sys/ufs/ufs/ufs_vnops.c:1715
#59 0xfffffc00006cbf24 in VOP_READ (vp=0xfffffc0004c5e500, 
    uio=0xfffffe00186a3d88, ioflag=0, cred=0xfffffe0000021f80)
    at /usr/src/sys/kern/vnode_if.c:425
#60 0xfffffc00006cab30 in vn_read (fp=0xfffffc00034e23f0, 
    offset=0xfffffc00034e2428, uio=0xfffffe00186a3d88, 
    cred=0xfffffe0000021f80, flags=1) at /usr/src/sys/kern/vfs_vnops.c:398
#61 0xfffffc0000684ed0 in dofileread (p=0xfffffc0003825cc0, fd=0, 
    fp=0xfffffc00034e23f0, buf=0x1fffff9c8, nbyte=1, 
    offset=0xfffffc00034e2428, flags=1, retval=0xfffffe00186a3e80)
    at /usr/src/sys/kern/sys_generic.c:142
#62 0xfffffc0000684da0 in sys_read (p=0xfffffc0003825cc0, 
    v=0xfffffe00186a3fe8, retval=0xfffffe00186a3e80)
    at /usr/src/sys/kern/sys_generic.c:99
#63 0xfffffc00009d3500 in syscall_plain (p=0xfffffc0003825cc0, code=3, 
    framep=0xfffffe00186a3ef8) at /usr/src/sys/arch/alpha/alpha/syscall.c:217
#64 0xfffffc0000300474 in XentSys ()
    at /usr/src/sys/arch/alpha/alpha/locore.s:533
This warning occurs if you are debugging a function without any symbols
(for example, in a stripped executable).  In that case, you may wish to
increase the size of the search with the `set heuristic-fence-post' command.

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.


Bye 	Pavel Cahyna