Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 05:06:24 -0700 (PDT)
From:      "Pawe&#322; Ma&#322;achowski" <pawmal@unia.3lo.lublin.pl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/42030: panic when zebra works on detaching tun interface
Message-ID:  <200208261206.g7QC6Nh8077791@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         42030
>Category:       kern
>Synopsis:       panic when zebra works on detaching tun interface
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 26 05:10:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Pawe&#322; Ma&#322;achowski
>Release:        4.6.2-RELEASE
>Organization:
ZiN
>Environment:
FreeBSD gargantua.zin.git 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #2: Sun Aug 25 17:03:15 CEST 2002     root@gargantua.zin.git:/usr/src/sys/compile/PM-UX-AUTO  i386

>Description:
      System acts as a Zebra-based (net/zebra) OSPF router. Tun interfaces are used with vtund (net/vtun) as virtual, compressed connections to other machines outside LAN.
When the vtund disconnects tunnel, *sometimes* the kernel panic occurs. It happens a couple of times per day.
When Zebra is not running, there is no problem.
The other side of tunnel (FreeBSD 4.6-STABLE) is not running Zebra yet so I don't know are others affected or not.

Kernel sources are up to date. Kernel config is a GENERIC with additional options as shown here:
pseudo-device   ccd     4
device          apm0    # GENERIC apm0 with flags declaration is comment-out
pseudo-device   speaker
pseudo-device   snp     3
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_FORWARD
options         IPFIREWALL_VERBOSE_LIMIT=100
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPFILTER
options         IPFILTER_LOG
options         IPFILTER_DEFAULT_BLOCK
options QUOTA
options DUMMYNET
options         SHMMAXPGS=65536
options         SEMMNI=40
options         SEMMNS=240
options         SEMUME=40
options         SEMMNU=120

The example vtund.conf section is:
foo-blah {
  pass xxx;
  device tun10;
  up {
        ifconfig "%% 10.61.7.254 10.61.7.253 netmask 255.255.255.255";
  };
  down {
        ifconfig "%% delete 10.61.7.254";
  };
}

Debug output:
# ./gdbmods /sys/compile/PM-UX-AUTO/kernel.debug vmcore.0
please be patient while loaded modules are resolved
gdbmods using kernel: /sys/compile/PM-UX-AUTO/kernel.debug
gdbmods using core:   vmcore.0
GNU gdb 4.18 (FreeBSD)
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 "i386-unknown-freebsd"...
IdlePTD at phsyical address 0x0050e000
initial pcb at physical address 0x0044aec0
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x4
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc0249809
stack pointer           = 0x10:0xcdf81d1c
frame pointer           = 0x10:0xcdf81d28
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         = 342 (zebra)
interrupt mask          =
trap number             = 12
panic: page fault

syncing disks... 16 10 5
done
Uptime: 13m14s

// snipped some messages when I've turned on debugging and added dumpdev and rebooted again

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.6.2-RELEASE #2: Sun Aug 25 17:03:15 CEST 2002
    root@gargantua.zin.git:/usr/src/sys/compile/PM-UX-AUTO
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (952.17-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x68a  Stepping = 10
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 268353536 (262064K bytes)
config> di sn0
config> di lnc0
config> di ie0
config> di fe0
config> di ed0
config> di cs0
config> di bt0
config> di aic0
config> di aha0
config> di adv0
config> q
avail memory = 256073728 (250072K bytes)
Preloaded elf kernel "kernel" at 0xc04ef000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc04ef09c.
ccd0-3: Concatenated disk drivers
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 9 entries at 0xc00f12d0
apm0: <APM BIOS> on motherboard
apm: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib2: <VIA 82C598MVP (Apollo MVP3) PCI-PCI (AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib2
pci1: <S3 Trio3D graphics accelerator> at 0.0
isab0: <VIA 82C686 PCI-ISA bridge> at device 4.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 82C686 ATA100 controller> port 0xd800-0xd80f at device 4.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <VIA 83C572 USB controller> port 0xd400-0xd41f irq 11 at device 4.2 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xd000-0xd01f irq 11 at device 4.3 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x1106, dev=0x3057) at 4.4
rl0: <RealTek 8139 10/100BaseTX> port 0xb800-0xb8ff mem 0xf7800000-0xf78000ff irq 10 at device 7.0 on pci0
rl0: Ethernet address: 00:02:44:23:82:c4
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xb400-0xb47f mem 0xf7000000-0xf700007f irq 11 at device 10.0 on pci0
xl0: Ethernet address: 00:a0:24:aa:1b:95
miibus1: <MII bus> on xl0
xlphy0: <3Com internal media interface> on miibus1
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl1: <3Com 3c905B-TX Fast Etherlink XL> port 0xb000-0xb07f mem 0xf6800000-0xf680007f irq 10 at device 11.0 on pci0
xl1: Ethernet address: 00:10:5a:f0:96:77
miibus2: <MII bus> on xl1
xlphy1: <3Com internal media interface> on miibus2
xlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib1: <Host to PCI bridge> on motherboard
pci2: <PCI bus> on pcib1
orm0: <Option ROM> at iomem 0xc0000-0xc7fff on isa0
fdc0: ready for input in output
fdc0: cmd 3 failed at out byte 1 of 3
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
IP packet filtering initialized, divert disabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
DUMMYNET initialized (011031)
IP Filter: v3.4.27 initialized.  Default = block all, Logging = enabled
ata1-slave: ATA identify retries exceeded
ata1-master: ATA identify retries exceeded
ad0: 38166MB <ST340810A> [77545/16/63] at ata0-master UDMA100
Mounting root from ufs:/dev/ad0s1a
xl1: promiscuous mode enabled
xl0: promiscuous mode enabled
xl0: promiscuous mode disabled
rl0: promiscuous mode enabled
rl0: promiscuous mode disabled
xl0: promiscuous mode enabled
rl0: promiscuous mode enabled
tun5: promiscuous mode enabled
tun5: promiscuous mode disabled
tun5: promiscuous mode enabled
tun5: promiscuous mode disabled
tun10: promiscuous mode enabled
tun10: promiscuous mode disabled
tun10: promiscuous mode enabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x4
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc0249839
stack pointer           = 0x10:0xcdf65d1c
frame pointer           = 0x10:0xcdf65d28
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         = 306 (zebra)
interrupt mask          =
trap number             = 12
panic: page fault

syncing disks... 9 3
done
Uptime: 5h7m18s

dumping to dev #ad/0x30001, offset 1573024
dump ata0: resetting devices .. done
255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
---
#0  dumpsys () at ../../kern/kern_shutdown.c:487
487             if (dumping++) {
(kgdb) bt
#0  dumpsys () at ../../kern/kern_shutdown.c:487
#1  0xc01f9ae3 in boot (howto=256) at ../../kern/kern_shutdown.c:316
#2  0xc01f9f08 in poweroff_wait (junk=0xc03da0ec, howto=-1069704177)
    at ../../kern/kern_shutdown.c:595
#3  0xc036a052 in trap_fatal (frame=0xcdf65cdc, eva=4)
    at ../../i386/i386/trap.c:966
#4  0xc0369d25 in trap_pfault (frame=0xcdf65cdc, usermode=0, eva=4)
    at ../../i386/i386/trap.c:859
#5  0xc03698e3 in trap (frame={tf_fs = -839516144, tf_es = -1048379376,
      tf_ds = -1069547504, tf_edi = -1048217856, tf_esi = -1048348944,
      tf_ebp = -839492312, tf_isp = -839492344, tf_ebx = 0, tf_edx = -1048217856,
      tf_ecx = 1, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1071343559,
      tf_cs = 8, tf_eflags = 66118, tf_esp = -839492200, tf_ss = -1049736192})
    at ../../i386/i386/trap.c:458
#6  0xc0249839 in arp_rtrequest (req=1, rt=0xc1857700, info=0xcdf65d98)
    at ../../netinet/if_ether.c:188
#7  0xc02472a8 in rtrequest1 (req=1, info=0xcdf65d98, ret_nrt=0xcdf65d94)
    at ../../net/route.c:754
#8  0xc0247cc1 in route_output (m=0xc0ed4b00, so=0xccd21300)
    at ../../net/rtsock.c:333
#9  0xc0246742 in raw_usend (so=0xccd21300, flags=0, m=0xc0ed4b00, nam=0x0,
    control=0x0, p=0xcdf4b920) at ../../net/raw_usrreq.c:258
#10 0xc0247a84 in rts_send (so=0xccd21300, flags=0, m=0xc0ed4b00, nam=0x0,
    control=0x0, p=0xcdf4b920) at ../../net/rtsock.c:236
#11 0xc02181af in sosend (so=0xccd21300, addr=0x0, uio=0xcdf65ed4, top=0xc0ed4b00,
    control=0x0, flags=0, p=0xcdf4b920) at ../../kern/uipc_socket.c:609
#12 0xc020bd68 in soo_write (fp=0xc1832f40, uio=0xcdf65ed4, cred=0xc1810d80,
    flags=0, p=0xcdf4b920) at ../../kern/sys_socket.c:81
#13 0xc0208a1d in dofilewrite (p=0xcdf4b920, fp=0xc1832f40, fd=6, buf=0xbfbfe868,
    nbyte=128, offset=-1, flags=0) at ../../sys/file.h:162
#14 0xc02088d6 in write (p=0xcdf4b920, uap=0xcdf65f80)
    at ../../kern/sys_generic.c:329
#15 0xc036a301 in syscall2 (frame={tf_fs = -1078001617, tf_es = -1078001617,
---Type <return> to continue, or q <return> to quit---
      tf_ds = -1078001617, tf_edi = 128, tf_esi = 134745644, tf_ebp = -1077941520,
      tf_isp = -839491628, tf_ebx = 16, tf_edx = 128, tf_ecx = 0, tf_eax = 4,
      tf_trapno = 7, tf_err = 2, tf_eip = 672392940, tf_cs = 31, tf_eflags = 663,
      tf_esp = -1077942220, tf_ss = 47}) at ../../i386/i386/trap.c:1167
#16 0xc035b3f5 in Xint0x80_syscall ()
#17 0x8064ce1 in ?? ()
#18 0x8064d2d in ?? ()
#19 0x804f542 in ?? ()
#20 0x804f75e in ?? ()
#21 0x804fccb in ?? ()
#22 0x804e12e in ?? ()
#23 0x804e1a2 in ?? ()
#24 0x80656f1 in ?? ()
#25 0x8065edb in ?? ()
#26 0x805f1c2 in ?? ()
#27 0x804c30d in ?? ()
#28 0x804992d in ?? ()
(kgdb) q

Promiscuous mode was enabled because of a diagnostic tcpdump.
>How-To-Repeat:
      As above, try to estabilish and disconnect tunnels when Zebra is running on it.
Note: kernel panic happens only sometimes. But when the panic comes, there is always zebra (not ospfd) process as "current process".
>Fix:
      Don't know.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208261206.g7QC6Nh8077791>