I sent an email a few weeks back about a problem with iptables and NAT. This problem appears to be related to what order I insert modules, so its likely a memory location issue. I've attached a couple of oops output dumps. I gave up on trying to get ksymoops to function completely (no /proc/ksyms on my target and I read something about it being deprecated??), still I hope these dumps are useful. I'm not sure yet whether its a mips specific problem, but I thought maybe I'd see if anyone else has experienced this. My target system is an AMD Alchemy db1100, I'm using mips-linux CVS from a month ago or so (2.6.11 rc2), gcc 3.4.3 and uclibc. In the problem case I get the following output when trying to modify the 'nat' table with iptables: # iptables -t nat -F iptables v1.3.0: can't initialize iptables table `nat': Memory allocation problem Perhaps iptables or your kernel needs to be upgraded. strace output of iptables shows that there is an attempt to mmap over 1.6GB of memory. old_mmap(NULL, 1651212288, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, 0, 0) = -1 ENOMEM (Cannot allocate memory) Oops occur as soon as any IP traffic is attempted over the interfaces. I've attached 2 variations, the first 'nat2_oops.txt' occurred after a client machine attempted to get a DHCP lease, the second 'nat3_oops.txt' is when attempting a ping from the target system. In both cases it seems ip_nat_rule_find() and ip_nat_fn() are common functions, so I suspect the nat table hasn't been initialized correctly or something else is trashing some memory. Let me know if there is a more appropriate place for this bug report. Josh Green
# CPU 0 Unable to handle kernel paging request at virtual address 218a7608, epc == c0075110, ra == c018bd10 Oops in arch/mips/mm/fault.c::do_page_fault, line 166[#1]: Cpu 0 $ 0 : 00000000 1000fc00 c0181000 29867fb2 $ 4 : 810c7ae0 c0181000 83c47000 00000000 $ 8 : 810c7ae0 ffffffff 8033bc00 c01ea928 $12 : 00000000 00200200 00100100 8119b9f4 $16 : 218a75b4 812c7d20 83cf3854 8033bce0 $20 : 8033bce0 83c47000 c0181040 c007cea0 $24 : 00000001 c01e5830 $28 : 8033a000 8033bb50 83c47000 c018bd10 Hi : 00000000 Lo : 00000ce4 epc : c0075110 ipt_do_table+0xb8/0x478 [ip_tables] Not tainted ra : c018bd10 ip_nat_rule_find+0x34/0xf8 [iptable_nat] Status: 1000fc03 KERNEL EXL IE Cause : 00800008 BadVA : 218a7608 PrId : 02030204 Modules linked in: ipt_MASQUERADE ipt_state ip_nat_irc ip_nat_ftp ip_conntrack_irc ip_conntrack_ftp iptable_nat ip_conntrack bridge iptable_filter hostap_cs ip_tables hostap_crypt_wep hostap pcmcia au1x00_ss pcmcia_core Process swapper (pid: 0, threadinfo=8033a000, task=8033c000) Stack : 0000ffff 00200200 00100100 8119b9f4 1000fc01 8033bc18 00000000 00000000 00000000 29867fb2 00000000 812c7d20 00000001 8033bce0 00000000 00000000 83c47000 00000002 c01d88b4 c018bd10 1000fc03 00000000 812c7d20 00000000 c01906c0 00000000 c01eac30 00000000 8033bc1c 8033bbe8 812c7d20 00000002 c018b14c ffffffff 366f0200 0200b555 c01eac30 00000000 812c7d20 812c7d98 ... Call Trace: [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<c018bd10>] ip_nat_rule_find+0x34/0xf8 [iptable_nat] [<c018b14c>] ip_nat_fn+0x14c/0x2ac [iptable_nat] [<c018b2ec>] ip_nat_in+0x40/0x174 [iptable_nat] [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<8027f8b4>] nf_iterate+0xbc/0x15c [<8027f8b4>] nf_iterate+0xbc/0x15c [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<80280208>] nf_hook_slow+0x9c/0x200 [<80270470>] dev_queue_xmit+0x2e8/0x33c [<80268c54>] kfree_skbmem+0x14/0x30 [<80267998>] alloc_skb+0x58/0xf4 [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<c01d38dc>] br_handle_frame_finish+0x0/0x204 [bridge] [<c01d9704>] br_nf_pre_routing+0x87c/0x920 [bridge] [<c01d88b4>] br_nf_pre_routing_finish+0x0/0x560 [bridge] [<8027f8b4>] nf_iterate+0xbc/0x15c [<80207688>] memcmp+0x0/0x30 [<c01d38dc>] br_handle_frame_finish+0x0/0x204 [bridge] [<c01d38dc>] br_handle_frame_finish+0x0/0x204 [bridge] [<80280208>] nf_hook_slow+0x9c/0x200 [<c01d6050>] br_send_config_bpdu+0x1dc/0x200 [bridge] [<c01d38dc>] br_handle_frame_finish+0x0/0x204 [bridge] [<c01d3d4c>] br_handle_frame+0x26c/0x290 [bridge] [<c01d4eb8>] br_transmit_config+0x0/0x178 [bridge] [<c01d38dc>] br_handle_frame_finish+0x0/0x204 [bridge] [<80270db0>] netif_receive_skb+0x1e4/0x4e4 [<c019ad10>] hfa384x_cmd_callback+0x5c/0x464 [hostap_cs] [<802711c0>] process_backlog+0x110/0x2f0 [<c019c96c>] hostap_rx_tasklet+0x228/0x2bc [hostap_cs] [<8027146c>] net_rx_action+0xcc/0x294 [<8012c818>] tasklet_action+0xc4/0x194 [<801476d4>] handle_IRQ_event+0x7c/0x134 [<8012c1dc>] __do_softirq+0x8c/0x14c [<80147920>] __do_IRQ+0x194/0x1b4 [<80380000>] igmp_mc_proc_init+0x4c/0x74 [<80380000>] igmp_mc_proc_init+0x4c/0x74 [<8012c328>] do_softirq+0x8c/0xb8 [<80380000>] igmp_mc_proc_init+0x4c/0x74 [<80100e2c>] au1000_IRQ+0x16c/0x1a0 [<8037c6a0>] vty_init+0xfc/0x128 [<80380000>] igmp_mc_proc_init+0x4c/0x74 [<8026b7b8>] datagram_poll+0x0/0x198 [<80104a90>] cpu_idle+0x48/0x50 [<80104a64>] cpu_idle+0x1c/0x50 [<802035d0>] idr_cache_ctor+0x0/0xc [<80380000>] igmp_mc_proc_init+0x4c/0x74 [<803657ac>] start_kernel+0x200/0x2c0 [<803650fc>] unknown_bootoption+0x0/0x310 Code: afa30024 02c48021 8e840000 <8e030054> 8c820084 00431025 ac820084 92090053 000910c2 Kernel panic - not syncing: Aiee, killing interrupt handler! <6>wifi1: SW TICK stuck? bits=0x0 EvStat=8000 IntEn=e09f
Unhandled kernel unaligned access in arch/mips/kernel/unaligned.c::emulate_load_store_insn, line 475[#1]: Cpu 0 $ 0 : 00000000 1000fc00 c018100c 40525040 $ 4 : 83ee7bc0 c0181000 00000000 83cd1c00 $ 8 : 00000001 0101a8c0 83eddb60 c01ee928 $12 : 00000000 00200200 00100100 8119b9f4 $16 : 331880b5 83edad20 8131ca10 83eddc40 $20 : 83eddc40 c007cea0 c0181040 83cd1c00 $24 : 00000001 c01e9d28 $28 : 83edc000 83eddab0 00000000 c018bd10 Hi : 00000000 Lo : 00000ce4 epc : c0075110 ipt_do_table+0xb8/0x478 [ip_tables] Not tainted ra : c018bd10 ip_nat_rule_find+0x34/0xf8 [iptable_nat] Status: 1000fc03 KERNEL EXL IE Cause : 00800010 BadVA : 33188109 PrId : 02030204 Modules linked in: ipt_MASQUERADE ipt_state ip_nat_irc ip_nat_ftp ip_conntrack_irc ip_conntrack_ftp iptable_nat ip_conntrack bridge hostap_cs iptable_filter ip_tables hostap_crypt_wep hostap pcmcia au1x00_ss pcmcia_core Process ping (pid: 1029, threadinfo=83edc000, task=813bf488) Stack : 00000020 00000003 00000020 80151094 00000000 80277a20 00000000 00000000 00000000 40525040 00000003 83edad20 00000001 83eddc40 00000003 83cd1c00 00000000 00000002 802987a0 c018bd10 c01eec70 00000003 83edad20 83cd1c00 c01906c0 00000000 c01eec70 00000003 83eddb7c 83eddb48 83edad20 00000002 c018b14c 83eddb58 83eddbd8 8028fccc c01eec70 00000e00 83edad20 83edad98 ... Call Trace: [<80151094>] __get_free_pages+0x2c/0x6c [<80277a20>] neigh_create+0x604/0x870 [<802987a0>] dst_output+0x0/0x50 [<c018bd10>] ip_nat_rule_find+0x34/0xf8 [iptable_nat] [<c018b14c>] ip_nat_fn+0x14c/0x2ac [iptable_nat] [<8028fccc>] rt_set_nexthop+0x48/0x1a0 [<c018b59c>] ip_nat_local_fn+0x88/0xfc [iptable_nat] [<802987a0>] dst_output+0x0/0x50 [<8027f8b4>] nf_iterate+0xbc/0x15c [<8027f8b4>] nf_iterate+0xbc/0x15c [<802987a0>] dst_output+0x0/0x50 [<802987a0>] dst_output+0x0/0x50 [<80280208>] nf_hook_slow+0x9c/0x200 [<8029b56c>] ip_append_data+0x680/0xa24 [<802987a0>] dst_output+0x0/0x50 [<8029c3a4>] ip_push_pending_frames+0x5b8/0x670 [<802987a0>] dst_output+0x0/0x50 [<802bc36c>] raw_sendmsg+0x1c4/0x9a8 [<802bc348>] raw_sendmsg+0x1a0/0x9a8 [<8029ae30>] ip_generic_getfrag+0x0/0xbc [<8014bc88>] filemap_nopage+0x5d4/0x6e0 [<802619fc>] sock_sendmsg+0xac/0xf0 [<801614ec>] do_no_page+0x568/0xbc4 [<8037c1a8>] kbd_init+0xc4/0x1c0 [<80237a58>] serial8250_start_tx+0x0/0x2c [<8021eacc>] write_chan+0x408/0x4a4 [<8037c040>] vcs_init+0x78/0xa0 [<80141080>] autoremove_wake_function+0x0/0x44 [<80161f1c>] handle_mm_fault+0x3d4/0x4f0 [<80120a08>] __wake_up+0x40/0x7c [<80263918>] sys_sendto+0xc0/0xf4 [<80215ab8>] tty_write+0x2b0/0x444 [<80215b80>] tty_write+0x378/0x444 [<8010859c>] do_gettimeofday+0x78/0x160 [<801369bc>] sys_rt_sigaction+0x84/0xcc [<8010b8e0>] stack_done+0x20/0x3c [<8010b8e0>] stack_done+0x20/0x3c Code: afa30024 02c48021 8e840000 <8e030054> 8c820084 00431025 ac820084 92090053 000910c2 2.168.1.1): 56 dKernel panic - not syncing: Aiee, killing interrupt handler! ata bytes <6>wifi0: SW TICK stuck? bits=0x0 EvStat=8000 IntEn=e09f
Attachment:
signature.asc
Description: This is a digitally signed message part