Subject: kern/28855: ipnat causes kernel to drop into db> w/ NetBSD 2.0
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <looking@sexykula.com>
List: netbsd-bugs
Date: 01/04/2005 03:36:00
>Number:         28855
>Category:       kern
>Synopsis:       ipnat causes kernel to drop into db> w/ NetBSD 2.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 04 03:36:00 +0000 2005
>Originator:     chuey
>Release:        NetBSD 2.0
>Organization:
>Environment:
NetBSD gateway.happy.chu 2.0 NetBSD 2.0 (GATEWAY_VERIEXEC) #0: Sat Dec 11 17:27:52 PST 2004  root@gateway.happy.chu:/usr/obj/sys/arch/i386/compile/GATEWAY_VERIEXEC i386
>Description:
The system drops into db> while acting as a NAT box.

kernel: page fault trap, code=0
Stopped at      netbsd:fr_movequeue+0x54:       movl    %ebx,0(%eax)
db> trace
fr_movequeue(c0b03254,c0aadbc0,c0885034,4a07c73f,c0783be0) at netbsd:fr_movequeu
e+0x54
fr_natout(c0783be0,c0b03200,1,320,c0783be7) at netbsd:fr_natout+0xe6
fr_checknatout(c0783be0,c0783bdc,c0783be0,32,c0937400) at netbsd:fr_checknatout+
0xe6
fr_check(c0862844,14,c087803c,1,c0783cf8) at netbsd:fr_check+0x454
fr_check_wrapper(0,c0783cf8,c087803c,2,c06c7a08) at netbsd:fr_check_wrapper+0x6f


pfil_run_hooks(c06c79e0,c0783d78,c087803c,2,c06c7a08) at netbsd:pfil_run_hooks+0

x5b

ip_output(c0862800,0,c06c7a04,1,0) at netbsd:ip_output+0x2a7

ip_forward(c0862800,0,c0885034,1,6d3c00ae) at netbsd:ip_forward+0x157

ip_input(c0862800,c0865f80,0,7,0) at netbsd:ip_input+0x281

ipintr(2ed10010,30,be30010,10,c0780000) at netbsd:ipintr+0x71

DDB lost frame for netbsd:Xsoftnet+0x40, trying 0xc0783e80

Xsoftnet() at netbsd:Xsoftnet+0x40

--- interrupt ---


ipnat.conf

map rtk0 192.xxx.xxx.0/24 -> xx.xx.xx.xxx/32 proxy port ftp ftp/tcp
map rtk0 192.xxx.xxx.x/32 -> xx.xx.xx.xxx/32 proxy port 500 ipsec/udp
map rtk0 192.xxx.xxx.0/24 -> xx.xx.xx.xxx/32 portmap tcp/udp 50000:65535
map rtk0 192.xxxx.xxx.0/24 -> xx.xx.xx.xxx/32

dmesg

NetBSD 2.0 (GATEWAY_VERIEXEC) #0: Sat Dec 11 17:27:52 PST 2004                  
        root@gateway.happy.chu:/usr/obj/sys/arch/i386/compile/GATEWAY_VERIEXEC  
total memory = 32380 KB                                                         
avail memory = 25048 KB                                                         
BIOS32 rev. 0 found at 0xfb440                                                  
mainbus0 (root)                                                                 
cpu0 at mainbus0: (uniprocessor)                                                
cpu0: Intel Pentium/MMX (586-class), 199.45 MHz, id 0x544                       
cpu0: features 8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>                           
cpu0: features 8001bf<MMX>                                                      
pci0 at mainbus0 bus 0: configuration mode 1                                    
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok              
pchb0 at pci0 dev 0 function 0                                                  
pchb0: Intel 82437VX System Controller (TVX) (rev. 0x02)                        
pcib0 at pci0 dev 7 function 0                                                  
pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)                      
piixide0 at pci0 dev 7 function 1                                               
piixide0: Intel 82371SB IDE Interface (PIIX3) (rev. 0x00)                       
piixide0: bus-master DMA support present                                        
piixide0: primary channel wired to compatibility mode                           
piixide0: primary channel interrupting at irq 14                                
atabus0 at piixide0 channel 0                                                   
piixide0: secondary channel wired to compatibility mode 
piixide0: secondary channel interrupting at irq 15                              
atabus1 at piixide0 channel 1                                                   
rtk0 at pci0 dev 17 function 0: Accton MPX 5030/5038 10/100BaseTX               
rtk0: interrupting at irq 9                                                     
rtk0: Ethernet address 00:e0:29:27:6b:64                                        
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface                       
ukphy0: OUI 0x000000, model 0x0000, rev. 0                                      
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto                    
vga1 at pci0 dev 19 function 0: Trident Microsystems TGUI 9660 (rev. 0xd3)      
wsdisplay0 at vga1 kbdmux 1                                                     
wsmux1: connecting to wsdisplay0                                                
ne2 at pci0 dev 20 function 0: Realtek 8029 Ethernet                            
ne2: Ethernet address 00:80:c8:fc:eb:80                                         
ne2: 10base2, 10baseT, 10baseT-FDX, auto, default [0x00 0x30] auto              
ne2: interrupting at irq 11                                                     
isa0 at pcib0                                                                   
lpt0 at isa0 port 0x378-0x37b irq 7                                             
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo                     
com0: console                                                                   
pckbc0 at isa0 port 0x60-0x64                                                   
pcppi0 at isa0 port 0x61                                                        
midi0 at pcppi0: PC speaker                                                     
sysbeep0 at pcppi0                  
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support                     
npx0 at isa0 port 0xf0-0xff: using exception 16                                 
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2                                       
isapnp0: no ISA Plug 'n Play devices found                                      
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec                             
Kernelized RAIDframe activated                                                  
wd0 at atabus0 drive 0: <Maxtor 90840D6>                                        
wd0: drive supports 16-sector PIO transfers, LBA addressing                     
wd0: 8010 MB, 16276 cyl, 16 head, 63 sec, 512 bytes/sect x 16406208 sectors     
wd0: 32-bit data port                                                           
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)         
wd0(piixide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)      
atapibus0 at atabus1: 2 targets                                                 
cd0 at atapibus0 drive 0: <MATSHITA CR-585, , ZS15> cdrom removable             
cd0: 32-bit data port                                                           
cd0: drive supports PIO mode 3, DMA mode 1                                      
cd0(piixide0:1:0): using PIO mode 0, DMA mode 1 (using DMA data transfers)      
boot device: wd0                                                                
root on wd0a dumps on wd0b                                                      
root file system type: ffs                               

>How-To-Repeat:

>Fix: