New fixes feedback - Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit)

UPDATE - 4th of December 2020:

This puts back the 80mhz frequency on the SPI and fixed by using the mtd fast-read feature to stop the race condition.

Also some Wifi fixes - hopefully fixing the hardware reset issues and enabling a few more features

  • ACS floor scanning
  • P2P client and GO

This will probably be my last update as from me, as everything is working so far and will just be keeping my code up to date when new security updates come along.

When I get time, will try to push the patches upstream in the openwrt V19.07 branch.

Enjoy!

Original message:

Hi peeps,

So rather than looking through a thousand page topic, i've started this thread to get some feedback from owners or devs on my recent updates, fixes to this device.

Im not trying to taking any credit from the original thread - Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion

Just getting to the bottom of the recent boot failures people and myself had experienced with this device.

My gitlab repo for the source code if you wish to fork or build:

https://gitlab.com/db260179/xiaomi-m4a.git

  • Issue i had faced where - Squashfs data corruption

My original suggestion was the block size was the issue. This was incorrect.

After many days of testing and low level hardware probing, it appears that some of these boards might have a manufactuer issue with the spi chip clock speed - It is rated at 80mhz capable speed, but it seems that running at that speed causes race conditions on bootup.

I had to lower it all the way to 33mhz to create a stable no corrupted running mode.

Since this change i no longer get the squashfs corruption issue.

As there where no official patch for this device, only based on the work of the similiar device 3Gv2, the two settings don't quite fit for this device.

Feedback would be gratefully appreciated!

6 Likes

Nice. Can you provide direct link to a build so that
it's easy for other people having the issue (note: I'm no affected) can see if it fixes for them?

Also, I didn't quite understand what are the changes that implement that fix. Can you point me to the commit?

1 Like

This is the original fix on my dev branch

I believe that default block size is 256k, so its possible on this device was creating out of bound r/w block issues, the image size being smaller reduced area to breath.

Like i say, need feedback.

https://gitlab.com/db260179/xiaomi-m4a/-/releases/v1.0-pre - pre built image to test

openwrt-19.07.4-r11208-ce6496d796-ramips-mt7621-xiaomi_mir4ag-squashfs-sysupgrade.bin

2 Likes

Nice! I will attempt an upgrade tonight and post my results.

@db260179 Seamless upgrade from 17.07.3 no issues at all as far as I can tell. No errors in logs, Wifi working as expected and GIG LAN also perfect. I'll continue to monitor for a few days but all looks good from here! Would you like me to test installing from the exploit at some point, or do you think the outcome should be the same?

image

1 Like

@hoddy Thanks for the feedback. So I have a few more patches to add to my master branch as a test image:

So i have discovered a nasty squashfs filesystem bug that corrupts the image when being built. Explains why i was getting a SQUASHFS corruption.

Also from testing, the network pausing of traffic issue occurs from using iperf3.

So I you could do the factory reset (using oem firmware), then follow readme-mi4a.md. Then feedback.

Let me know on stability overtime. I will upload a snapshot version with the above fixes for further testing, if stable then can apply to my stable branch

Hi @db260179

Thanks for taking care of this issue. :slight_smile:

I don't have the device anymore, so I can't test your patches. In any case, I would like to kindly ask you to submit them upstream once they are ready.

Cheers!

Yep will create an upstream patch once people have tested this.

@hoddy @araujorm New updated pre stable release v1.1-pre - updated the switch code to turn off flow control on all ports and not force 1gb speed

My iperf3 tests show around 750mbps to 980mbps depending on load in HW offloading mode, need to test vlan support in HW offloading mode

1 Like

Hey, looking very good.

Unfortunately I'm out of time to try it now, and I can't really take my router offline and experiment with it easily without having a riot in my house, but in due time some of these ideas may be useful to improve support on other (older) mediatek devices I have lying around :slight_smile:

Would be great if the people that were having trouble with the squashfs flashing would test it though. I never had those issues so I doubt my tests would be conclusive...

Great, updated!
Iperf3 -t 60
No offloading: 639mbps
Software flow offloading: 731mbps
Hardware flow offloading: 681mbps
If this helps, results for all 3 were quite spread but I didnt see much over 750, perhaps something is wrong with my setup i will try to diagnose when I can.

1 Like

Hello I am using the firmware since the morning and I feel that its working without issues till now my router, and sqm qos that I was needed works fine. now I am getting security certificate issue when logging and I feel that is loaded with unnecessary plugins for a lot of people and needs only basic things like adblock and qos in my opinion. Now I will flash the updated version and report back. but I saw its only firewall update. Nice find Hoddy!!! ps: I am not a Dev just fixing my miserable router based on xiaomi crap firmware. Thank you David for your time spending..

Thanks for the feedback. Did you have issues with the previous images from the other thread?

Ive added programs I use, once this is tested more will reduce the packages to just the basics.

The security issue is because luci-ssl generates its own certificate, you should be logging into your router via https and not http (plain text can see passwords if someone is sniffing), reason for this.

Let me know of any performance issues or weird problems.
Thanks

1 Like

Yes I used before araujorm's firmware but was having issue with the kernel and couldn't install sqm qos cause of incompatibility. so I installed this one.

Is this the same as you are seeing with interfaces going up and down?

[ 1111.322652] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[ 1114.454812] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[ 9337.370712] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[ 9340.572075] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[21303.118078] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[21306.283010] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[32964.535319] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[32967.665674] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[43249.612323] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[43252.749834] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[55736.125327] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[55739.263645] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[60187.195733] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[60190.331569] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[80838.015451] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[80841.151168] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[143257.913372] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[143261.014270] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[144141.858563] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[144145.104816] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[146686.828411] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[146689.942969] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up

@db260179 Has anyone tested WDS Client bridge with your firmware build yet? I have been using SNAPSHOT build for this purpose on my second device, but considering loading your firmware to feedback for this use case.

What are the main differences between your build and @araujorm's latest?

I will check the build in November. I had problems with fs corruption.

Hello @db260179
Yesterday i have installed your build, all seems fine (aprox. 20 hours) until today i got an unexpectedly reboot.
All router settings are default, not activated any suplimentary modules (adbloc, banip, etc...)
Kernel crashlog tell something for you??? I don't understand what is the reason of this reboot.

Time: 1603631302.485606
Modules:	pppoe@86e2c000+2400	ppp_async@86f32000+1b90	pppox@86f95000+4b0	ppp_generic@86da0000+5970	nf_conntrack_ipv6@86f10000+1590	mt76x2e@86e34000+26c0	mt76x2_common@86e3c000+2a40	mt76x02_lib@86ca0000+96e0	mt7603e@86e20000+90e0	mt76@86e10000+7a40	mac80211@86e80000+6cda0	iptable_nat@86855000+2c0	ipt_REJECT@86fbe000+3c0	ipt_MASQUERADE@869ba000+2a0	cfg80211@86e40000+36b00	xt_time@869bb000+6e0	xt_tcpudp@869cb000+700	xt_tcpmss@869c9000+420	xt_statistic@869bf000+340	xt_state@8682b000+2c0	xt_recent@869c2000+1c50	xt_quota@869a4000+300	xt_pkttype@869a2000+240	xt_owner@87793000+360	xt_nat@86f50000+600	xt_multiport@86f7b000+500	xt_mark@86f5b000+2a0	xt_mac@86f9e000+260	xt_limit@8684a000+4a0	xt_length@8684f000+2c0	xt_hl@86887000+320	xt_helper@868a7000+360	xt_geoip@868b7000+c60	xt_ecn@86995000+540	xt_dscp@86993000+3e0	xt_conntrack@86988000+900	xt_connmark@8694c000+4e0	xt_connlimit@8698c000+1510	xt_connbytes@8695f000+640	xt_comment@8697e000+1e0	xt_addrtype@86951000+940	xt_TCPMSS@8693a000+ae0	xt_REDIRECT@8693e000+2c0	xt_LOG@86940000+300	xt_HL@86942000+540	xt_FLOWOFFLOAD@86944000+c10	xt_DSCP@86948000+5e0	xt_CT@8694a000+a60	xt_CLASSIFY@8694e000+240	wireguard@86960000+166a0	spidev@86930000+1850	slhc@86926000+1400	nf_reject_ipv4@86870000+840	nf_nat_redirect@86f35000+580	nf_nat_masquerade_ipv4@86843000+650	nf_conntrack_ipv4@86922000+1420	nf_nat_ipv4@86f81000+f30	nf_nat@868c8000+37b0	nf_log_ipv4@86f82000+d60	nf_flow_table_hw@86854000+8f0	nf_flow_table@86f20000+3350	nf_defrag_ipv6@86f04000+12e0	nf_defrag_ipv4@877f7000+440	nf_conntrack_rtcache@86f7d000+aa0	nf_conntrack_netlink@86910000+5a70	macremapper@877e4000+3550	iptable_raw@86f72000+260	iptable_mangle@8685d000+380	iptable_filter@86f4e000+280	ipt_ECN@86f57000+580	ip_tables@86f78000+2b30	crc_ccitt@86f53000+3e0	compat@877fc000+1740	br_netfilter@86908000+30d0	sch_cake@86900000+7550	nf_conntrack@86f60000+10770	sch_tbf@86f2a000+1700	sch_ingress@868ff000+4c0	sch_htb@86f24000+36d0	sch_hfsc@86f1c000+3a00	em_u32@8684d000+220	cls_u32@86f14000+22d0	cls_tcindex@86f0e000+1500	cls_route@86f02000+1470	cls_matchall@868f0000+9e0	cls_fw@868ee000+f20	cls_flow@868f4000+1680	cls_basic@8685b000+c40	act_skbedit@8687d000+9f0act_mirred@86896000+f50	xt_set@868e2000+1b20	ip_set_list_set@868ce000+1c60	ip_set_hash_netportnet@868d8000+6c60	ip_set_hash_netport@868d0000+61e0	ip_set_hash_netnet@868c0000+6780	ip_set_hash_netiface@868b8000+62c0	ip_set_hash_net@868b0000+5c00	ip_set_hash_mac@8689c000+2920	ip_set_hash_ipportnet@868a0000+6740	ip_set_hash_ipportip@86890000+54a0	ip_set_hash_ipport@86888000+5140	ip_set_hash_ipmark@86880000+4e60	ip_set_hash_ip@86878000+4d80	ip_set_bitmap_port@8686e000+1800	ip_set_bitmap_ipmac@8686a000+1ba0	ip_set_bitmap_ip@8685e000+1b00	ip_set@86860000+5710	nfnetlink@86852000+1110	nf_log_ipv6@877ea000+1020	nf_log_common@877e3000+aa0	ip6table_mangle@8682a000+4a0	ip6table_filter@86f9d000+280	ip6_tables@86844000+2a20ip6t_REJECT@86f9c000+400	x_tables@8682c000+3310	nf_reject_ipv6@877ec000+9e0	ifb@87785000+ce0	ip6_udp_tunnel@86fb8000+640	udp_tunnel@877f4000+980	leds_gpio@87745000+b60	gpio_button_hotplug@8774a000+1ac0
<5>[    6.349370] random: procd: uninitialized urandom read (4 bytes read)
<13>[    9.492355] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
<12>[    9.526561] urandom-seed: Seed file not found (/etc/urandom.seed)
<6>[    9.597250] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
<14>[    9.612260] procd: - early -
<14>[    9.615238] procd: - watchdog -
<14>[   10.281659] procd: - watchdog -
<14>[   10.285163] procd: - ubus -
<5>[   10.357067] random: ubusd: uninitialized urandom read (4 bytes read)
<5>[   10.379934] random: ubusd: uninitialized urandom read (4 bytes read)
<5>[   10.386775] random: ubusd: uninitialized urandom read (4 bytes read)
<14>[   10.394018] procd: - init -
<14>[   10.924578] kmodloader: loading kernel modules from /etc/modules.d/*
<6>[   10.941988] ip6_tables: (C) 2000-2006 Netfilter Core Team
<6>[   10.952361] Netfilter messages via NETLINK v0.30.
<6>[   10.958767] ip_set: protocol 6
<6>[   10.984221] Mirror/redirect action on
<6>[   10.995188] u32 classifier
<6>[   10.997907]     input device check on
<6>[   11.001587]     Actions configured
<6>[   11.016172] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
<5>[   11.029253] Bridge firewalling registered
<6>[   11.034744] Loading modules backported from Linux version v4.19.137-0-gc076c79e03c6
<6>[   11.042408] Backport generated by backports.git v4.19.137-1-0-g60c3a249
<6>[   11.052088] ip_tables: (C) 2000-2006 Netfilter Core Team
<6>[   11.062854] MRM The MAC Address Re-Mapper is now in the kernel
<6>[   11.071050] ctnetlink v0.93: registering with nfnetlink.
<6>[   11.128401] wireguard: WireGuard 1.0.20200611 loaded. See www.wireguard.com for information.
<6>[   11.136846] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
<6>[   11.187975] xt_time: kernel timezone is -0000
<14>[   11.217008] urngd: v1.0.2 started.
<4>[   11.261448] bus=0x2, slot = 0x1, irq=0xff
<6>[   11.265815] mt7603e 0000:02:00.0: ASIC revision: 76030010
<5>[   11.406881] random: crng init done
<5>[   11.410304] random: 6 urandom warning(s) missed due to ratelimiting
<6>[   12.302743] mt7603e 0000:02:00.0: Firmware Version: ap_pcie
<6>[   12.308316] mt7603e 0000:02:00.0: Build Time: 20160107100755
<6>[   12.351515] mt7603e 0000:02:00.0: firmware init done
<7>[   12.523899] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
<4>[   12.536196] bus=0x1, slot = 0x0, irq=0xff
<6>[   12.540467] mt76x2e 0000:01:00.0: ASIC revision: 76120044
<6>[   13.266031] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
<6>[   13.275692] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
<6>[   13.281170] mt76x2e 0000:01:00.0: Build: 1
<6>[   13.285305] mt76x2e 0000:01:00.0: Build Time: 201507311614____
<6>[   13.311513] mt76x2e 0000:01:00.0: Firmware running!
<7>[   13.319316] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
<6>[   13.328036] PPP generic driver version 2.4.2
<6>[   13.333963] NET: Registered protocol family 24
<14>[   13.341718] kmodloader: done loading kernel modules from /etc/modules.d/*
<6>[   29.690817] mtk_soc_eth 1e100000.ethernet: PPE started
<6>[   29.700839] br-lan: port 1(eth0.1) entered blocking state
<6>[   29.706372] br-lan: port 1(eth0.1) entered disabled state
<6>[   29.712488] device eth0.1 entered promiscuous mode
<6>[   29.717317] device eth0 entered promiscuous mode
<6>[   29.724812] br-lan: port 1(eth0.1) entered blocking state
<6>[   29.730257] br-lan: port 1(eth0.1) entered forwarding state
<6>[   29.736343] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
<6>[   30.722208] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
<4>[   41.884551] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
<4>[   41.891558] jffs2_build_filesystem(): unlocking the mtd device... 
<4>[   41.891684] done.
<4>[   41.899830] jffs2_build_filesystem(): erasing all blocks after the end marker... 
<4>[   48.224481] done.
<5>[   48.233900] jffs2: notice: (3133) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
<4>[   48.525621] overlayfs: upper fs does not support tmpfile.
<6>[  546.395311] br-lan: port 1(eth0.1) entered disabled state
<6>[  546.404188] device eth0.1 left promiscuous mode
<6>[  546.409130] br-lan: port 1(eth0.1) entered disabled state
<6>[  546.477423] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
<6>[  546.731970] br-lan: port 1(eth0.1) entered blocking state
<6>[  546.737377] br-lan: port 1(eth0.1) entered disabled state
<6>[  546.743452] device eth0.1 entered promiscuous mode
<6>[  546.751200] br-lan: port 1(eth0.1) entered blocking state
<6>[  546.756655] br-lan: port 1(eth0.1) entered forwarding state
<6>[  815.712954] pppoe-wan: renamed from ppp0
<6>[  974.821935] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
<6>[  974.836192] br-lan: port 2(wlan0) entered blocking state
<6>[  974.841567] br-lan: port 2(wlan0) entered disabled state
<6>[  974.847690] device wlan0 entered promiscuous mode
<6>[  983.096486] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
<6>[  983.103249] br-lan: port 2(wlan0) entered blocking state
<6>[  983.108592] br-lan: port 2(wlan0) entered forwarding state
<6>[ 1085.174712] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
<6>[ 1085.184323] br-lan: port 3(wlan1) entered blocking state
<6>[ 1085.189765] br-lan: port 3(wlan1) entered disabled state
<6>[ 1085.195630] device wlan1 entered promiscuous mode
<6>[ 1166.443349] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
<6>[ 1166.450049] br-lan: port 3(wlan1) entered blocking state
<6>[ 1166.455399] br-lan: port 3(wlan1) entered forwarding state
<6>[ 5057.284341] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[ 5058.978089] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[ 5080.755176] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[ 5083.530281] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<4>[15372.960058] conntrack: generic helper won't handle protocol 47. Please consider loading the specific helper module.
<6>[23712.966693] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[23715.608975] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[23718.814951] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[65901.096605] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[65916.967146] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[65919.773276] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[66092.672633] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[66095.243766] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[66097.971797] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[67228.866604] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[67244.440979] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[67247.153230] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[68141.729578] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[68144.303693] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[68147.141817] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[68519.670832] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[68535.532926] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[68538.288191] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[69326.078378] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[69328.663739] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[69330.927784] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[69666.760416] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[69681.420065] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[69684.138184] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[70936.360132] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[70938.867794] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[70941.802797] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[74038.051357] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[74052.772381] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[74055.493403] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[77829.187170] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[77831.743177] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[77834.070288] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[80565.988135] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<6>[80581.382248] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
<6>[80584.101461] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
<1>[85798.476182] CPU 3 Unable to handle kernel paging request at virtual address 0082828e, epc == 86f20384, ra == 86f203ac
<4>[85798.486867] Oops[#1]:
<4>[85798.489144] CPU: 3 PID: 18589 Comm: kworker/3:0 Not tainted 4.14.201 #0
<4>[85798.495745] Workqueue: events_power_efficient 0x86944304 [xt_FLOWOFFLOAD@86944000+0xc10]
<4>[85798.503801] task: 87f9aca0 task.stack: 8703c000
<4>[85798.508308] $ 0   : 00000000 00000001 00828260 00000001
<4>[85798.513526] $ 4   : 00828260 8703de4f 8703de4f ffff00fe
<4>[85798.518744] $ 8   : 8703dfe0 00007c00 00004e08 00000001
<4>[85798.523957] $12   : 0000031f 00000000 ffffffff 000044ac
<4>[85798.529169] $16   : 8703de4f 86944000 00000000 fffffff5
<4>[85798.534380] $20   : 8056fba0 00000001 000000c0 fffffffe
<4>[85798.539592] $24   : 00000000 80008e34                  
<4>[85798.544803] $28   : 8703c000 8703ddf0 80550000 86f203ac
<4>[85798.550016] Hi    : 0000000a
<4>[85798.552880] Lo    : 66666669
<4>[85798.555759] epc   : 86f20384 0x86f20384 [nf_flow_table@86f20000+0x3350]
<4>[85798.562350] ra    : 86f203ac 0x86f203ac [nf_flow_table@86f20000+0x3350]
<1>[85798.563012] CPU 2 Unable to handle kernel paging request at virtual address 00828264, epc == 8049ef08, ra == 86f20268
<4>[85798.568931] Status: 11007c03	KERNEL EXL IE 
<4>[85798.568950] Cause : 40800008 (ExcCode 02)
<4>[85798.568963] BadVA : 0082828e
<4>[85798.590512] PrId  : 0001992f (MIPS 1004Kc)
<4>[85798.594586] 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_tcpmss xt_statistic xt_state xt_recent xt_quota xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_geoip xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_addrtype xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY wireguard spidev 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 macremapper iptable_raw iptable_mangle iptable_filter ipt_ECN
<4>[85798.665182]  ip_tables crc_ccitt compat br_netfilter sch_cake nf_conntrack sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip 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 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ifb ip6_udp_tunnel udp_tunnel leds_gpio gpio_button_hotplug
<4>[85798.724816] Process kworker/3:0 (pid: 18589, threadinfo=8703c000, task=87f9aca0, tls=00000000)
<4>[85798.733384] Stack : 80550000 80088698 805acda0 8054e1e8 86944b80 00828260 0000001b 00000100
<4>[85798.741733]         00000200 85fdfc00 0000000f 00000001 80550000 00000000 86944b70 86940000
<4>[85798.750080]         86940000 86944374 8054dd00 804a15a0 00000001 87f9aca0 8113fa20 01142a00
<4>[85798.758429]         00000000 86944b40 86efc780 8113fa20 81142c00 00000000 00000000 800460a8
<4>[85798.766776]         8113fbc0 8113fa38 80550000 8113fbc0 80550000 fffffffe 86efc780 8113fa20
<4>[85798.775125]         ...
<4>[85798.777564] Call Trace:
<4>[85798.777577] [<80088698>] 0x80088698
<4>[85798.783503] [<86940000>] 0x86940000 [xt_LOG@86940000+0x300]
<4>[85798.789058] [<86940000>] 0x86940000 [xt_LOG@86940000+0x300]
<4>[85798.794614] [<86944374>] 0x86944374 [xt_FLOWOFFLOAD@86944000+0xc10]
<4>[85798.800854] [<804a15a0>] 0x804a15a0
<4>[85798.804360] [<800460a8>] 0x800460a8
<4>[85798.807856] [<800465a0>] 0x800465a0
<4>[85798.811329] [<80067b40>] 0x80067b40
<4>[85798.814832] [<80046250>] 0x80046250
<4>[85798.818316] [<8004c198>] 0x8004c198
<4>[85798.821791] [<8004c068>] 0x8004c068
<4>[85798.825274] [<8004c068>] 0x8004c068
<4>[85798.828767] [<8004c068>] 0x8004c068
<4>[85798.832240] [<80006f78>] 0x80006f78
<4>[85798.835727] 
<4>[85798.837207] Code: 00409025  1000000f  00000000 <9042002e> 14400006  00000000  0220f809  00000000  10000002 
<4>[85798.846952] 
<4>[85798.848437] Oops[#2]:
<4>[85798.849325] ---[ end trace 869705827ca2b933 ]---
<4>[85798.850721] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D         4.14.201 #0

Yes, my recent patches seemed to of help mitigate this issue. I'm still testing the squashfs corruption issue, its a very weird bug.

1 Like

What image on my gitlab repo was that? v1.0-pre or v1.1-pre?

I've since enabled back the offload feature on the ports, this error seems to be related to that error you have posted.

Only differences i can see as that im adding my own custom patches - related to the switch and image patching to overcome some sort of weird corruption with the squashfs on boot.

Its based on v19.07.4 branch, im doing my own internal testing on the v19.07-master branch.

1 Like