From owner-freebsd-net Tue Oct 22 19:50:42 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CE7337B401; Tue, 22 Oct 2002 19:50:34 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE35E43E3B; Tue, 22 Oct 2002 19:50:33 -0700 (PDT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id <42S9VFG5>; Tue, 22 Oct 2002 22:50:32 -0400 Message-ID: From: Don Bowman To: "'freebsd-stable@freebsd.org'" , "'freebsd-net@freebsd.org'" Subject: panic with ipfw / dummynet in 4.7 STABLE Date: Tue, 22 Oct 2002 22:50:31 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Take a 4.7 image. Using if_em (if it matters). Turn on bridging (em0, em2), add these ipfw rules: ipfw add 305 prob 0.01 drop MAC any 00:04:76:f3:2d:0a setup ipfw add 310 prob 0.01 reject MAC any 00:04:76:f3:2d:0a setup ipfw add 320 prob 0.01 unreach host MAC any 00:04:76:f3:2d:0a setup ipfw add 325 prob 0.01 unreach port MAC any 00:04:76:f3:2d:0a setup ipfw add pipe 1 config delay 90 plr 0.0001 ipfw add pipe 2 config delay 150 plr 0.0005 ipfw add 340 prob 0.5 pipe 1 ip from any to any ipfw add 345 prob 0.5 pipe 2 ip from any to any The system panics almost immediately (~1s). The panic and trace is below. Its doubtful much traffic was present on the em0 or em2 interfaces so this probably happened on the first packet. I'll turn on -g in the kernel (I thought for sure it was, but seems no...) and re-run. This is with -DIPFW2 on. So I'm doing: # kldload if_em # sysctl net.link.ether.bridge_cfg="em0 em2" # sysctl net.link.ether.bridge=1 (after the machine has booted). Then I run the script above to add the ipfw rules, and it tips over. bash-2.05a# uname -a FreeBSD TPC-E1-34 4.7-STABLE FreeBSD 4.7-STABLE #7: Tue Oct 22 22:07:55 EDT 2002 don@bsd-make.sandvine.com:/usr/obj/usr/src/sys/TPC i386 Machine is a 2x XEON 2.0 GHz w/ Intel 82544 on the motherboard, and an Intel 82546EB dual GE card in a PCI slot. It is SMP enabled. SMP 4 cpus IdlePTD at phsyical address 0x00430000 initial pcb at physical address 0x00369780 panicstr: page fault panic messages: --- Fatal trap 12: page fault while in kernel mode mp_lock = 00000002; cpuid = 0; lapic.id = 00000000 fault virtual address = 0x40000007 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0204565 stack pointer = 0x10:0xff807eb4 frame pointer = 0x10:0xff807edc code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = Idle interrupt mask = net <- SMP: XXX trap number = 12 panic: page fault mp_lock = 00000002; cpuid = 0; lapic.id = 00000000 boot() called on cpu#0 syncing disks... Fatal trap 12: page fault while in kernel mode mp_lock = 00000003; cpuid = 0; lapic.id = 00000000 fault virtual address = 0x30 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0266e11 stack pointer = 0x10:0xff807cc4 frame pointer = 0x10:0xff807ccc code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = Idle interrupt mask = net bio <- SMP: XXX trap number = 12 panic: page fault mp_lock = 00000003; cpuid = 0; lapic.id = 00000000 boot() called on cpu#0 Uptime: 3m6s #0 0xc01b19b2 in dumpsys () #1 0xc01b1783 in boot () #2 0xc01b1bdc in poweroff_wait () #3 0xc02cb508 in trap_fatal () #4 0xc02cb199 in trap_pfault () #5 0xc02cad37 in trap () #6 0xc0266e11 in acquire_lock () #7 0xc026af24 in softdep_update_inodeblock () #8 0xc0265f45 in ffs_update () #9 0xc026e357 in ffs_sync () #10 0xc01e29bf in sync () #11 0xc01b151e in boot () #12 0xc01b1bdc in poweroff_wait () #13 0xc02cb508 in trap_fatal () #14 0xc02cb199 in trap_pfault () #15 0xc02cad37 in trap () #16 0xc0204565 in dummynet_io () #17 0xc020991c in ip_input () #18 0xc0209ec7 in ipintr () #19 0xc02bca91 in swi_net_next () Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.7-STABLE #7: Tue Oct 22 22:07:55 EDT 2002 don@bsd-make.sandvine.com:/usr/obj/usr/src/sys/TPC Timecounter "i8254" frequency 1193182 Hz CPU: Pentium 4 (1996.60-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf24 Stepping = 4 Features=0x3febfbff,ACC> real memory = 1073217536 (1048064K bytes) avail memory = 1039532032 (1015168K bytes) Programming 24 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 Programming 24 pins in IOAPIC #1 Programming 24 pins in IOAPIC #2 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 0, version: 0x00050014, at 0xfee00000 cpu1 (AP): apic id: 6, version: 0x00050014, at 0xfee00000 cpu2 (AP): apic id: 1, version: 0x00050014, at 0xfee00000 cpu3 (AP): apic id: 7, version: 0x00050014, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00178020, at 0xfec00000 io1 (APIC): apic id: 3, version: 0x00178020, at 0xfec80000 io2 (APIC): apic id: 4, version: 0x00178020, at 0xfec80400 Preloaded elf kernel "kernel" at 0xc0411000. Preloaded elf module "if_fxp.ko" at 0xc041109c. Preloaded elf module "miibus.ko" at 0xc041113c. netsmb_dev: loaded Pentium Pro MTRR support enabled md0: Malloc disk Using $PIR table, 24 entries at 0xc00fde40 npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard IOAPIC #0 intpin 16 -> irq 2 IOAPIC #0 intpin 19 -> irq 10 IOAPIC #0 intpin 18 -> irq 11 pci0: on pcib0 pci0: (vendor=0x8086, dev=0x2541) at 0.1 pcib1: at device 2.0 on pci0 pci1: on pcib1 pci1: (vendor=0x8086, dev=0x1461) at 28.0 pcib2: at device 29.0 on pci1 IOAPIC #2 intpin 0 -> irq 16 IOAPIC #2 intpin 1 -> irq 17 pci2: on pcib2 pci2: (vendor=0x8086, dev=0x1010) at 1.0 irq 16 pci2: (vendor=0x8086, dev=0x1010) at 1.1 irq 17 pci1: (vendor=0x8086, dev=0x1461) at 30.0 pcib3: at device 31.0 on pci1 IOAPIC #1 intpin 4 -> irq 18 IOAPIC #1 intpin 5 -> irq 19 IOAPIC #1 intpin 7 -> irq 20 pci3: on pcib3 ahc0: port 0x4000-0x40ff mem 0xfc340000-0xfc340fff irq 18 at device 2.0 on pci3 aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs ahc1: port 0x4400-0x44ff mem 0xfc341000-0xfc341fff irq 19 at device 2.1 on pci3 aic7899: Ultra160 Wide Channel B, SCSI Id=15, 32/253 SCBs pci3: (vendor=0x8086, dev=0x100d) at 4.0 irq 20 uhci0: port 0x2000-0x201f irq 2 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x2020-0x203f irq 10 at device 29.1 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x2040-0x205f irq 11 at device 29.2 on pci0 usb2: on uhci2 usb2: USB revision 1.0 uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub2: 2 ports with 2 removable, self powered pcib4: at device 30.0 on pci0 IOAPIC #0 intpin 17 -> irq 21 pci4: on pcib4 pci4: at 1.0 irq 2 fxp0: port 0x5400-0x543f mem 0xfc420000-0xfc43ffff,0xfc401000-0xfc401fff irq 21 at device 2.0 on pci4 fxp0: Ethernet address 00:30:48:12:36:07 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x2060-0x206f,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 mem 0xfc000000-0xfc0003ff irq 0 at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 ichsmb0: port 0x1100-0x111f irq 0 at device 31.3 on pci0 pci_cfgintr_search: linked (61) to configured irq 21 at 4:2:0 pci_cfgintr: 0:31 INTB routed to irq 21 smbus0: on ichsmb0 smb0: on smbus0 orm0: