Regular reboots on Xiaomi Mi Router 3g

I've been using openwrt on mir3g since 18.06.1 came out and I always had this nasty quite regular(~2-3 days) hangs, that I couldn't figure out. LEDs would continue to blink and whatnot, but PCs couldn't connect to local network or internet.(looking back I kinda attribute it to this bug since I'm not sure if the fix was pushed to stable.)

To battle it I recently flashed SNAPSHOT r8371-59db98d and the behavior changed.
Now this problem is gone, but another surfaced: The router reboots itself every 2-3 days.
I attach the crashlog because I cannot make sense of it myself.
Maybe someone can shed a light if this problem was already reported or it's a new one or maybe I got a faulty unit?

Dunno if useful some info:
My provider doesn't have IPv6, but I didn't disable it explicitly in Luci, I also use vpn-policy-routing, but the reboots started before I installed it, so I figure it couldn't have caused it.

Sat Oct 27 00:36:54 2018 kern.notice kernel: [    0.000000] Linux version 4.14.77 (buildbot@crazyhorse) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r8371-59db98d)) #0 SMP Sun Oct 21 18:48:36 2018
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] bootconsole [early0] enabled
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] MIPS: machine is Xiaomi Mi Router 3G
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Determined physical RAM map:
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000]  memory: 10000000 @ 00000000 (usable)
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Initrd not found or empty - disabling initrd
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] VPE topology {2,2} total 4
Sat Oct 27 00:36:54 2018 kern.warn kernel: [    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Sat Oct 27 00:36:54 2018 kern.warn kernel: [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Sat Oct 27 00:36:54 2018 kern.warn kernel: [    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Zone ranges:
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000]   HighMem  empty
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Movable zone start for each node
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Early memory node ranges
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
Sat Oct 27 00:36:54 2018 kern.info kernel: [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]

I also have full system log for the past few days I can post if needed.

Edit: forgot to mention that errors like this
mtk_soc_eth 1e100000.ethernet eth0: transmit timed out
sometimes happen (happened 2 times in the last 3 days) with router able to recover from them.
Can't judge if this somehow contributes to eventual crash.

I use 5ghz modem only, and as a side note wanted to ask for tips on how to disable stuff(e.g. HW NAT may be contributing to mtk_soc_eth 1e100000.ethernet eth0: transmit timed out if I were to believe other bug reports that contain discussion of this error.)

Got another reboot today, crashlog:

Time: 1540726196.192520
Modules:	pppoe@8e9b8000+2290	ppp_async@8f2a8000+1be0	pppox@8e9d6000+58a	ppp_generic@8ea18000+5aa2	nf_conntrack_ipv6@8f190000+15e0	mt76x2e@8e9f8000+5380	mt76x2_common@8f0c0000+2e8b	mt76x02_lib@8e9f0000+5f9d	mt7603e@8f268000+7d2f	mt76@8f260000+574f	mac80211@8f300000+6f2e1	iptable_nat@8f0c9000+310	ipt_REJECT@8e866000+410	ipt_MASQUERADE@8f16e000+2f0	cfg80211@8f200000+395b0	xt_time@8f14b000+730	xt_tcpudp@8e97e000+750	xt_state@8e820000+310	xt_nat@8e91f000+650	xt_multiport@8e86f000+550	xt_mark@8f1b9000+2f0	xt_mac@8f1bc000+2b0	xt_limit@8f1be000+4f0	xt_conntrack@8f0c7000+950	xt_comment@8f151000+230	xt_TCPMSS@8f1f8000+b30	xt_REDIRECT@8f1f2000+310	xt_LOG@8f089000+350	xt_FLOWOFFLOAD@8e825000+b60	xt_CT@8f101000+ad0	wireguard@8e960000+1a160	slhc@8f0a2000+149b	nf_reject_ipv4@8e868000+923	nf_nat_redirect@8e8d9000+5fb	nf_nat_masquerade_ipv4@8e8db000+67c	nf_conntrack_ipv4@8e874000+1470	nf_nat_ipv4@8e806000+1031	nf_nat@8f1dc000+3adc	nf_log_ipv4@8f16b000+dd0	nf_flow_table_hw@8f174000+920	nf_flow_table@8f120000+365f	nf_defrag_ipv6@8f110000+139e	nf_defrag_ipv4@8f10e000+4b6	nf_conntrack_rtcache@8e853000+af0	nf_conntrack_netlink@8e940000+5910	nf_conntrack@8f0e0000+1168d	iptable_mangle@8f160000+3d0	iptable_filter@8f1fd000+2d0	ip_tables@8f14c000+2bcd	crc_ccitt@8f1fa000+42b	compat@8f19f000+406	ledtrig_usbport@8f19d000+b00	xt_set@8f1f4000+1b70	ip_set_list_set@8f1f0000+1c50	ip_set_hash_netiface@8f1e8000+6310	ip_set_hash_netport@8f1e0000+6250	ip_set_hash_netnet@8f1d0000+6790	ip_set_hash_net@8f1c8000+5c70	ip_set_hash_netportnet@8f1c0000+6d30	ip_set_hash_mac@8e838000+2930	ip_set_hash_ipportnet@8e830000+6830	ip_set_hash_ipportip@8e828000+54f0	ip_set_hash_ipport@8e818000+5170	ip_set_hash_ipmark@8e810000+4e90	ip_set_hash_ip@8e808000+4db0	ip_set_bitmap_port@8e876000+1830	ip_set_bitmap_ipmac@8e84c000+1bd0	ip_set_bitmap_ip@8e872000+1b30	ip_set@8f188000+590a	nfnetlink@8f184000+1277	ip6t_REJECT@8f070000+450	nf_reject_ipv6@8e869000+ac8	nf_log_ipv6@8e85c000+1070	nf_log_common@8f13d000+baf	ip6table_mangle@8e842000+4d0	ip6table_filter@8e864000+2d0	ip6_tables@8e850000+2aa1	x_tables@8f134000+374f	ip6_udp_tunnel@8e840000+697	udp_tunnel@8f076000+b0f	leds_gpio@8f791000+bb0	xhci_mtk@8f02e000+14b0	xhci_plat_hcd@8f036000+1650	xhci_pci@8f7ad000+b30	xhci_hcd@8f040000+16ba9	gpio_button_hotplug@8f022000+1970	usbcore@8f000000+210b1	nls_base@8f79e000+1550	usb_common@8f78a000+a17
<6>[    6.639267] usbcore: registered new interface driver hub
<6>[    6.644734] usbcore: registered new device driver usb
<4>[    6.659864] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
<6>[    6.668821] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
<6>[    6.674141] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
<6>[    6.687539] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x00210010
<6>[    6.696019] xhci-mtk 1e1c0000.xhci: irq 19, io mem 0x1e1c0000
<6>[    6.702843] hub 1-0:1.0: USB hub found
<6>[    6.706666] hub 1-0:1.0: 2 ports detected
<6>[    6.711393] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
<6>[    6.716704] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
<6>[    6.724199] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
<6>[    6.730811] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
<6>[    6.739808] hub 2-0:1.0: USB hub found
<6>[    6.743628] hub 2-0:1.0: 1 port detected
<14>[    6.751003] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
<14>[    6.767715] init: - preinit -
<6>[    7.486990] mtk_soc_eth 1e100000.ethernet: PPE started
<5>[    7.563599] random: procd: uninitialized urandom read (4 bytes read)
<5>[   10.646542] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 495
<5>[   10.721860] UBIFS (ubi0:1): recovery needed
<5>[   11.308320] UBIFS (ubi0:1): recovery completed
<5>[   11.312874] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
<5>[   11.320711] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
<5>[   11.330604] UBIFS (ubi0:1): FS size: 112627712 bytes (107 MiB, 887 LEBs), journal size 5586944 bytes (5 MiB, 44 LEBs)
<5>[   11.341178] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
<5>[   11.347780] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 83F16789-2F38-445A-9073-8CF2E77C8F7F, small LPT model
<14>[   11.368163] mount_root: switching to ubifs overlay
<12>[   11.399454] urandom-seed: Seeding with /etc/urandom.seed
<6>[   11.579928] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
<14>[   11.596133] procd: - early -
<14>[   11.599143] procd: - watchdog -
<14>[   12.237557] procd: - watchdog -
<14>[   12.241019] procd: - ubus -
<5>[   12.273545] random: ubusd: uninitialized urandom read (4 bytes read)
<5>[   12.305207] random: ubusd: uninitialized urandom read (4 bytes read)
<5>[   12.311989] random: ubusd: uninitialized urandom read (4 bytes read)
<14>[   12.319239] procd: - init -
<14>[   12.834227] kmodloader: loading kernel modules from /etc/modules.d/*
<6>[   12.848091] ip6_tables: (C) 2000-2006 Netfilter Core Team
<6>[   12.860806] Netfilter messages via NETLINK v0.30.
<6>[   12.872961] ip_set: protocol 6
<6>[   12.956577] Loading modules backported from Linux version v4.19-rc5-0-g6bf4ca7fbc85
<6>[   12.964272] Backport generated by backports.git v4.19-rc5-1-0-g05571dcd
<6>[   12.973140] ip_tables: (C) 2000-2006 Netfilter Core Team
<6>[   12.986375] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
<6>[   13.000369] ctnetlink v0.93: registering with nfnetlink.
<6>[   13.072674] wireguard: WireGuard 0.0.20181018 loaded. See www.wireguard.com for information.
<6>[   13.081218] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
<6>[   13.103414] xt_time: kernel timezone is -0000
<4>[   13.170219] bus=0x1, slot = 0x0, irq=0xff
<6>[   13.174474] mt7603e 0000:01:00.0: ASIC revision: 76030010
<6>[   13.207947] mt7603e 0000:01:00.0: Firmware Version: ap_pcie
<6>[   13.213517] mt7603e 0000:01:00.0: Build Time: 20160107100755
<4>[   13.257369] firmware init done
<7>[   13.426422] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
<4>[   13.436923] bus=0x2, slot = 0x1, irq=0xff
<6>[   13.441238] mt76x2e 0000:02:00.0: ASIC revision: 76120044
<6>[   14.172142] mt76x2e 0000:02:00.0: ROM patch build: 20141115060606a
<6>[   14.181795] mt76x2e 0000:02:00.0: Firmware Version: 0.0.00
<6>[   14.187274] mt76x2e 0000:02:00.0: Build: 1
<6>[   14.191388] mt76x2e 0000:02:00.0: Build Time: 201507311614____
<6>[   14.217367] mt76x2e 0000:02:00.0: Firmware running!
<7>[   14.225092] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
<6>[   14.232921] PPP generic driver version 2.4.2
<6>[   14.239050] NET: Registered protocol family 24
<14>[   14.246540] kmodloader: done loading kernel modules from /etc/modules.d/*
<4>[   14.787022] urandom_read: 5 callbacks suppressed
<5>[   14.787035] random: jshn: uninitialized urandom read (4 bytes read)
<6>[   20.195068] mtk_soc_eth 1e100000.ethernet: PPE started
<6>[   20.207749] device eth0 entered promiscuous mode
<6>[   20.214658] br-lan: port 1(eth0.1) entered blocking state
<6>[   20.220220] br-lan: port 1(eth0.1) entered disabled state
<6>[   20.226248] device eth0.1 entered promiscuous mode
<6>[   20.235369] br-lan: port 1(eth0.1) entered blocking state
<6>[   20.240842] br-lan: port 1(eth0.1) entered forwarding state
<6>[   20.246928] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
<5>[   20.740969] random: crng init done
<6>[   21.237843] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
<6>[   22.969818] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
<6>[   22.980696] br-lan: port 2(wlan1) entered blocking state
<6>[   22.986186] br-lan: port 2(wlan1) entered disabled state
<6>[   22.992058] device wlan1 entered promiscuous mode
<6>[   24.050008] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
<6>[   24.056806] br-lan: port 2(wlan1) entered blocking state
<6>[   24.062181] br-lan: port 2(wlan1) entered forwarding state
<4>[ 1255.073699] ------------[ cut here ]------------
<4>[ 1255.078369] WARNING: CPU: 1 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x1ac/0x324
<6>[ 1255.086624] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out
<4>[ 1255.093568] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD xt_CT wireguard slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip
<4>[ 1255.165125]  ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ip6_udp_tunnel udp_tunnel leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
<4>[ 1255.197520] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.77 #0
<4>[ 1255.203517] Stack : 00000000 8ff1c140 805a0000 8006f804 805d0000 8056cd38 00000000 00000000
<4>[ 1255.211900]         80537728 8fc0ddc4 8fc441fc 805a8947 80532818 00000001 8fc0dd68 1cc282ad
<4>[ 1255.220244]         00000000 00000000 80610000 00006100 00000000 00000130 00000008 00000000
<4>[ 1255.228581]         00000000 805b0000 00030390 00000000 00000000 00000000 805d0000 8037ff98
<4>[ 1255.236920]         00000009 00000140 00000001 8ff1c140 00000003 802a2ca8 00000004 80610004
<4>[ 1255.245254]         ...
<4>[ 1255.247693] Call Trace:
<4>[ 1255.250158] [<800106c0>] show_stack+0x58/0x100
<4>[ 1255.254612] [<8047244c>] dump_stack+0x9c/0xe0
<4>[ 1255.258955] [<8002e408>] __warn+0xe0/0x114
<4>[ 1255.263030] [<8002e46c>] warn_slowpath_fmt+0x30/0x3c
<4>[ 1255.267990] [<8037ff98>] dev_watchdog+0x1ac/0x324
<4>[ 1255.272691] [<80086774>] call_timer_fn.isra.3+0x24/0x84
<4>[ 1255.277896] [<80086990>] run_timer_softirq+0x1bc/0x248
<4>[ 1255.283013] [<8048f920>] __do_softirq+0x128/0x2ec
<4>[ 1255.287710] [<80032b34>] irq_exit+0xac/0xc8
<4>[ 1255.291879] [<802511ac>] plat_irq_dispatch+0xfc/0x138
<4>[ 1255.296911] [<8000b5e8>] except_vec_vi_end+0xb8/0xc4
<4>[ 1255.301857] [<8000cfb0>] r4k_wait_irqoff+0x1c/0x24
<4>[ 1255.306656] [<8006687c>] do_idle+0xe4/0x168
<4>[ 1255.310822] [<80066af8>] cpu_startup_entry+0x24/0x2c
<4>[ 1255.315852] ---[ end trace 9db79988584cf243 ]---
<3>[ 1255.320487] mtk_soc_eth 1e100000.ethernet eth0: transmit timed out
<6>[ 1255.326757] mtk_soc_eth 1e100000.ethernet eth0: dma_cfg:80000065
<6>[ 1255.332785] mtk_soc_eth 1e100000.ethernet eth0: tx_ring=0, base=0eb60000, max=0, ctx=3908, dtx=3908, fdx=3907, next=3908
<6>[ 1255.343705] mtk_soc_eth 1e100000.ethernet eth0: rx_ring=0, base=0e300000, max=0, calc=3906, drx=3907
<6>[ 1255.357528] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
<6>[ 1255.371634] mtk_soc_eth 1e100000.ethernet: PPE started
<3>[ 9847.046645] mtk_soc_eth 1e100000.ethernet eth0: transmit timed out
<6>[ 9847.052838] mtk_soc_eth 1e100000.ethernet eth0: dma_cfg:80000067
<6>[ 9847.058863] mtk_soc_eth 1e100000.ethernet eth0: tx_ring=0, base=0ef00000, max=0, ctx=598, dtx=240, fdx=240, next=598
<6>[ 9847.069426] mtk_soc_eth 1e100000.ethernet eth0: rx_ring=0, base=0e1a0000, max=0, calc=4037, drx=4038
<6>[ 9847.480478] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x44600c0c, 0x10c = 0x80818
<6>[ 9847.487722] mtk_soc_eth 1e100000.ethernet: reset pse
<6>[ 9847.498754] mtk_soc_eth 1e100000.ethernet: PPE started
<3>[ 9857.046574] mtk_soc_eth 1e100000.ethernet eth0: transmit timed out
<6>[ 9857.052767] mtk_soc_eth 1e100000.ethernet eth0: dma_cfg:80000067
<6>[ 9857.058792] mtk_soc_eth 1e100000.ethernet eth0: tx_ring=0, base=0f390000, max=0, ctx=1, dtx=0, fdx=0, next=1
<6>[ 9857.068603] mtk_soc_eth 1e100000.ethernet eth0: rx_ring=0, base=0e170000, max=0, calc=754, drx=755
<6>[ 9857.479664] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x4060140c, 0x10c = 0x80818
<6>[ 9857.486906] mtk_soc_eth 1e100000.ethernet: reset pse
<0>[ 9857.497128] skbuff: skb_over_panic: text:803126ac len:1568 put:1568 head:8ef8eaa0 data:8ef8eae2 tail:0x8ef8f102 end:0x8ef8f100 dev:eth0
<6>[ 9857.497420] mtk_soc_eth 1e100000.ethernet: PPE started
<4>[ 9857.514441] Kernel bug detected[#1]:
<4>[ 9857.518006] CPU: 0 PID: 925 Comm: logd Tainted: G        W       4.14.77 #0
<4>[ 9857.524932] task: 8ff85140 task.stack: 8e994000
<4>[ 9857.529436] $ 0   : 00000000 00000001 0000007b 00000000
<4>[ 9857.534648] $ 4   : 8121033c 8121033c 81214e78 000071b0
<4>[ 9857.539856] $ 8   : 00000000 0000015b 00000008 00000000
<4>[ 9857.545066] $12   : 00000000 805b0000 0007970c 00000000
<4>[ 9857.550274] $16   : 8eaea0c0 adec0020 00000620 8e17f1c0
<4>[ 9857.555484] $20   : 00000008 00000002 8fc3a000 8fc3a4c8
<4>[ 9857.560693] $24   : 00000001 802a2ca8                  
<4>[ 9857.565902] $28   : 8e994000 8fc09e18 00000002 8033da80
<4>[ 9857.571112] Hi    : 00000124
<4>[ 9857.573974] Lo    : 74e58000
<4>[ 9857.576860] epc   : 8033da80 skb_panic+0x58/0x5c
<4>[ 9857.581453] ra    : 8033da80 skb_panic+0x58/0x5c
<4>[ 9857.586041] Status: 11008403	KERNEL EXL IE 
<4>[ 9857.590211] Cause : 50800024 (ExcCode 09)
<4>[ 9857.594197] PrId  : 0001992f (MIPS 1004Kc)
<4>[ 9857.598267] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD xt_CT wireguard slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_netlink nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip
<4>[ 9857.669602]  ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ip6_udp_tunnel udp_tunnel leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
<4>[ 9857.701936] Process logd (pid: 925, threadinfo=8e994000, task=8ff85140, tls=77f5ed98)
<4>[ 9857.709723] Stack : 8eaea540 804b53e0 803126ac 00000620 00000620 8ef8eaa0 8ef8eae2 8ef8f102
<4>[ 9857.718056]         8ef8f100 8fc3a000 8fc3a300 8033db10 00000008 00000002 8fc3a000 8ef8eaa0
<4>[ 9857.726387]         adec0020 803126ac 8fc42fd8 811c5fe0 00000200 8fef1900 00000002 00000000
<4>[ 9857.734717]         00000000 0e17f200 805c0000 80650000 00010000 86200000 0ef8eae0 805b0000
<4>[ 9857.743049]         00030000 8fc3a480 0000000f 8fc3a4a0 01080020 30000000 00000000 80640000
<4>[ 9857.751380]         ...
<4>[ 9857.753815] Call Trace:
<4>[ 9857.756247] [<8033da80>] skb_panic+0x58/0x5c
<4>[ 9857.760501] [<8033db10>] skb_put+0x48/0x54
<4>[ 9857.764597] [<803126ac>] fe_poll+0x44c/0x7c4
<4>[ 9857.768848] [<803585d4>] net_rx_action+0x150/0x30c
<4>[ 9857.773617] [<8048f920>] __do_softirq+0x128/0x2ec
<4>[ 9857.778312] [<80032b34>] irq_exit+0xac/0xc8
<4>[ 9857.782479] [<802511ac>] plat_irq_dispatch+0xfc/0x138
<4>[ 9857.787514] [<8000b5e8>] except_vec_vi_end+0xb8/0xc4
<4>[ 9857.792451] Code: 00602825  0c01c240  248451d0 <000c000d> 8c8200ac  8c88005c  8c8700a8  00451023  01054021 
<4>[ 9857.802174] 
<4>[ 9857.803828] ---[ end trace 9db79988584cf244 ]---

===================================
Time: 
1 Like

Try leaving an ssh connection to the router open, “tail-ing” the log. That way you can see what happens before/at the crash on the terminal. (The logs after reboot aren’t terribly useful in this kind of situation.)

Recently updated to Linux version 4.14.78 (buildbot@buildslave) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r8385-374e646724))

Today ethernet switch stopped working with this in logread -f:

Tue Oct 30 18:51:48 2018 daemon.info dnsmasq-dhcp[1864]: DHCPACK(br-lan) 192.168.1.132 17:12:b5:c5:9c:d7 DUNCE
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.104769] ------------[ cut here ]------------
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.109427] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x1ac/0x324
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.117691] NETDEV WATCHDOG: eth0 (mtk_soc_eth): transmit queue 0 timed out
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.124628] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD xt_CT slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.195499] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.78 #0
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.201475] Stack : 00000000 8ff41a40 805a0000 8006f804 805d0000 8056cd38 00000000 00000000
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.209812]         80537728 8fc09dc4 805a8dbc 805a8947 80532818 00000001 8fc09d68 1cc282ae
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.218150]         00000000 00000000 80610000 00005e10 00000000 0000012a 00000008 00000000
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.226481]         00000000 805b0000 0002fbab 00000000 00000000 00000000 805d0000 8037ff98
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.234812]         00000009 00000140 00000000 8ff41a40 00000003 802a2ca8 00000000 80610000
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.243142]         ...
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.245577] Call Trace:
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.248039] [<800106c0>] show_stack+0x58/0x100
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.252490] [<8047244c>] dump_stack+0x9c/0xe0
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.256832] [<8002e408>] __warn+0xe0/0x114
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.260908] [<8002e46c>] warn_slowpath_fmt+0x30/0x3c
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.265863] [<8037ff98>] dev_watchdog+0x1ac/0x324
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.270561] [<80086774>] call_timer_fn.isra.3+0x24/0x84
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.275762] [<80086990>] run_timer_softirq+0x1bc/0x248
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.280875] [<8048f920>] __do_softirq+0x128/0x2ec
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.285564] [<80032b34>] irq_exit+0xac/0xc8
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.289730] [<802511ac>] plat_irq_dispatch+0xfc/0x138
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.294758] [<8000b5e8>] except_vec_vi_end+0xb8/0xc4
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.299698] [<8000cfb0>] r4k_wait_irqoff+0x1c/0x24
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.304488] [<8006687c>] do_idle+0xe4/0x168
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.308654] [<80066af8>] cpu_startup_entry+0x24/0x2c
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.313599] [<805d1bf8>] start_kernel+0x48c/0x4ac
Tue Oct 30 19:20:48 2018 kern.warn kernel: [ 2849.318405] ---[ end trace 908cbc1185729382 ]---
Tue Oct 30 19:20:48 2018 kern.err kernel: [ 2849.323036] mtk_soc_eth 1e100000.ethernet eth0: transmit timed out
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.329361] mtk_soc_eth 1e100000.ethernet eth0: dma_cfg:80000065
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.335415] mtk_soc_eth 1e100000.ethernet eth0: tx_ring=0, base=0eab0000, max=0, ctx=162, dtx=162, fdx=161, next=162
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.345962] mtk_soc_eth 1e100000.ethernet eth0: rx_ring=0, base=0e240000, max=0, calc=2174, drx=2187
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.360227] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
Tue Oct 30 19:20:48 2018 kern.info kernel: [ 2849.372927] mtk_soc_eth 1e100000.ethernet: PPE started

Wireless connection was working so I tried to restart interfaces in LuCI to no avail.

Is it possible to turn on any option to reboot when any stack trace happen ?
Is it possible to gather some logs for such case ?

"tail-ing" the logs over ssh into a terminal window is the easiest approach for debugging a problem, in my opinion.

Since /var/ and /tmp/ are both volatile memory, you'll need to log somewhere that persists. I'd recommend and external USB "stick" over internal flash to reduce flash wear. You can then either use the "stock" logger, or something with more control, such as syslog-ng. I'd recommend installing logrotate as well, especially as the wireless logs can be quite chatty and create huge log files quickly.

You really don't want to reboot on any stack trace. Stack traces don't necessarily mean that the system is unusable, even when they originate from the kernel. A Linux-based OS is intended to be able to recover from an application failing, as well as from many "unusual" situations within the kernel itself.

Since reports of this issue is pretty scarce, in an attempt to figure out if my unit was at fault I flashed PandoraBox.
It afaik uses mediatek proprietary drivers and currently uptime is nearing 24h without any such problems, I'll report in a few days time with an update.