Kernel bug: brcm47xx/mips74k reboots after: bgmac_bcma bcma0:1 eth0: Found oversized packet...
Username: Dmitry Ershov
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1905
Device
Asus RT-N66U B1
SoC: Broadcom BCM4706
https://openwrt.org/toh/asus/rt-n66u
https://openwrt.org/toh/hwdata/asus/asus_rt-n66u_b1
OpenWrt version
Stable Release OpenWrt 18.06.1
cat /etc/openwrt_release
DISTRIB_ID='OpenWrt' DISTRIB_RELEASE='18.06.1' DISTRIB_REVISION='r7258-5eb05530' DISTRIB_TARGET='brcm47xx/mips74k' DISTRIB_ARCH='mipsel_74kc' DISTRIB_DESCRIPTION='OpenWrt 18.06.1 r7258-5eb05530' DISTRIB_TAINTS=''
Linux OpenWrt 4.14.63 #0 Wed Aug 15 20:42:39 2018 mips GNU/Linux
What does it do that it should not do
Sometimes the router hangup and reboots.
This can happen several times a day.
The log contains entries:
Oct 22 12:50:50 OpenWrt kernel: [249137.210802] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 56, DMA issue! Oct 22 12:50:50 OpenWrt kernel: [249137.254221] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 121, DMA issue! Oct 22 12:50:50 OpenWrt kernel: [249137.295788] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 314, DMA issue! Oct 22 12:50:50 OpenWrt kernel: [249137.320500] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 509, DMA issue!
Few entries from crashlog:
<3>[249137.254221] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 121, DMA issue! <3>[249137.295788] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 314, DMA issue! <3>[249137.320500] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 509, DMA issue! <0>[249137.334933] skbuff: skb_over_panic: text:80238000 len:1753 put:1753 head:86862a80 data:86862a80 tail:0x86863159 end:0x868630e0 dev: <4>[249137.347856] Kernel bug detected[#1]: <4>[249137.351653] CPU: 0 PID: 7 Comm: ksoftirqd/0 Tainted: G W 4.14.63 #0
Full crashlog attached.
Steps to reproduce
To reproduce the bug I try to fill the nf_conntrack table with thousands of connections.
Several seconds it was kept filled:
net.netfilter.nf_conntrack_max = 16384 net.netfilter.nf_conntrack_count = 16383
log:
nf_conntrack: nf_conntrack: table full, dropping packet nf_conntrack: nf_conntrack: table full, dropping packet ...
then several messages:
bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 262, DMA issue! ...
and the router rebooted.
Another way to reproduce...
...same error messages in the log - run bandwidth test
... Oct 22 14:46:08 OpenWrt kernel: [ 6908.757065] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 118, DMA issue! Oct 22 14:46:08 OpenWrt kernel: [ 6908.770969] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 183, DMA issue! Oct 22 14:46:08 OpenWrt kernel: [ 6908.800488] bgmac_bcma bcma0:1 eth0: Found oversized packet at slot 442, DMA issue!
What I have already done to workaround/fix the problem
I try to decrease value of the nf_conntrack_tcp_timeout_established
from
net.netfilter.nf_conntrack_tcp_timeout_established = 7440
to
net.netfilter.nf_conntrack_tcp_timeout_established = 900
typical value:
net.netfilter.nf_conntrack_count = 5130 (...7000)
but it still reboots sometimes.
Additional info
Wireless disabled
IPv6 disabled
VLANs used