NATD crash in 7.0-stable

Dave Robison dave at pioneerspirits.com
Mon Jun 16 18:03:22 UTC 2008


Hiya,

I'm having problems with NAT crashing my FreeBSD box. This never 
happened in 6.x but in 7.x it's predictable for me. Any time I use 
either of my two NICs for my internal net my FreeBSD box hangs and 
requires power cycling to reboot.

My guess is that some option changed between 6.x and 7.x and I simply 
missed it, or that I have something configured completely improperly, 
but after hours of tinkering I've yet to fix the problem.

Initially I figured it might be NAT in PPP which was causing the 
problem, so I backed it out and used NATD but the same thing happens to me.

uname info: 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun Jun 15 21:35:13 PDT 2008

my ipfw rules:

00100       0          0 check-state
00200 1678471  126337051 skipto 3000 ip from any to 69.229.113.78 in 
recv tun0
00210       0          0 deny log ip from any to any in recv vr0
03000      61       4548 divert 8668 ip from any to any via fxp0
03100       0          0 deny ip from 192.168.32.0/24 to any in recv vr0
*snip*

My FreeBSD box runs PPP on vr0 and my lan runs on fxp0. I've switched 
them and the freeze-up continues. The host on my LAN is 192.168.32.10, 
my internal interface is 192.168.32.1 and my external interface is 
69.229.113.78.

my /usr/local/etc/natd.conf:

#unregistered_only
#log_ipfw_denied
redirect_address        192.168.32.10   69.229.113.74
#punch_fw               25:50
interface               fxp0

I commented out a few lines to test it bare-bones. No luck.

I added these to my kernel config, which is otherwise a very standard 
GENERIC kernel config:

options         IPFIREWALL
options         IPDIVERT

the related entries from /etc/rc.conf:

ppp_enable="YES"
ppp_mode="ddial"
#ppp_nat="YES"
ppp_profile="sbc"
gateway_enable="YES"

my /etc/ppp/ppp.conf:

default:
 set log Phase Chat LCP IPCP CCP tun command
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 192.168.0.0/16

sbc:
 set device PPPoE:vr0
 set authname MYUSERNAME at sbcglobal.net
 set authkey MYPASSWORD
 set dial
 set login
 set mru 1492
 set mtu 1492
 accept lqr
 set crtscts off
 set speed sync
 enable dns
 add default HISADDR
 set log Phase Chat LCP IPCP CCP tun command
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 192.168.0.0/16

# NAT
 nat enable yes
 nat log no
# nat same_ports yes
# nat unregistered_only yes
 nat addr 192.168.32.10 69.229.113.73

Again, NAT is turned off in PPP at the moment and I'm using /sbin/natd

Machine connects to the net and works great until I try to use the LAN. 
the LAN works for a few seconds, maybe serving up a web page or two and 
then...freeze up.

I never saw the machine recover from this situation though there is a 
crash dump in /var/crash from late last night after I wasn't paying 
attention:

# ls -lart /var/crash
total 218618
-rw-r--r--   1 root  wheel          5 Feb 24 09:53 minfree
drwxr-xr-x  25 root  wheel        512 Jun 15 23:12 ..
-rw-------   1 root  wheel        462 Jun 15 23:12 info.0
-rw-r--r--   1 root  wheel          2 Jun 15 23:12 bounds
drwxr-x---   2 root  wheel        512 Jun 15 23:12 .
-rw-------   1 root  wheel  225533952 Jun 15 23:12 vmcore.0

here is my dmesg:

Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-STABLE #0: Sun Jun 15 21:35:13 PDT 2008
    root at bigshed.com:/usr/obj/usr/src/sys/bigshed
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Sempron(tm)   3000+ (1999.79-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  
Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0480800<SYSCALL,MP,MMX+,3DNow!+,3DNow!>
real memory  = 2080309248 (1983 MB)
avail memory = 2025955328 (1932 MB)
ACPI APIC Table: <HP-CPC AWRDACPI>
ioapic0 <Version 0.3> irqs 0-23 on motherboard
kbd1 at kbdmux0
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
acpi0: <HP-CPC AWRDACPI> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 7bef0000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA 8235/8237 (Apollo KM400/KM400A) host to PCI bridge> on hostb0
agp0: aperture size is 64M
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
vgapci0: <VGA-compatible display> mem 
0xe4000000-0xe7ffffff,0xe8000000-0xe8ffffff irq 16 at device 0.0 on pci1
fxp0: <Intel 82557 Pro/100 Ethernet> port 0x9000-0x901f mem 
0xeb100000-0xeb100fff,0xeb000000-0xeb0fffff irq 16 at device 8.0 on pci0
miibus0: <MII bus> on fxp0
nsphy0: <DP83840 10/100 media interface> PHY 1 on miibus0
nsphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:a0:c9:22:97:b4
fxp0: [ITHREAD]
pci0: <serial bus, FireWire> at device 11.0 (no driver attached)
atapci0: <VIA 6420 SATA150 controller> port 
0x9800-0x9807,0x9c00-0x9c03,0xa000-0xa007,0xa400-0xa403,0xa800-0xa80f,0xac00-0xacff 
irq 20 at device 15.0 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
atapci1: <VIA 8237 UDMA133 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xb000-0xb00f at device 15.1 on pci0
ata0: <ATA channel 0> on atapci1
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci1
ata1: [ITHREAD]
uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f at device 16.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
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> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xb800-0xb81f at device 16.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
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> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xbc00-0xbc1f at device 16.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: <VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0xc000-0xc01f at device 16.3 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: <VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb3
uhub3: 2 ports with 2 removable, self powered
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xeb102000-0xeb1020ff at 
device 16.4 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb4: EHCI version 1.0
usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3
usb4: <VIA VT6202 USB 2.0 controller> on ehci0
usb4: USB revision 2.0
uhub4: <VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb4
uhub4: 8 ports with 8 removable, self powered
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xc800-0xc8ff mem 
0xeb103000-0xeb1030ff irq 23 at device 18.0 on pci0
vr0: Quirks: 0x0
vr0: Revision: 0x78
miibus1: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: Ethernet address: 00:00:00:00:00:10
vr0: [ITHREAD]
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz0: _PSV value is absurd, ignored (-247.7C)
acpi_tz0: _ACx value is absurd, ignored (-265.7C)
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on 
acpi0
sio0: type 16550A
sio0: [FILTER]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
pmtimer0 on isa0
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/9 bytes threshold
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ugen0: <Powerware Powerware UPS, class 0/0, rev 2.00/0.50, addr 2> on uhub1
umass0: <vendor 0x058f USB Reader, class 0/0, rev 1.10/1.00, addr 2> on 
uhub3
Timecounter "TSC" frequency 1999790840 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 initialized, divert enabled, nat loadable, rule-based forwarding 
disabled, default to deny, logging disabled
acpi_tz0: _PSV value is absurd, ignored (-247.7C)
acpi_tz0: _ACx value is absurd, ignored (-265.7C)
acpi_tz0: _PSV value is absurd, ignored (-247.7C)
acpi_tz0: _ACx value is absurd, ignored (-265.7C)
acd0: CDRW <SONY CD-RW CRX220E1/6YS1> at ata1-master UDMA33
ad4: 190782MB <MAXTOR STM3200820AS 3.AAE> at ata2-master SATA150
ad6: 238475MB <WDC WD2500KS-00MJB0 02.01C03> at ata3-master SATA150
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Generic USB SD Reader 1.00> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <Generic USB CF Reader 1.01> Removable Direct Access SCSI-0 device
da1: 1.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <Generic USB SM Reader 1.02> Removable Direct Access SCSI-0 device
da2: 1.000MB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
da3 at umass-sim0 bus 0 target 0 lun 3
da3: <Generic USB MS Reader 1.03> Removable Direct Access SCSI-0 device
da3: 1.000MB/s transfers
da3: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad4s1a
WARNING: / was not properly dismounted
WARNING: /tmp was not properly dismounted
WARNING: /var was not properly dismounted
/var: mount pending error: blocks 12 files 3
WARNING: /disk2 was not properly dismounted
WARNING: attempt to net_add_domain(netgraph) after domainfinalize()
fxp0: link state changed to UP
vr0: link state changed to UP


any help, hints, clues or just a simple "how could you be so dumb, the 
answer is x..." would be greatly appreciated.

Thanks for taking the time to read and consider this.

Dave













More information about the freebsd-questions mailing list